From: Sage Weil Date: Mon, 26 Apr 2021 13:00:11 +0000 (-0400) Subject: qa/tasks/cephadm.py: adjust client.admin key mode; place on all hosts X-Git-Tag: v16.2.5~39^2~4^2^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1825890b2eb167b0e1c016d51f407dbe8698399f;p=ceph.git 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) --- 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 f5441eb93e0a..2e551dd43910 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 e60b8872d9fb..fde68b32aa48 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 2af315930f29..983b4f3dc92b 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 c26119db5725..3c298bc03e97 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 1aa90967e2c2..74599e22d8df 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 a9cc1a039f9f..37a9335b33be 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),