keyfile: do not try to write out unvalidated YAML (LP: #1952967)#247
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #247 +/- ##
=======================================
Coverage 99.10% 99.10%
=======================================
Files 58 58
Lines 10038 10052 +14
=======================================
+ Hits 9948 9962 +14
Misses 90 90
Continue to review full report at Codecov.
|
7cbab24 to
008fdd2
Compare
…ue to missing fields
Fall back to using full passthrough mode ('nm-devices:') for now.
return FALSE and fill the passed GError if it does not succeed
008fdd2 to
ad389f1
Compare
schopin-pro
approved these changes
Jan 6, 2022
schopin-pro
left a comment
Contributor
There was a problem hiding this comment.
LGTM, although I wouldn't have expected this many different changes from the PR description. But then, who am I to talk 😉
There's only a small nitpick, but you can disregard it and merge if you feel like it.
Co-authored-by: Simon Chopin <simon.chopin@canonical.com>
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
netplan's keyfile parser can handle certain device types and settings from NM's keyfile format. But we should try to avoid writing out partial YAML where some (essential) fields are missing, as they cannot (yet) be properly parsed.
We need to check that during testing and ideally also at runtime, in order to fall back to the full passthrough mode, using the generic
nm-devicestype.FR-1898
Checklist
make checksuccessfully.make check-coverage).