-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve IPv6 support in globalzone #503
base: master
Are you sure you want to change the base?
Conversation
I haven't looked at this in detail, but I'm pretty much against the idea that we should sleep in the start method and then do a sysinfo update. This is problematic for a couple reasons. It seems to suggest that there's a static set of addressing, which, especially if using ndp, there's no reason to believe. Instead, we should go through and cause sysinfo to be updated dynamically based upon changes to the assigned addresses in a similar fashion to what was recently done for datalink state changes. Basically, assuming that this is static is asking us to have problems and get out of sync with reality. |
I agree that there are better solutions than just sleeping. Although I did not see a cleaner solution that (I with my skill set) could implement. Having sysinfo dynamically update for each address discovered with in.ndp would indeed be better. That still leaves identity-node that needs to be refreshed too though. Feel free to cherry pick for example only the sysinfo change. (Or I can submit a PR for this separately) |
Hey @sjorge , just wanted to let you know that I haven't forgotten about this, and I'll take a look over it as soon as I can. |
Oops I forgot this was linked to a PR, branch restored. |
After talking to @rmustacc , I agree that the way this should be done is by generating a sysevent after the address has been assigned and finished DAD, the same way that links are in OS-4840 (TritonDataCenter/illumos-joyent@5dccc1e) and OS-4841 (4c1efa6). This would ensure that the information accurately reflects the system's configuration. This is really how we should be doing it right now for ip4addr, but we aren't, and it's a correctness issue. (For example, when using DHCP, your address could change After giving it some thought, I feel like we would want sysinfo to print out all addresses for that interface. If I get multiple addresses because the local network segment has multiple prefixes associated with it, that should be reflected somehow. The link-local address should probably also show up. (I feel that this is also true for IPv4, too, when there are multiple addresses.) Unfortunately, I haven't given too much thought to what multiple IPv4 and IPv6 addresses in the SDC admin network should look like, so I'm not yet sure if it's better to have two separate fields, like 'ip4addrs' and 'ip6addrs', or one field like 'ipaddrs'. I think that this PR represents several different issues that need to be fixed separately:
The paths for 1, 2, and 3 seem pretty straightforward, but I haven't thought of a good way to do the last one yet. |
For 4, can't sysevent also be used? Regenerate the hosts file everytime an ip gets added/removed? Perhaps this should be moved to an issue and the PR closed, as this sounds a lot above my skill level. |
@melloc any progress on this? |
summary
This PR further improved IPv6 support for compute nodes/smartos.
detailed explanation of changes
We give in.ndp time to stabilize, 3 seconds seems to be the sweet spot. (At least in my testing).
After that we update the sysinfo cache, when using addrconf or static IPv6 ndp will make some changes to the network. Like binding the allocated IPv6 address and updating the routes.
I chose not to pull in the sdc config into svc-ndp and just do the small 3 second delay regardless if we have admin_ip6 set or not. Although I am willing to change this if this is preferred to skip it or not.
Boot delay seemed to be none existing, probably due to smf starting some services in parallel.
ipaddr variable is renamed to ip4addr and ip6addr has been added. Additional properties for ipv6 addresses have been added. IPv6 info can now be queried like IPv4 info, this will be used later.
With the updated sysinfo we can now obtain the IPv6 address and also add host entries to /etc/hosts. This should allow sendmail to again resolve all it's own addresses.
The 3 second wait for sysinfo to stabilize here is optional as the CONFIG_ is available, we skip this when admin_ip6 is not set.
test data
/usbkey/config
/etc/hosts
output of sysinfo
/usbkey/config
/etc/hosts
output of sysinfo
/usbkey/config
/etc/hosts
output of sysinfo
test image
http://sjorge.sinners.be/illumos/joyent/platform-20151031T170124Z.iso
@melloc I guess I need to poke you for this