Skip to content

Commit

Permalink
Merge pull request ceph#46517 from guits/cephadm-upgrade-status-is_pa…
Browse files Browse the repository at this point in the history
…used

cephadm: add 'is_paused' field in orch status output

Reviewed-by: Adam King <[email protected]>
Reviewed-by: Michael Fritch <[email protected]>
  • Loading branch information
adk3798 authored Jun 8, 2022
2 parents cf2fdca + de1c428 commit 0de9173
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/pybind/mgr/cephadm/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def upgrade_status(self) -> orchestrator.UpgradeStatusSpec:
r.target_image = self.target_image
r.in_progress = True
r.progress, r.services_complete = self._get_upgrade_info()
r.is_paused = self.upgrade_state.paused

if self.upgrade_state.daemon_types is not None:
which_str = f'Upgrading daemons of type(s) {",".join(self.upgrade_state.daemon_types)}'
Expand Down
1 change: 1 addition & 0 deletions src/pybind/mgr/orchestrator/_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ def __init__(self) -> None:
self.which: str = '<unknown>' # for if user specified daemon types, services or hosts
self.progress: Optional[str] = None # How many of the daemons have we upgraded
self.message = "" # Freeform description
self.is_paused: bool = False # Is the upgrade paused?


def handle_type_error(method: FuncT) -> FuncT:
Expand Down
1 change: 1 addition & 0 deletions src/pybind/mgr/orchestrator/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,7 @@ def _upgrade_status(self) -> HandleCommandResult:
'services_complete': status.services_complete,
'progress': status.progress,
'message': status.message,
'is_paused': status.is_paused,
}
out = json.dumps(r, indent=4)
return HandleCommandResult(stdout=out)
Expand Down

0 comments on commit 0de9173

Please sign in to comment.