description: rados/cephadm/workunits/{0-distro/ubuntu_22.04 agent/on mon_election/connectivity task/test_set_mon_crush_locations} duration: 642.9298639297485 failure_reason: 'Command failed on trial053 with status 1: ''sudo /home/ubuntu/cephtest/cephadm --image quay.ceph.io/ceph-ci/ceph:03ef619e79a56cd363b087a5c6f19a1a09b49040 shell -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring --fsid 153c59d0-0b9c-11f1-8262-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