archive_path: /home/teuthworker/archive/adking-2023-12-01_16:31:41-orch:cephadm-wip-adk4-centos-9-orch-2023-12-01-0902-distro-default-smithi/7474189 branch: wip-adk4-centos-9-orch-2023-12-01-0902 description: orch:cephadm/workunits/{0-distro/centos_9.stream_crun agent/on mon_election/connectivity task/test_set_mon_crush_locations} email: adking@redhat.com first_in_suite: false job_id: '7474189' kernel: kdb: true sha1: distro last_in_suite: false machine_type: smithi name: adking-2023-12-01_16:31:41-orch:cephadm-wip-adk4-centos-9-orch-2023-12-01-0902-distro-default-smithi no_nested_subset: false nuke-on-error: true os_type: centos os_version: 9.stream overrides: admin_socket: branch: wip-adk4-centos-9-orch-2023-12-01-0902 ceph: conf: global: mon election default strategy: 3 mgr: debug mgr: 20 debug ms: 1 mgr/cephadm/use_agent: true mon: debug mon: 20 debug ms: 1 debug paxos: 20 osd: debug ms: 1 debug osd: 20 flavor: default log-ignorelist: - \(MDS_ALL_DOWN\) - \(MDS_UP_LESS_THAN_MAX\) sha1: 790ec80fe8c70e17748ed7354bfa28637b894703 ceph-deploy: conf: client: log file: /var/log/ceph/ceph-$name.$pid.log mon: {} install: ceph: flavor: default sha1: 790ec80fe8c70e17748ed7354bfa28637b894703 selinux: whitelist: - scontext=system_u:system_r:logrotate_t:s0 workunit: branch: wip-adk4-centos-9-orch-2023-12-01-0902 sha1: 790ec80fe8c70e17748ed7354bfa28637b894703 owner: scheduled_adking@teuthology priority: 80 repo: https://git.ceph.com/ceph-ci.git roles: - - host.a - osd.0 - mon.a - mgr.a - - host.b - osd.1 - mon.b - mgr.b - - host.c - osd.2 - mon.c seed: 9727 sha1: 790ec80fe8c70e17748ed7354bfa28637b894703 sleep_before_teardown: 0 subset: 1/14 suite: orch:cephadm suite_branch: wip-adk4-centos-9-orch-2023-12-01-0902 suite_path: /home/teuthworker/src/git.ceph.com_ceph-c_790ec80fe8c70e17748ed7354bfa28637b894703/qa suite_relpath: qa suite_repo: https://git.ceph.com/ceph-ci.git suite_sha1: 790ec80fe8c70e17748ed7354bfa28637b894703 targets: smithi006.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGs2twdEjG5ewN5A1P89hJFcmMbmfStrp+YPQOkPJwW148B3am4BEymDHH3hh7wo6SfBK+8iv88F0RGvIATQaIU= smithi141.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPV77XxKQCMw5RFoKRYPqFHxzHWPQUFgejAa2cvQjqhsDvXlDwwTilQRF5WaZBtxyKy8mBc4Twt6QvZLE2wpx6g= smithi184.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGkNHMqfh1wg2hHBia1wjjhlNhRhWHw+BgJ7Mqj3rOsMP8fbDlvWwlPBUm9PN4Da3HDCDfLyn2IxPL3Osa8oeA4= tasks: - pexec: all: - sudo sed -i 's/runtime = "runc"/#runtime = "runc"/g' /usr/share/containers/containers.conf - sudo sed -i 's/#runtime = "crun"/runtime = "crun"/g' /usr/share/containers/containers.conf - install: null - cephadm: null - cephadm.apply: specs: - placement: count: 3 service_id: foo service_type: mon spec: crush_locations: host.a: - datacenter=a host.b: - datacenter=b - rack=2 host.c: - datacenter=a - rack=3 - cephadm.shell: host.a: - "set -ex\n# since we don't know the real hostnames before the test, the next\n\ # bit is in order to replace the fake hostnames \"host.a/b/c\" with\n# the actual\ \ names cephadm knows the host by within the mon spec\nceph orch host ls --format\ \ json | jq -r '.[] | .hostname' > realnames\necho $'host.a\\nhost.b\\nhost.c'\ \ > fakenames\necho $'a\\nb\\nc' > mon_ids\necho $'{datacenter=a}\\n{datacenter=b,rack=2}\\\ n{datacenter=a,rack=3}' > crush_locs\nceph orch ls --service-name mon --export\ \ > mon.yaml\nMONSPEC=`cat mon.yaml`\necho \"$MONSPEC\"\nwhile read realname\ \ <&3 && read fakename <&4; do\n MONSPEC=\"${MONSPEC//$fakename/$realname}\"\ \ndone 3 mon.yaml\ncat mon.yaml\n\ # now the spec should have the real hostnames, so let's re-apply\nceph orch\ \ apply -i mon.yaml\nsleep 90\nceph orch ps --refresh\nceph orch ls --service-name\ \ mon --export > mon.yaml; ceph orch apply -i mon.yaml\nsleep 90\nceph mon dump\n\ ceph mon dump --format json\n# verify all the crush locations got set from \"\ ceph mon dump\" output\nwhile read monid <&3 && read crushloc <&4; do\n ceph\ \ mon dump --format json | jq --arg monid \"$monid\" --arg crushloc \"$crushloc\"\ \ -e '.mons | .[] | select(.name == $monid) | .crush_location == $crushloc'\n\ done 3