From 1c905dfcd53707c7641d781ed91ffb4971f7a5b8 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Thu, 5 Aug 2021 18:48:57 +1000 Subject: [PATCH] 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 --- src/pybind/mgr/cephadm/module.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.47.3