Add script which prevents XRd from having multiple IPv6 addresses on mgmt interface #2295
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.
Closes #2277.
This PR adds a basic script which removes all IPv6 address from the management interface (MgmtEth0/RP0/CPU0/0), and then assigns the correct management IPv6 address according to clab.
This fixes a problem that users have reported having of 'incorrect device mapping to ip address'. No work is required for IPv4 as the management interface is only allowed a single IPv4 address and XRd automatically overwrites the old one.
XR_EVERY_BOOT_SCRIPT
points to the path to the script on the containers filesystem. When this env var is populated XRd runs the script at that path on well.. every boot 😀.createXRDFiles()
function, so that docker doesn't automatically create a folder for the bind mount. ACLs are also edited on the file since XR needs the file to be executable.I've tested and ensured the script is working as it should and confirmed that without the script i'm getting the duplicate address behaviour.