archive_path: /home/teuthworker/archive/gabrioux-2023-06-26_12:28:37-orch:cephadm-cephadm-httpsrv-refactor-distro-default-smithi/7316342 branch: cephadm-httpsrv-refactor description: orch:cephadm/workunits/{0-distro/ubuntu_20.04 agent/off mon_election/classic task/test_set_mon_crush_locations} email: gabrioux@redhat.com first_in_suite: false job_id: '7316342' kernel: kdb: true sha1: distro last_in_suite: false machine_type: smithi name: gabrioux-2023-06-26_12:28:37-orch:cephadm-cephadm-httpsrv-refactor-distro-default-smithi no_nested_subset: false nuke-on-error: true os_type: ubuntu os_version: '20.04' overrides: admin_socket: branch: cephadm-httpsrv-refactor ceph: conf: global: mon election default strategy: 1 mgr: debug mgr: 20 debug ms: 1 mgr/cephadm/use_agent: false 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: b366b34ff6ef7d48fae811a77f2bb23104e17648 ceph-deploy: conf: client: log file: /var/log/ceph/ceph-$name.$pid.log mon: osd default pool size: 2 install: ceph: flavor: default sha1: b366b34ff6ef7d48fae811a77f2bb23104e17648 kernel: hwe: true workunit: branch: cephadm-httpsrv-refactor sha1: b366b34ff6ef7d48fae811a77f2bb23104e17648 owner: scheduled_gabrioux@teuthology priority: 75 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: b366b34ff6ef7d48fae811a77f2bb23104e17648 sleep_before_teardown: 0 suite: orch:cephadm suite_branch: cephadm-httpsrv-refactor suite_path: /home/teuthworker/src/git.ceph.com_ceph-c_b366b34ff6ef7d48fae811a77f2bb23104e17648/qa suite_relpath: qa suite_repo: https://git.ceph.com/ceph-ci.git suite_sha1: b366b34ff6ef7d48fae811a77f2bb23104e17648 targets: smithi026.front.sepia.ceph.com: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGETOy3xONfbx7kUFCNiUtRLNfkcrcEsWzPdq6Np/6Bw smithi052.front.sepia.ceph.com: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCwINnmi+N3LgR9ET61cABYBnDJDAAQE1klaPINljTOvitiIM3/5ICam+qurn41RkfyLPz4uwE1yDyHeI7QBKChMImagaJPfltOSsFsTn67ifp6uunrBJblDzycEd7/lJfdMwBn8dApfOw5SSnVdpzpaKWGNpPqshrinViULNhTz2PMAkza/R7qM6v4qqKKxQx/yVi8/Lt03nxO672k5WH/Wkz7KHX4nwyeTelksSojH9SBt4yR4WpLbMjuFX33Ag14KBWr9YQ30L5/h7VtBLQL+2c7sq3Bnll5zj8H+sIa0hOHmwR5sxs4cVs6Eb4Cblr6xTs0Q9vQefWDDYNL4qRpuj1NO+bW1xGcALK9TujCJ0/fdcMLQ0/r4QukVxSE1j6frwWwo/u8lxTTp/wbNVU14w+37ppSvzcPbOD5FNnCu4PMHgrtqp02ggncjqMYpHvxXoQ53JPn84XfXX04vWf5emRMQ76T0NvWW0jYtj7x7ex7l/iEGUGHVnaOmjLqij0= smithi169.front.sepia.ceph.com: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCwINnmi+N3LgR9ET61cABYBnDJDAAQE1klaPINljTOvitiIM3/5ICam+qurn41RkfyLPz4uwE1yDyHeI7QBKChMImagaJPfltOSsFsTn67ifp6uunrBJblDzycEd7/lJfdMwBn8dApfOw5SSnVdpzpaKWGNpPqshrinViULNhTz2PMAkza/R7qM6v4qqKKxQx/yVi8/Lt03nxO672k5WH/Wkz7KHX4nwyeTelksSojH9SBt4yR4WpLbMjuFX33Ag14KBWr9YQ30L5/h7VtBLQL+2c7sq3Bnll5zj8H+sIa0hOHmwR5sxs4cVs6Eb4Cblr6xTs0Q9vQefWDDYNL4qRpuj1NO+bW1xGcALK9TujCJ0/fdcMLQ0/r4QukVxSE1j6frwWwo/u8lxTTp/wbNVU14w+37ppSvzcPbOD5FNnCu4PMHgrtqp02ggncjqMYpHvxXoQ53JPn84XfXX04vWf5emRMQ76T0NvWW0jYtj7x7ex7l/iEGUGHVnaOmjLqij0= tasks: - 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