From 9eef1bcced3e04fada1b64779c549239f4eb7670 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 19 Jan 2021 13:33:25 -0600 Subject: [PATCH] qa/suites/rados/cephadm/upgrade: avoid allow_ptrace with old cephadm 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 --- qa/suites/rados/cephadm/upgrade/1-start.yaml | 2 ++ qa/tasks/cephadm.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qa/suites/rados/cephadm/upgrade/1-start.yaml b/qa/suites/rados/cephadm/upgrade/1-start.yaml index 56d68ff55a08d..4016c951d7745 100644 --- a/qa/suites/rados/cephadm/upgrade/1-start.yaml +++ b/qa/suites/rados/cephadm/upgrade/1-start.yaml @@ -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 diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index 54887685e40d8..08d177b2ac1e6 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -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(): -- 2.39.5