This repository has been archived by the owner on Nov 11, 2021. It is now read-only.
Debian: avoid misconfigured interfaces on up/down script errors #312
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.
In Debian, if you bring up dual-stack interfaces, the pre/post-up/down
scripts are run on the configuration of each stack. I.e. if you bring up
the IPv4 config on an interface, the ifupdown scripts launch scripts in
the post-up directory. These scripts are common for IPv4 and IPv6 in current
version of puppet-network. At the moment IPv6 is not yet configured, but
IPv6 commands are called - and fail. If an IPv6 command (e.g.
ip -6 route add
)is the last one in the post-up script, the overall post-up script fails.
When the post-up script fails when bringing up the IPv4 configuration,
ifupdown no longer attempts to bring up the IPv6 configuration on that
interface and leaves the interface misconfigured (IPv4 is configured,
IPv6 is not).
This situation can be avoided by adding the
exit 0
command at the veryend of the script files. It is okay if the IPv6 commands in the common script
fail when only IPv4 is brought up, as ifupdown will re-run them after
IPv6 is brought up.
Before submitting your PR
puppet-lint
on your code and ensure it's compliantAfter submitting your PR