description: orch:cephadm/workunits/{0-distro/centos_9.stream_runc agent/on mon_election/connectivity task/test_set_mon_crush_locations} duration: 519.9987280368805 failure_reason: 'Command failed on trial049 with status 1: ''sudo /home/ubuntu/cephtest/cephadm --image quay.ceph.io/ceph-ci/ceph:f8acada04a9facc6b0d4adc891b97eb878425a98 shell -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring --fsid e849371f-0c2f-11f1-88c2-d404e6e7d460 -- bash -c \''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\nceph 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\''"\''"\''\ndone 3