Bug #79119
openrados/cephadm: Saw trial118 in CRUSH map after it should have been removed causes failure
0%
Description
A host is seen in the CRUSH map after it should have been removed causing the test to fail:
/a/yuriw-2026-07-30_01:03:32-rados-wip-yuri13-testing-20260729.211123-tentacle-distro-default-trial/411699
description: rados/cephadm/workunits/{0-distro/centos_9.stream_runc agent/on mon_election/connectivity task/test_host_drain}
2026-07-30T14:59:12.488 INFO:teuthology.orchestra.run.trial011.stdout: step choose firstn 0 type osd
2026-07-30T14:59:12.488 INFO:teuthology.orchestra.run.trial011.stdout: step emit
2026-07-30T14:59:12.489 INFO:teuthology.orchestra.run.trial011.stdout:}
2026-07-30T14:59:12.489 INFO:teuthology.orchestra.run.trial011.stdout:
2026-07-30T14:59:12.489 INFO:teuthology.orchestra.run.trial011.stderr:+ exit 1
2026-07-30T14:59:12.620 DEBUG:teuthology.orchestra.run:got remote process result: 1
2026-07-30T14:59:12.621 INFO:teuthology.orchestra.run.trial011.stdout:# end crush map
2026-07-30T14:59:12.622 ERROR:teuthology.run_tasks:Saw exception from tasks.
Traceback (most recent call last):
File "/home/teuthworker/src/git.ceph.com_teuthology_1fcba62fdc66bf66c0e46aa34af7211788698d08/teuthology/run_tasks.py", line 105, in run_tasks
manager = run_one_task(taskname, ctx=ctx, config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/teuthworker/src/git.ceph.com_teuthology_1fcba62fdc66bf66c0e46aa34af7211788698d08/teuthology/run_tasks.py", line 83, in run_one_task
return task(**kwargs)
^^^^^^^^^^^^^^
File "/home/teuthworker/src/github.com_ceph_ceph-ci_acbc5af07bdd81b95d46a3f601b69e2b3cda564e/qa/tasks/cephadm.py", line 1603, in shell
_shell(
File "/home/teuthworker/src/github.com_ceph_ceph-ci_acbc5af07bdd81b95d46a3f601b69e2b3cda564e/qa/tasks/cephadm.py", line 111, in _shell
return remote.run(
^^^^^^^^^^^
File "/home/teuthworker/src/git.ceph.com_teuthology_1fcba62fdc66bf66c0e46aa34af7211788698d08/teuthology/orchestra/remote.py", line 596, in run
r = self._runner(client=self.ssh, name=self.shortname, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/teuthworker/src/git.ceph.com_teuthology_1fcba62fdc66bf66c0e46aa34af7211788698d08/teuthology/orchestra/run.py", line 461, in run
r.wait()
File "/home/teuthworker/src/git.ceph.com_teuthology_1fcba62fdc66bf66c0e46aa34af7211788698d08/teuthology/orchestra/run.py", line 161, in wait
self._raise_for_status()
File "/home/teuthworker/src/git.ceph.com_teuthology_1fcba62fdc66bf66c0e46aa34af7211788698d08/teuthology/orchestra/run.py", line 181, in _raise_for_status
raise CommandFailedError(
teuthology.exceptions.CommandFailedError: Command failed on trial011 with status 1: 'sudo /home/ubuntu/cephtest/cephadm --image quay.ceph.io/ceph-ci/ceph:acbc5af07bdd81b95d46a3f601b69e2b3cda564e shell -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring --fsid cf24cadf-8c26-11f1-b9e2-d404e6e7d460 -- bash -c \'set -ex\nHOSTNAMES=$(ceph orch host ls --format json | jq -r \'"\'"\'.[] | .hostname\'"\'"\')\nfor host in $HOSTNAMES; do\n # find the hostname for "host.c" which will have no mgr\n HAS_MGRS=$(ceph orch ps --hostname ${host} --format json | jq \'"\'"\'any(.daemon_type == "mgr")\'"\'"\')\n if [ "$HAS_MGRS" == "false" ]; then\n HOST_C="${host}"\n fi\ndone\n# One last thing to worry about before draining the host\n# is that the teuthology test tends to put the explicit\n# hostnames in the placement for the mon service.\n# We want to make sure we can drain without providing\n# --force and there is a check for the host being removed\n# being listed explicitly in the placements. Therefore,\n# we should remove it from the mon placement.\nceph orch ls mon --export > mon.yaml\nsed /"$HOST_C"/d mon.yaml > mon_adjusted.yaml\nceph orch apply -i mon_adjusted.yaml\n# now drain that host\nceph orch host drain $HOST_C --zap-osd-devices\n# wait for drain to complete\nHOST_C_DAEMONS=$(ceph orch ps --hostname $HOST_C)\nwhile [ "$HOST_C_DAEMONS" != "No daemons reported" ]; do\n sleep 15\n HOST_C_DAEMONS=$(ceph orch ps --hostname $HOST_C)\ndone\n# we want to check the ability to remove the host from\n# the CRUSH map, so we should first verify the host is in\n# the CRUSH map.\nceph osd getcrushmap -o compiled-crushmap\ncrushtool -d compiled-crushmap -o crushmap.txt\nCRUSH_MAP=$(cat crushmap.txt)\nif ! grep -q "$HOST_C" <<< "$CRUSH_MAP"; then\n printf "Expected to see $HOST_C in CRUSH map. Saw:\\n\\n$CRUSH_MAP"\n exit 1\nfi\n# If the drain was successful, we should be able to remove the\n# host without force with no issues. If there are still daemons\n# we will get a response telling us to drain the host and a\n# non-zero return code\nceph orch host rm $HOST_C --rm-crush-entry\n# verify we\'"\'"\'ve successfully removed the host from the CRUSH map\nsleep 30\nceph osd getcrushmap -o compiled-crushmap\ncrushtool -d compiled-crushmap -o crushmap.txt\nCRUSH_MAP=$(cat crushmap.txt)\nif grep -q "$HOST_C" <<< "$CRUSH_MAP"; then\n printf "Saw $HOST_C in CRUSH map after it should have been removed.\\n\\n$CRUSH_MAP"\n exit 1\nfi\n\''
2026-07-30T14:59:12.625 DEBUG:teuthology.run_tasks:Unwinding manager cephadm
2026-07-30T14:59:12.634 INFO:tasks.cephadm:Teardown begin
2026-07-30T14:59:12.634 DEBUG:teuthology.orchestra.run.trial01
Seems like a race between OSD purge and CRUSH bucket removal
After ceph orch host rm trial118 --rm-crush-entry and a 30-second sleep, the CRUSH map still contained an empty trial118 bucket
RZ Updated by Radoslaw Zarzynski 4 months ago
Doesn't this look like a cephadm's bug?
LF Updated by Laura Flores 4 months ago
Monitoring for reoccurrences. It is in the crush map, so despite it coming from an orch test, this might be a RADOS problem.
LF Updated by Laura Flores 3 months ago
Monitor for reoccurrences.
RZ Updated by Radoslaw Zarzynski 3 months ago
Still monitoring.
RZ Updated by Radoslaw Zarzynski 3 months ago
No reoccurrences so far.
JP Updated by Jaya Prakash about 1 month ago ยท Edited
/a/jayaprakash-2026-10-29_08:29:24-rados-wip-jaya-bs-testing-28-10-2026-distro-default-trial/690969
2026-10-29T09:56:52.980 INFO:teuthology.orchestra.run.trial071.stderr: step emit 2026-10-29T09:56:52.980 INFO:teuthology.orchestra.run.trial071.stderr:} 2026-10-29T09:56:52.980 INFO:teuthology.orchestra.run.trial071.stderr: 2026-10-29T09:56:52.980 INFO:teuthology.orchestra.run.trial071.stderr:# end crush map' 2026-10-29T09:56:52.980 INFO:teuthology.orchestra.run.trial071.stderr:+ grep -q trial183 2026-10-29T09:56:52.981 INFO:teuthology.orchestra.run.trial071.stderr:+ ceph orch host rm trial183 --rm-crush-entry 2026-10-29T09:56:53.154 INFO:teuthology.orchestra.run.trial071.stdout:Cephadm failed removing host trial183 2026-10-29T09:56:53.154 INFO:teuthology.orchestra.run.trial071.stdout:Failed to remove host trial183 from the CRUSH map: osd crush remove failed: (39) Directory not empty re tval: -39 2026-10-29T09:56:53.154 INFO:teuthology.orchestra.run.trial071.stdout:OSDs may still be present in the CRUSH bucket. Remove them with 'ceph orch osd rm' or 'ceph orch host d rain trial183' first.
Trace:
2026-10-29T09:56:51.922 INFO:[email protected]:Oct 29 09:56:51 trial071 ceph-9fe7c714-d37e-11f1-b8e4-d404e6e7d460-mgr-a[16443]: Traceback (most recent call last): 2026-10-29T09:56:51.922 INFO:[email protected]:Oct 29 09:56:51 trial071 ceph-9fe7c714-d37e-11f1-b8e4-d404e6e7d460-mgr-a[16443]: File "/usr/share/ceph/mgr/cephadm/services/osd.py", line 1093, in process_removal_queue 2026-10-29T09:56:51.922 INFO:[email protected]:Oct 29 09:56:51 trial071 ceph-9fe7c714-d37e-11f1-b8e4-d404e6e7d460-mgr-a[16443]: raise orchestrator.OrchestratorError(f"Could not purge {osd}") 2026-10-29T09:56:51.922 INFO:[email protected]:Oct 29 09:56:51 trial071 ceph-9fe7c714-d37e-11f1-b8e4-d404e6e7d460-mgr-a[16443]: orchestrator._interface.OrchestratorError: Could not purge osd.5 2026-10-29T09:56:52.571 INFO:[email protected]:Oct 29 09:56:52 trial071 ceph-mon[16148]: Health check cleared: OSD_DOWN (was: 1 osds down)
Will Raise a new one under Orch, If its not RADOS related
LF Updated by Laura Flores 28 days ago
- Project changed from RADOS to Orchestrator
LF Updated by Laura Flores 10 days ago
/a/skanta-2026-11-04_05:01:14-rados-wip-bharath30-testing-20261103.033156-main-distro-default-trial/709752