From: Adam King Date: Mon, 19 Jun 2023 18:24:23 +0000 (-0400) Subject: qa/cephadm: test for extra daemon features X-Git-Tag: v17.2.8~494^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=edd0ea35ac707e115c3948c988801858323a0cee;p=ceph.git qa/cephadm: test for extra daemon features Specifically, extra_container_args, extra_entrypoint_args, and custom_configs. This also provides testing for the CustomContainer class which previously had no usage in any of the teuthology tests Signed-off-by: Adam King (cherry picked from commit 031bbbc17fda3c7b28b12d11b976629d8c1297ed) --- diff --git a/qa/suites/orch/cephadm/workunits/task/test_extra_daemon_features.yaml b/qa/suites/orch/cephadm/workunits/task/test_extra_daemon_features.yaml new file mode 100644 index 000000000000..b5e0ec98f323 --- /dev/null +++ b/qa/suites/orch/cephadm/workunits/task/test_extra_daemon_features.yaml @@ -0,0 +1,74 @@ +roles: +- - host.a + - mon.a + - mgr.a + - osd.0 +- - host.b + - mon.b + - mgr.b + - osd.1 +tasks: +- install: +- cephadm: +- exec: + all-hosts: + - mkdir /etc/cephadm_testing +- cephadm.apply: + specs: + - service_type: mon + placement: + host_pattern: '*' + extra_container_args: + - "--cpus=2" + extra_entrypoint_args: + - "--debug_ms 10" + - service_type: container + service_id: foo + placement: + host_pattern: '*' + spec: + image: "quay.io/fedora/fedora:latest" + entrypoint: "bash" + extra_container_args: + - "-v" + - "/etc/cephadm_testing:/root/cephadm_testing" + extra_entrypoint_args: + - "/root/write_thing_to_file.sh" + - "-c" + - "testing_custom_containers" + - "-o" + - "/root/cephadm_testing/testing.txt" + custom_configs: + - mount_path: "/root/write_thing_to_file.sh" + content: | + while getopts "o:c:" opt; do + case ${opt} in + o ) + OUT_FILE=${OPTARG} + ;; + c ) + CONTENT=${OPTARG} + esac + done + echo $CONTENT > $OUT_FILE + sleep infinity +- cephadm.wait_for_service: + service: mon +- cephadm.wait_for_service: + service: container.foo +- exec: + host.a: + - | + set -ex + FSID=$(/home/ubuntu/cephtest/cephadm shell -- ceph fsid) + sleep 60 + # check extra container and entrypoint args written to mon unit run file + grep "\-\-cpus=2" /var/lib/ceph/$FSID/mon.*/unit.run + grep "\-\-debug_ms 10" /var/lib/ceph/$FSID/mon.*/unit.run + # check that custom container properly wrote content to file. + # This requires the custom config, extra container args, and + # entrypoint args to all be working in order for this to have + # been written. The container entrypoint was set up with custom_configs, + # the content and where to write to with the entrypoint args, and the mounting + # of the /etc/cephadm_testing dir with extra container args + grep "testing_custom_containers" /etc/cephadm_testing/testing.txt