]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orch: include uptime in 'orch ps'
authorSage Weil <sage@redhat.com>
Wed, 4 Mar 2020 16:49:19 +0000 (10:49 -0600)
committerSage Weil <sage@redhat.com>
Thu, 5 Mar 2020 12:42:26 +0000 (06:42 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/orchestrator/module.py

index 74373d94c51bcf0c90de785cb5a7b30ab756b234..36143f90da47171273bc22f8b9e53bccb4469162 100644 (file)
@@ -406,6 +406,8 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule):
                     1: 'running',
                     None: '<unknown>'
                 }[s.status]
+                if s.status == 1 and s.started:
+                    status += ' (%s)' % to_pretty_timedelta(now - s.started)
 
                 def nice_delta(t, suffix=''):
                     if t: