From: Tim Serong Date: Thu, 5 Aug 2021 08:48:57 +0000 (+1000) Subject: mgr/cephadm: pass --container-init to `cephadm deploy` if specified X-Git-Tag: v15.2.15~35^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42666%2Fhead;p=ceph.git mgr/cephadm: pass --container-init to `cephadm deploy` if specified This (sort of) reverts a small part of 442904bf2da, in order to work correctly with 82d30afc413. The problem is that the latter commit sets CONTAINER_INIT=False, which means we need to explicitly pass --container-init to cephadm if we want that behaviour turned on. There's a kink though: --container-init is only valid with cephadm's "adopt", "bootstrap" and "deploy" commands; it's not a global option. The cephadm mgr module doesn't invoke "adopt" or "bootstrap", only "deploy", so we're only setting it in that specific case. Fixes: https://tracker.ceph.com/issues/52064 Signed-off-by: Tim Serong --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 989a30fca56..27fd5ddc32f 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1123,6 +1123,9 @@ To check that the host is reachable: if not no_fsid: final_args += ['--fsid', self._cluster_fsid] + if self.container_init and command == 'deploy': + final_args += ['--container-init'] + final_args += args # exec