Skip to content

OSDMonitor: exclude destroyed OSDs from "ceph node ls" output#62243

Merged
NitzanMordhai merged 1 commit intoceph:mainfrom
NitzanMordhai:wip-nitzan-osd-destroyed-in-nodes-ls
Mar 16, 2025
Merged

OSDMonitor: exclude destroyed OSDs from "ceph node ls" output#62243
NitzanMordhai merged 1 commit intoceph:mainfrom
NitzanMordhai:wip-nitzan-osd-destroyed-in-nodes-ls

Conversation

@NitzanMordhai
Copy link
Contributor

@NitzanMordhai NitzanMordhai commented Mar 12, 2025

After destroying an OSD, the command "ceph node ls" still listed the destroyed OSD, causing confusion. This fix ensures that the status of the OSD is checked before adding it to the output, aligning its behavior with "ceph osd tree," which already displays the correct status.

Fixes: https://tracker.ceph.com/issues/70400

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

After destroying an OSD, the command "ceph node ls" still listed the destroyed OSD,
causing confusion. This fix ensures that the status of the OSD is checked before
adding it to the output, aligning its behavior with "ceph osd tree," which already
displays the correct status.

Fixes: https://tracker.ceph.com/issues/70400
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
@NitzanMordhai NitzanMordhai requested a review from a team as a code owner March 12, 2025 07:15
Copy link
Contributor

@rzarzynski rzarzynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Requires teuthology testing + baking to ensure interactions with the users of node ls.

}
if (osdmap.is_destroyed(osd)) {
continue;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess other monitors (like MgrMonitor) can exhibit similar problem.

@rzarzynski
Copy link
Contributor

jenkins test make check

@rzarzynski
Copy link
Contributor

jenkins test make check arm64

@NitzanMordhai
Copy link
Contributor Author

jenkins test make check

@NitzanMordhai
Copy link
Contributor Author

jenkins test make check arm64

@NitzanMordhai
Copy link
Contributor Author

@NitzanMordhai
Copy link
Contributor Author

jenkins test make check arm64

@NitzanMordhai NitzanMordhai merged commit df30796 into ceph:main Mar 16, 2025
15 of 16 checks passed
@NitzanMordhai NitzanMordhai deleted the wip-nitzan-osd-destroyed-in-nodes-ls branch March 16, 2025 07:29
@FredNass
Copy link
Contributor

FredNass commented May 2, 2025

For the record, this one fixed the issue where destroyed OSDs waiting to be replaced were incorrectly appearing as stray daemons in Ceph status #67018.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants