From 785348203b6a6cab923c05e26789ef6b98367051 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 1 Mar 2020 08:27:11 -0600 Subject: [PATCH] mgr/cephadm: orch ls: include specs with no daemons This way you see entries like NAME RUNNING REFRESHED IMAGE NAME IMAGE ID SPEC mds.foo 0/1 - present before any daemons have been created. Signed-off-by: Sage Weil --- src/pybind/mgr/cephadm/module.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 4ab57b8be10..03379137179 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1688,6 +1688,15 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): sm[n].container_image_id = 'mix' if sm[n].container_image_name != dd.container_image_name: sm[n].container_image_name = 'mix' + for n, spec in self.spec_store.specs.items(): + if n in sm: + continue + sm[n] = orchestrator.ServiceDescription( + service_name=n, + spec_presence='present', + size=self._get_spec_size(spec), + running=0, + ) return trivial_result([s for n, s in sm.items()]) def list_daemons(self, daemon_type=None, daemon_id=None, -- 2.39.5