]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: pass --container-init to `cephadm deploy` if specified 42666/head
authorTim Serong <tserong@suse.com>
Thu, 5 Aug 2021 08:48:57 +0000 (18:48 +1000)
committerTim Serong <tserong@suse.com>
Wed, 11 Aug 2021 04:49:10 +0000 (14:49 +1000)
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 <tserong@suse.com>
src/pybind/mgr/cephadm/module.py

index 989a30fca5678973663f133be9f4bd0a387ca326..27fd5ddc32ff6c2d590934acf8c3b1bec76e5ce2 100644 (file)
@@ -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