From: Adam King Date: Mon, 6 Nov 2023 16:19:09 +0000 (-0500) Subject: qa/cephadm: adjust host drain test to handle explicit placement warning X-Git-Tag: v18.2.4~182^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0f2c0ad568065c796c38fc484b5666ce7cc602c2;p=ceph.git qa/cephadm: adjust host drain test to handle explicit placement warning Since we're adding a warning if any host is listed explicitly in the placement of any service when removing the host, we need to adjust the host drain test that removes a host without the --force flag to not have the explicit hostname in the placement for the mon service. Signed-off-by: Adam King (cherry picked from commit b4db5e4ffcf0fb345c99986718b16853f76b148a) --- diff --git a/qa/suites/orch/cephadm/workunits/task/test_host_drain.yaml b/qa/suites/orch/cephadm/workunits/task/test_host_drain.yaml index 83173c9f8b22e..c195bc052b7e3 100644 --- a/qa/suites/orch/cephadm/workunits/task/test_host_drain.yaml +++ b/qa/suites/orch/cephadm/workunits/task/test_host_drain.yaml @@ -28,6 +28,16 @@ tasks: HOST_C="${host}" fi done + # One last thing to worry about before draining the host + # is that the teuthology test tends to put the explicit + # hostnames in the placement for the mon service. + # We want to make sure we can drain without providing + # --force and there is a check for the host being removed + # being listed explicitly in the placements. Therefore, + # we should remove it from the mon placement. + ceph orch ls mon --export > mon.yaml + sed /"$HOST_C"/d mon.yaml > mon_adjusted.yaml + ceph orch apply -i mon_adjusted.yaml # now drain that host ceph orch host drain $HOST_C --zap-osd-devices # wait for drain to complete