archive_path: /home/teuthworker/mnt/teuthology/adking-2026-02-21_19:52:04-orch:cephadm-wip-adk3-testing-2026-02-12-2007-distro-default-trial/62948 branch: wip-adk3-testing-2026-02-12-2007 description: orch:cephadm/workunits/{0-distro/centos_9.stream_runc agent/on mon_election/connectivity task/test_set_mon_crush_locations} email: adking@redhat.com first_in_suite: false flavor: default job_id: '62948' kernel: &id001 branch: distro kdb: 1 sha1: distro last_in_suite: false machine_type: trial name: adking-2026-02-21_19:52:04-orch:cephadm-wip-adk3-testing-2026-02-12-2007-distro-default-trial no_nested_subset: false os_type: centos os_version: 9.stream overrides: admin_socket: branch: wip-adk3-testing-2026-02-12-2007 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\) - MON_DOWN - POOL_APP_NOT_ENABLED - mon down - mons down - out of quorum - CEPHADM_FAILED_DAEMON log-only-match: - CEPHADM_ sha1: 042df16cd9ee8a8df553b188fef8a8c4a9e7ab01 ceph-deploy: conf: client: log file: /var/log/ceph/ceph-$name.$pid.log mon: {} install: ceph: flavor: default sha1: 042df16cd9ee8a8df553b188fef8a8c4a9e7ab01 selinux: allowlist: - scontext=system_u:system_r:logrotate_t:s0 workunit: branch: wip-adk3-testing-2026-02-19-2000 sha1: 8f51c35bf854479dcc229046453f0066d563cfe5 owner: scheduled_adking@soko04.front.sepia.ceph.com 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: 4054 sha1: 042df16cd9ee8a8df553b188fef8a8c4a9e7ab01 sleep_before_teardown: 0 subset: 1/20 suite: orch:cephadm suite_branch: wip-adk3-testing-2026-02-19-2000 suite_path: /home/teuthworker/src/github.com_adk3798_ceph_8f51c35bf854479dcc229046453f0066d563cfe5/qa suite_relpath: qa suite_repo: https://github.com/adk3798/ceph.git suite_sha1: 8f51c35bf854479dcc229046453f0066d563cfe5 targets: trial069.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMv8xDWjcbkLRHhkpHF4Gxd8dWm/kpvBp1Ltmr/lt4FGoaB9WQ240+Jnc5/KXAycKXH/ytZ2VKZwmew6sniz43k= trial096.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBL70LMrKMQloGGpQpgDmT9eNuKGjUOPTVFitQLyLriuj38KJIqpmEe1zcZOsOXgk4On9tyVAXYUy8YkdgcmVBuk= trial185.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFDSYjVfOluVMQzay0AXxOLI9y9GxTPaiMpV7nlyijlYlzl+v4M1OhxlwMdbLgsNJ20GuazrfW/Pq5+0ZV3aD60= tasks: - internal.check_packages: null - internal.buildpackages_prep: null - internal.save_config: null - internal.check_lock: null - internal.add_remotes: null - console_log: null - internal.connect: null - internal.push_inventory: null - internal.serialize_remote_roles: null - internal.check_conflict: null - internal.check_ceph_data: null - internal.vm_setup: null - kernel: *id001 - internal.base: null - internal.archive_upload: null - internal.archive: null - internal.coredump: null - internal.sudo: null - internal.syslog: null - internal.timer: null - pcp: null - selinux: null - ansible.cephlab: null - clock: null - pexec: all: - sudo dnf remove nvme-cli -y - sudo dnf install runc nvmetcli nvme-cli -y - sudo sed -i 's/^#runtime = "crun"/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\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\nceph mon dump --format json\n\ # verify all the crush locations got set from \"ceph mon dump\" output expecting\n\ # datacenter=a for mon a, datacenter=b, rack=2 for mon b, datacenter=a, rack=3\ \ for mon c\n# we loop over these files that tell us which mon, what crush key\ \ and what crush value to look for\n# checking mon with id: a, b, b, c, c\n\ echo $'a\\nb\\nb\\nc\\nc' > mon_ids\n# checking crush keys: datacenter, datacenter,\ \ rack, datacenter, rack\necho $'datacenter\\ndatacenter\\nrack\\ndatacenter\\\ nrack' > crush_keys\n# checking crush values: a, b, 2, a, 3\necho $'a\\nb\\\ n2\\na\\n3' > crush_values\n# The expected format for each mon in the mon dump\ \ output as of writing this is (under \"mons\" key)\n# {\n# \"rank\"\ : 1,\n# \"name\": \"b\",\n# \"public_addrs\": {\n# \"addrvec\": [\n\ # {\n# \"type\": \"v2\",\n# \"addr\": \"10.20.193.146:3300\"\ ,\n# \"nonce\": 0\n# },\n# {\n# \"type\": \"v1\"\ ,\n# \"addr\": \"10.20.193.146:6789\",\n# \"nonce\": 0\n# \ \ }\n# ]\n# },\n# \"addr\": \"10.20.193.146:6789/0\",\n# \"public_addr\"\ : \"10.20.193.146:6789/0\",\n# \"priority\": 0,\n# \"weight\": 0,\n# \"\ time_added\": \"2026-02-19T17:19:05:089735+0000\",\n# \"crush_location\":\ \ [\n# {\n# \"key\": \"datacenter\",\n# \"val\": \"b\"\n# \ \ },\n# {\n# \"key\": \"rack\",\n# \"val\": \"2\"\n# }\n\ # ]\n# },\nwhile read monid <&3 && read crush_key <&4; read crush_value <&5;\ \ do\n ceph mon dump --format json | jq --arg monid \"$monid\" --arg crush_key\ \ \"$crush_key\" --arg crush_value \"$crush_value\" -e '.mons | .[] | select(.name\ \ == $monid) | .crush_location | .[] | select(.key == $crush_key)'\n ceph mon\ \ dump --format json | jq --arg monid \"$monid\" --arg crush_key \"$crush_key\"\ \ --arg crush_value \"$crush_value\" -e '.mons | .[] | select(.name == $monid)\ \ | .crush_location | .[] | select(.key == $crush_key) | .val == $crush_value'\n\ done 3