From: Sebastian Wagner Date: Fri, 19 Jun 2020 15:50:04 +0000 (+0200) Subject: mgr/cephadm: make `orch status` fail, if ssh key is not set X-Git-Tag: v16.1.0~1974^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f4e7d33d173f6e1236af531fac8e7a2a2c27af53;p=ceph.git 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 --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 8bdfe2bdbbcc..4b247907ac83 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): """