Skip to content

Commit

Permalink
Adjust --redeploy vs. missing configuration.
Browse files Browse the repository at this point in the history
Let's help support upgrades on existing systems (without pirogue-admin
integration):
 - Tone down the logging from error to warning.
 - Exit with rc=0 instead of rc=1.

Link: #21
  • Loading branch information
CyrilBrulebois committed Sep 7, 2024
1 parent 3c1dd0a commit a01e841
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions pirogue-admin/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
pirogue-admin (1.4.2) UNRELEASED; urgency=medium

* Adjust --redeploy vs. missing configuration file to help support
upgrades on existing systems (without pirogue-admin integration):
- Tone down the logging from error to warning.
- Exit with rc=0 instead of rc=1.

-- Cyril Brulebois <[email protected]> Sat, 07 Sep 2024 15:47:16 +0200

pirogue-admin (1.4.1) bookworm; urgency=medium

* Extend support for NetworkManager, when the isolated interface is an
Expand Down
4 changes: 2 additions & 2 deletions pirogue-admin/pirogue_admin/cmd/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ def apply_configuration(c_ctx: ConfigurationContext, in_fd: TextIO, redeploy=Fal
if not current_config_path.exists():
# Alternatively, we could go for a noisy no-op, but we should never get
# a request to redeploy if there's no configuration in the first place!
logging.error('Cannot redeploy, no configuration file stored!')
sys.exit(1)
logging.warning('Cannot redeploy, no configuration file stored!')
sys.exit(0)
in_fd = current_config_path.open('r') # pylint: disable=consider-using-with
else:
if in_fd is None:
Expand Down

0 comments on commit a01e841

Please sign in to comment.