From 6a7c2015bfab5ecd9186c84c4a413c9d2cce4f36 Mon Sep 17 00:00:00 2001 From: Jack Lloyd-Walters Date: Tue, 8 Oct 2024 13:52:54 +0100 Subject: [PATCH] maas/MAAS --- maas-agent/src/charm.py | 1 - maas-agent/src/helper.py | 4 ++-- maas-region/src/charm.py | 1 - maas-region/src/helper.py | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/maas-agent/src/charm.py b/maas-agent/src/charm.py index 2ad62c8..6e0be70 100755 --- a/maas-agent/src/charm.py +++ b/maas-agent/src/charm.py @@ -158,7 +158,6 @@ def _on_upgrade(self, _event: ops.UpgradeCharmEvent) -> None: if current := MaasHelper.get_installed_channel(): if current > MAAS_SNAP_CHANNEL: msg = f"Cannot downgrade {current} to {MAAS_SNAP_CHANNEL}" - # XXX: It looks like ErrorStatus is not valid in the version of Juju used by maas-charms self.unit.status = ops.BlockedStatus(msg) logger.exception(msg) return diff --git a/maas-agent/src/helper.py b/maas-agent/src/helper.py index 8f49f60..efc2c78 100644 --- a/maas-agent/src/helper.py +++ b/maas-agent/src/helper.py @@ -19,10 +19,10 @@ def _join_cohort_(maas: Snap) -> str: - """Join the maas snap cohort if not part of it already. + """Join the MAAS snap cohort if not part of it already. Args: - maas (Snap): Instance of maas snap. + maas (Snap): Instance of MAAS snap. """ if _cohort := re.match(r"cohort:\s*([^\n]+)", maas._snap("info", ["--verbose"])): cohort = _cohort.group(1) diff --git a/maas-region/src/charm.py b/maas-region/src/charm.py index 75dd8d0..6855c22 100755 --- a/maas-region/src/charm.py +++ b/maas-region/src/charm.py @@ -355,7 +355,6 @@ def _on_upgrade_charm(self, _event: ops.UpgradeCharmEvent) -> None: if current := MaasHelper.get_installed_channel(): if current > MAAS_SNAP_CHANNEL: msg = f"Cannot downgrade {current} to {MAAS_SNAP_CHANNEL}" - # XXX: It looks like ErrorStatus is not valid in the version of Juju used by maas-charms self.unit.status = ops.BlockedStatus(msg) logger.exception(msg) return diff --git a/maas-region/src/helper.py b/maas-region/src/helper.py index 9a242fc..796dab8 100644 --- a/maas-region/src/helper.py +++ b/maas-region/src/helper.py @@ -19,10 +19,10 @@ def _join_cohort_(maas: Snap) -> str: - """Join the maas snap cohort if not part of it already. + """Join the MAAS snap cohort if not part of it already. Args: - maas (Snap): Instance of maas snap. + maas (Snap): Instance of MAAS snap. """ if _cohort := re.match(r"cohort:\s*([^\n]+)", maas._snap("info", ["--verbose"])): cohort = _cohort.group(1)