From: Sage Weil Date: Wed, 4 Mar 2020 16:38:23 +0000 (-0600) Subject: mgr/cephadm: populate new DaemonDescription timestamps X-Git-Tag: v15.1.1~103^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c6cabac2633587d1fa8d887cb30cda2f22c397f4;p=ceph.git mgr/cephadm: populate new DaemonDescription timestamps Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index a3c768bdc29a..65e4fee527c3 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -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