]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: add 'is_paused' field in orch status output 46517/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 3 Jun 2022 15:16:54 +0000 (17:16 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 7 Jun 2022 07:54:02 +0000 (09:54 +0200)
it can be convenient for automation tool if `orch status` output reports
whether the upgrade is currently paused.

Fixes: https://tracker.ceph.com/issues/55843
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
src/pybind/mgr/cephadm/upgrade.py
src/pybind/mgr/orchestrator/_interface.py
src/pybind/mgr/orchestrator/module.py

index d1b3c098ff77ba37de198a0b15a1de51b6f43534..baa3cce161ccd95e16e869e7b31c9aa513f4d397 100644 (file)
@@ -147,6 +147,7 @@ class CephadmUpgrade:
             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)}'
index b0ccf73570b7772f4d2957efea31d50e69c6886d..c9414d797bb25d4eafdb9edfa4bd0e8c2b9d89ba 100644 (file)
@@ -783,6 +783,7 @@ class UpgradeStatusSpec(object):
         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:
index a18d1ca4f379976f7075f72e4f75447ff9de50de..0dd5c23f71248394ea39ec8d9ad3bd819acaaf6d 100644 (file)
@@ -1421,6 +1421,7 @@ Usage:
             '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)