Skip to content

Commit

Permalink
maas/MAAS
Browse files Browse the repository at this point in the history
  • Loading branch information
SK1Y101 committed Oct 8, 2024
1 parent a0e5ff1 commit 6a7c201
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion maas-agent/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions maas-agent/src/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion maas-region/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions maas-region/src/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6a7c201

Please sign in to comment.