Implement YAML state tracking and use it in the DBus API and netplan-try (LP: #1943120) (FR-1745)#231
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #231 +/- ##
=======================================
Coverage 99.04% 99.05%
=======================================
Files 57 57
Lines 9524 9592 +68
=======================================
+ Hits 9433 9501 +68
Misses 91 91
Continue to review full report at Codecov.
|
300ff5c to
3f859f0
Compare
schopin-pro
approved these changes
Sep 27, 2021
Contributor
schopin-pro
left a comment
There was a problem hiding this comment.
I have a few non-blocking nitpicks but all in all LGTM.
Have you run the integration tests?
Contributor
Author
|
Thanks for your feedback. I've made the As this have only been nitpicks and the integration tests are passing (incl. the new one that explicitly checks for this case), too, let's get this merged. |
5 tasks
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.
Description
Allow to pass an optional
--stateparameter tonetplan try/applydescribing a directory that contains a netplan configuration tree/state (i.e./{etc,run,lib}/netplan/*.yaml).Netplan will make use of this "old state" to calculate the delta of dropped interface definitions, like bridges/bonds/vlans/tunnels that have been configured before but are not part of the current YAML configuration anymore. It will then try to delete those virtual interfaces (via
ip link del dev IFACE) if they still exist.The same functionality is used to roll back a
netplan trycommand that failed or was rejected.Generally, the state needs to be provided manually. The DBus API (using io.netplan.Netplan.Config.Try/Apply) is an exception, as the previous state can be backed up automatically in this case.
Checklist
make checksuccessfully.make check-coverage).