Detect and backup conflicting netplan configuration files for netremote-config-netplan package #262
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}/netplan
per netplan documentation by appending the file name with a timestamp and the.bak
extension suffix. Eg./etc/netplan/10-network-netremote-all.yaml
->/etc/netplan/10-network-netremote-all.yaml.20240510-054348.bak
.10-network-netremote-all-template.yaml
to10-network-netremote-all.yaml
and install it to/etc/netplan
as10-network-netremote-all.yaml.template
(note the.template
suffix) 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.yaml
files to all of/etc/netplan
,/lib/netplan
, and/run/netplan
, installed thenetremote-config-netplan.deb
package, applied the generated netplan configuration, and verified the expected output (bridge created, IP address obtained, connectivity maintained).Reviewer Focus
Future Work
Checklist
all
compiles cleanly.