]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: populate new DaemonDescription timestamps
authorSage Weil <sage@redhat.com>
Wed, 4 Mar 2020 16:38:23 +0000 (10:38 -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/cephadm/module.py

index a3c768bdc29a5161876483554966782a09db35e1..65e4fee527c339bdafa67782f92f2a8eba3854ef 100644 (file)
@@ -1600,6 +1600,10 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule):
                 continue
             sd = orchestrator.DaemonDescription()
             sd.last_refresh = datetime.datetime.utcnow()
+            for k in ['created', 'started', 'last_configured', 'last_deployed']:
+                v = d.get(k, None)
+                if v:
+                    setattr(sd, k, datetime.datetime.strptime(d[k], DATEFMT))
             sd.daemon_type = d['name'].split('.')[0]
             sd.daemon_id = '.'.join(d['name'].split('.')[1:])
             sd.hostname = host