Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: fix crash on LibNetplanException #286

Merged
merged 3 commits into from
Jul 26, 2022
Merged

cli: fix crash on LibNetplanException #286

merged 3 commits into from
Jul 26, 2022

Conversation

slyon
Copy link
Collaborator

@slyon slyon commented Jul 6, 2022

Description

Catch exception on config error (LibNetplanException from the libnetplan YAML parser) to exit gracefully on error, without applying any configuration. Display the parsing error on stderr.

As observed via https://errors.ubuntu.com/problem/2f11b72a6028059267c77dc94cfd3c4028cf58ac

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

@slyon slyon marked this pull request as ready for review July 20, 2022 16:20
@slyon slyon requested a review from sil2100 July 21, 2022 07:54
Copy link

@dbungert dbungert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is my first view of the netplan code I'm not certain about the feedback, but I have a couple questions to consider.

netplan/cli/commands/try_command.py Outdated Show resolved Hide resolved
@slyon
Copy link
Collaborator Author

slyon commented Jul 26, 2022

Thanks for your feedback @dbungert!

I think I addressed all of your comments. Is there anything to add from your side? IMO this is ready to be merged.

@slyon slyon requested a review from dbungert July 26, 2022 09:01
Copy link

@dbungert dbungert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@slyon slyon merged commit e11e0ac into main Jul 26, 2022
@slyon slyon deleted the slyon/error.u.c-crash branch July 26, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants