984 dockerinit should support link-local routes #986
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello-
Details of the situation this aims to correct are described in #984. A previous patch for native zones was proposed and merged through issue illumos-joyent#244. This change is not cstyle clean, though it doesn't appear to be a cstyle'd source file.
Synopsis of change:
Some testing notes:
I have a few nodes at OVH that use "failover" ip addresses. These addresses are handed out on a CIDR subnet different than the admin network. The default route, however, is that of the default network. So a link-local route needs to be created before the default route. That's the rationale for this change.
I've been using this patch on a number docker/lx zones across multiple hosts for the past year. These zones require the link local route to be created first as the default route is on the link-local network (that isn't the same as the IP address of the interface.) Without the patch, creating the default route fails with a "no route to host" error (and the zone provisioning fails after a time), but is successful with the patch.
I've also been running platform images with this fix on multiple systems that don't have static routes at all, and these all work as expected with the the patch.
Additionally, on a dummy test system, I created a simnet device and assigned a nic tag to that. I then created a series of lx/docker zones using vmadm with 2 nics each and the following combinations of routes. I used a random docker image that I already had available and used zlogin to examine the state of the routes:
These all seemed to work just fine, in that:
I'm happy to provide any additional details you think would be helpful. Looking forward to your feedback!