From 1825890b2eb167b0e1c016d51f407dbe8698399f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 26 Apr 2021 09:00:11 -0400 Subject: [PATCH] qa/tasks/cephadm.py: adjust client.admin key mode; place on all hosts Except during upgrades, since it is not supported there. Signed-off-by: Sage Weil (cherry picked from commit b0dcaf2cfa02be0695ec8be4cadeaee465a5b2fb) --- .../1-start-distro/1-start-centos_8.3-octopus.yaml | 1 + .../1-start-distro/1-start-ubuntu_20.04-15.2.9.yaml | 1 + .../upgrade/1-start-distro/1-start-ubuntu_20.04.yaml | 1 + qa/suites/upgrade/octopus-x/parallel/1-tasks.yaml | 1 + .../upgrade/octopus-x/stress-split/1-start.yaml | 1 + qa/tasks/cephadm.py | 12 ++++++++++++ 6 files changed, 17 insertions(+) diff --git a/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-centos_8.3-octopus.yaml b/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-centos_8.3-octopus.yaml index f5441eb93e0a6..2e551dd439106 100644 --- a/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-centos_8.3-octopus.yaml +++ b/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-centos_8.3-octopus.yaml @@ -14,6 +14,7 @@ tasks: allow_ptrace: false # deploy additional mons the "old" (octopus) way add_mons_via_daemon_add: true + avoid_pacific_features: true roles: diff --git a/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04-15.2.9.yaml b/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04-15.2.9.yaml index e60b8872d9fbb..fde68b32aa484 100644 --- a/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04-15.2.9.yaml +++ b/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04-15.2.9.yaml @@ -10,6 +10,7 @@ tasks: allow_ptrace: false # deploy additional mons the "old" (octopus) way add_mons_via_daemon_add: true + avoid_pacific_features: true roles: - - mon.a diff --git a/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04.yaml b/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04.yaml index 2af315930f29e..983b4f3dc92bf 100644 --- a/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04.yaml +++ b/qa/suites/rados/cephadm/upgrade/1-start-distro/1-start-ubuntu_20.04.yaml @@ -10,6 +10,7 @@ tasks: allow_ptrace: false # deploy additional mons the "old" (octopus) way add_mons_via_daemon_add: true + avoid_pacific_features: true roles: - - mon.a diff --git a/qa/suites/upgrade/octopus-x/parallel/1-tasks.yaml b/qa/suites/upgrade/octopus-x/parallel/1-tasks.yaml index c26119db5725d..3c298bc03e97b 100644 --- a/qa/suites/upgrade/octopus-x/parallel/1-tasks.yaml +++ b/qa/suites/upgrade/octopus-x/parallel/1-tasks.yaml @@ -14,6 +14,7 @@ tasks: osd_class_default_list: "*" # deploy additional mons the "old" (octopus) way add_mons_via_daemon_add: true + avoid_pacific_features: true - print: "**** done end installing octopus cephadm ..." - cephadm.shell: diff --git a/qa/suites/upgrade/octopus-x/stress-split/1-start.yaml b/qa/suites/upgrade/octopus-x/stress-split/1-start.yaml index 1aa90967e2c22..74599e22d8df6 100644 --- a/qa/suites/upgrade/octopus-x/stress-split/1-start.yaml +++ b/qa/suites/upgrade/octopus-x/stress-split/1-start.yaml @@ -13,6 +13,7 @@ tasks: osd_class_default_list: "*" # deploy additional mons the "old" (octopus) way add_mons_via_daemon_add: true + avoid_pacific_features: true - cephadm.shell: mon.a: diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index a9cc1a039f9f3..37a9335b33bee 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -397,6 +397,8 @@ def ceph_bootstrap(ctx, config): cmd += ['--skip-monitoring-stack'] if config.get('single_host_defaults'): cmd += ['--single-host-defaults'] + if not config.get('avoid_pacific_features', False): + cmd += ['--skip-admin-label'] # bootstrap makes the keyring root 0600, so +r it for our purposes cmd += [ run.Raw('&&'), @@ -437,10 +439,20 @@ def ceph_bootstrap(ctx, config): _shell(ctx, cluster_name, bootstrap_remote, ['ceph', 'config', 'set', 'mgr', 'mgr/cephadm/allow_ptrace', 'true']) + if not config.get('avoid_pacific_features', False): + log.info('Distributing conf and client.admin keyring to all hosts + 0755') + _shell(ctx, cluster_name, bootstrap_remote, + ['ceph', 'orch', 'client-keyring', 'set', 'client.admin', + '*', '--mode', '0755'], + check_status=False) + # add other hosts for remote in ctx.cluster.remotes.keys(): if remote == bootstrap_remote: continue + + # note: this may be redundant (see above), but it avoids + # us having to wait for cephadm to do it. log.info('Writing (initial) conf and keyring to %s' % remote.shortname) remote.write_file( path='/etc/ceph/{}.conf'.format(cluster_name), -- 2.39.5