Skip to content

Commit

Permalink
Don't return upgrade app status if upgrade in progress
Browse files Browse the repository at this point in the history
Fixes potential race condition on opensearch charm where upgrade status checked during initial startup
  • Loading branch information
carlcsaposs-canonical committed Apr 26, 2024
1 parent 094798e commit 3298a01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/machine_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def _get_unit_healthy_status(

@property
def app_status(self) -> typing.Optional[ops.StatusBase]:
if not self.in_progress:
return
if not self.is_compatible:
logger.info(
"Upgrade incompatible. If you accept potential *data loss* and *downtime*, you can continue by running `force-upgrade` action on each remaining unit"
Expand Down

0 comments on commit 3298a01

Please sign in to comment.