archive_path: /home/teuthworker/archive/gabrioux-2023-07-26_05:19:21-orch:cephadm-wip-guits-testing-2023-07-25-0942-distro-default-smithi/7352730 branch: wip-guits-testing-2023-07-25-0942 description: orch:cephadm/workunits/{0-distro/centos_8.stream_container_tools_crun agent/on mon_election/connectivity task/test_set_mon_crush_locations} email: gabrioux@redhat.com first_in_suite: false job_id: '7352730' kernel: kdb: true sha1: distro last_in_suite: false machine_type: smithi name: gabrioux-2023-07-26_05:19:21-orch:cephadm-wip-guits-testing-2023-07-25-0942-distro-default-smithi no_nested_subset: false nuke-on-error: true os_type: centos os_version: 8.stream overrides: admin_socket: branch: wip-guits-testing-2023-07-25-0942 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: f363f221f3faabd996027fb2c49585c273894adc ceph-deploy: conf: client: log file: /var/log/ceph/ceph-$name.$pid.log mon: osd default pool size: 2 install: ceph: flavor: default sha1: f363f221f3faabd996027fb2c49585c273894adc selinux: whitelist: - scontext=system_u:system_r:logrotate_t:s0 workunit: branch: wip-guits-testing-2023-07-25-0942 sha1: f363f221f3faabd996027fb2c49585c273894adc owner: scheduled_gabrioux@teuthology priority: 70 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 sha1: f363f221f3faabd996027fb2c49585c273894adc sleep_before_teardown: 0 suite: orch:cephadm suite_branch: wip-guits-testing-2023-07-25-0942 suite_path: /home/teuthworker/src/git.ceph.com_ceph-c_f363f221f3faabd996027fb2c49585c273894adc/qa suite_relpath: qa suite_repo: https://git.ceph.com/ceph-ci.git suite_sha1: f363f221f3faabd996027fb2c49585c273894adc targets: smithi073.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE2LcgSgeaoVboxhf8crTclYvl8BY5Txp6mwwfOuG8f/neOcNxQMWppPD3o557DQqhBG0Hw9xQ1qqvCrsxJvQKs= smithi083.front.sepia.ceph.com: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHnxGEgjYsS09JtM4B6JZ/RDSFlW1eSfzyGr2r/XRhpT2Viv+mT1hvFadEojNx2FzvZGUNs6cMIjHA7GX9ddYgAONcs5YMgeAxdZSbOVtUiG9y44vMsfhuLAHOIV+Ht5ghuEcdRtrBqJfrE/MoW3MvXXnXx4Q7H4dxIAcyEIP8MnN6kzLaPrhk+oNPrPIjLgHcdiiQAK7LuQViD20Lqv93jD3C5ULP220Eog1BLq0VZQBs4kCW/U/zIvCFhIkYD4KP6PDDdTmXhTBDSFXNnGDwtlAfjCg5ali85zhDPaN+zemqNMOVPS1MlSqImvsT80/bD9b4z7n46Xr5o/yWzeWg0Q/975ATa67NfjyuVDexpihz6i5159SZiAuCE25t9UpLnXcNY4fF/BVI2eqrr+QqGoHQMgi47xmlNV8rWLk5iHB7nJedwP6vGH2xqFjLHp2sfH1CTnAGX8WW2uM40PdLxjm7JaXIntahufk45nXzOrWY2sbeyboDcYLA8XTMJ6c= smithi123.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHV7X3hFr1VTh/9iFA4OBy+hYFCp/be2xhryk2e4VYh8f3YCNAmXz4+vd61K/yMjgtXThgCAuaOnd43Y8w6RG5Y= tasks: - pexec: all: - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup - sudo dnf -y module reset container-tools - sudo dnf -y module install container-tools --allowerasing --nobest - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf - 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