From c6cabac2633587d1fa8d887cb30cda2f22c397f4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 4 Mar 2020 10:38:23 -0600 Subject: [PATCH] mgr/cephadm: populate new DaemonDescription timestamps Signed-off-by: Sage Weil --- src/pybind/mgr/cephadm/module.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index a3c768bdc29..65e4fee527c 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 -- 2.39.5