From f4e7d33d173f6e1236af531fac8e7a2a2c27af53 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Fri, 19 Jun 2020 17:50:04 +0200 Subject: [PATCH] mgr/cephadm: make `orch status` fail, if ssh key is not set ceph-salt relies on the output of `orch status` to determine the end of the bootstrap process. Signed-off-by: Sebastian Wagner --- src/pybind/mgr/cephadm/module.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 8bdfe2bdbbc..4b247907ac8 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -674,7 +674,12 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): """ The cephadm orchestrator is always available. """ - return self.can_run() + ok, err = self.can_run() + if not ok: + return ok, err + if not self.ssh_key or not self.ssh_pub: + return False, 'SSH keys not set. Use `ceph cephadm set-priv-key` and `ceph cephadm set-pub-key` or `ceph cephadm generate-key`' + return True, '' def process(self, completions): """ -- 2.39.5