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: v17.1.0~2123^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0dcaf2cfa02be0695ec8be4cadeaee465a5b2fb;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 --- 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 b6bf1304fd22..ffa82cc522d6 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 432780592bfb..7f01004a671e 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 f7113a6cad83..1092823a185a 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -395,6 +395,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('&&'), @@ -435,10 +437,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),