Detect and backup conflicting netplan configuration files for netremote-config-netplan package#262
Merged
Merged
Conversation
f0bc70a to
b93885f
Compare
b93885f to
8962149
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type
Side Effects
Goals
Technical Details
Netplan cli tooling handles conflicting configuration in multiple yaml files by wholly deleting conflicting sections without any notice. Some distributions come with canned netplan configuration, such as that provided by cloud-init for ubuntu 23.10 (mantic). As such, incorporation of our generated netplan configuration files can fail due to pre-existing netplan configuration.
/{etc,lib,run}/netplanper netplan documentation by appending the file name with a timestamp and the.bakextension suffix. Eg./etc/netplan/10-network-netremote-all.yaml->/etc/netplan/10-network-netremote-all.yaml.20240510-054348.bak.10-network-netremote-all-template.yamlto10-network-netremote-all.yamland install it to/etc/netplanas10-network-netremote-all.yaml.template(note the.templatesuffix) such that it is not considered for inclusion in netplan configuration processing.NETPLAT_CONFIGURATION_FILE_REVIEW_SECONDS-> NETPLAN_CONFIGURATION_FILE_REVIEW_SECONDS,NETPLAT_CONFIGURATION_FILE_REVIEW_SECONDS_DEBUG-> NETPLAN_CONFIGURATION_FILE_REVIEW_SECONDS_DEBUG.Test Results
.yml.and.yamlfiles to all of/etc/netplan,/lib/netplan, and/run/netplan, installed thenetremote-config-netplan.debpackage, applied the generated netplan configuration, and verified the expected output (bridge created, IP address obtained, connectivity maintained).Reviewer Focus
Future Work
Checklist
allcompiles cleanly.