]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/suites/rados/cephadm/upgrade: avoid allow_ptrace with old cephadm 38974/head
authorSage Weil <sage@newdream.net>
Tue, 19 Jan 2021 19:33:25 +0000 (13:33 -0600)
committerSage Weil <sage@newdream.net>
Wed, 20 Jan 2021 22:40:17 +0000 (16:40 -0600)
Older cephadm is not smart enough to not combine --cap-add=SYS_PTRACE
and --privileged, which some version of podman cannot handle.

For upgrades, leave off the allow_ptrace behavior since we may be starting
on one of those old versions.

See also https://tracker.ceph.com/issues/46429

Fixes: https://tracker.ceph.com/issues/48142
Signed-off-by: Sage Weil <sage@newdream.net>
qa/suites/rados/cephadm/upgrade/1-start.yaml
qa/tasks/cephadm.py

index 56d68ff55a08dc83837418be31ce98498f0f4d4d..4016c951d7745c5f49bb80b009150acfc0dce2d7 100644 (file)
@@ -2,3 +2,5 @@ tasks:
 - cephadm:
     image: docker.io/ceph/ceph:v15.2.0
     cephadm_branch: v15.2.0
+    # avoid --cap-add=PTRACE + --privileged for older cephadm versions
+    allow_ptrace: false
index 54887685e40d863ea01d6c4f89e565c69020df27..08d177b2ac1e6fbb6dba1892f73ba0faac27f556 100644 (file)
@@ -402,8 +402,9 @@ def ceph_bootstrap(ctx, config, registry):
             'sudo chmod 0600 /root/.ssh/authorized_keys')
 
         # set options
-        _shell(ctx, cluster_name, bootstrap_remote,
-               ['ceph', 'config', 'set', 'mgr', 'mgr/cephadm/allow_ptrace', 'true'])
+        if config.get('allow_ptrace', True):
+            _shell(ctx, cluster_name, bootstrap_remote,
+                   ['ceph', 'config', 'set', 'mgr', 'mgr/cephadm/allow_ptrace', 'true'])
 
         # add other hosts
         for remote in ctx.cluster.remotes.keys():