Test that bootstraps with a CA signed key using
the use_ca_signed_key cephadm override. Then follows
up by doing a check-host on each host which verifies
the cephadm mgr module can reach and authenticate with
the nodes using the new key setup.
This probably should really be a workunit, but
I didn't want to create a full new section for
this test and I needed a section that didn't
already run the cephadm task for every test. I could
see this being moved into some sort of
"test_special_deployment_scenarios" section in the future
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit
141af1c6b156da34418100629cd1407b74c681ad)
--- /dev/null
+roles:
+- - host.a
+ - mon.a
+ - mgr.a
+ - osd.0
+ - client.0
+- - host.b
+ - mon.b
+ - mgr.b
+ - osd.1
+ - client.1
+overrides:
+ cephadm:
+ use-ca-signed-key: True
+tasks:
+- install:
+- cephadm:
+- cephadm.shell:
+ host.a:
+ - |
+ set -ex
+ HOSTNAMES=$(ceph orch host ls --format json | jq -r '.[] | .hostname')
+ for host in $HOSTNAMES; do
+ # do a check-host on each host to make sure it's reachable
+ ceph cephadm check-host ${host} 2> ${host}-ok.txt
+ HOST_OK=$(cat ${host}-ok.txt)
+ if ! grep -q "Host looks OK" <<< "$HOST_OK"; then
+ printf "Failed host check:\n\n$HOST_OK"
+ exit 1
+ fi
+ done