Skip to content

cephadm: fix error during image inference with legacy service detected - #72201

Merged
rkachach merged 2 commits into
ceph:mainfrom
phlogistonjohn:jjm-nickle-fix
Oct 19, 2026
Merged

rkachach merged 2 commits into
ceph:mainfrom
phlogistonjohn:jjm-nickle-fix

Conversation

@phlogistonjohn

@phlogistonjohn phlogistonjohn commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

When running code to infer an image to use, have cephadm avoid using legacy daemons.

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


Add an include_legacy argument to daemons_matching. It is defaulted to
true for backwards compatibility. If set to false no legacy daemons
will be returned by the filtering function.-

Set the include_legacy flag to false to avoid using legacy daemons when
running infer_local_ceph_image. This is a quick fix for a user reported
issue with something cephadm detected as a legacy service.

Regardless of if the detection was correct or not the
infer_local_ceph_image code treats the presence of the _container_info
cached metadata key as an invariant but this key (and the cached
metadata) are only available on the typical DaemonEntry based items
and not on the LegacyDaemonEntry based items.


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)
    • Includes unit test(s)
    • Includes integration test(s)
    • Includes bug reproducer
    • No tests; legacy daemons are hard to test since they were never documented from early cephadm
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@rnickle

rnickle commented Sep 29, 2026

Copy link
Copy Markdown

Seems very clear, thanks for making the PR, John!

Add an include_legacy argument to daemons_matching. It is defaulted to
true for backwards compatibility. If set to false no legacy daemons
will be returned by the filtering function.

Signed-off-by: John Mulligan <[email protected]>
Set the include_legacy flag to false to avoid using legacy daemons when
running infer_local_ceph_image. This is a quick fix for a user reported
issue with something cephadm detected as a legacy service.

Regardless of if the detection was correct or not the
infer_local_ceph_image code treats the presence of the _container_info
cached metadata key as an invariant but this key (and the cached
metadata) are only available on the typical DaemonEntry based items
and not on the LegacyDaemonEntry based items.

Fixes: https://tracker.ceph.com/issues/81355
Signed-off-by: John Mulligan <[email protected]>
@phlogistonjohn
phlogistonjohn marked this pull request as ready for review October 2, 2026 18:24
@phlogistonjohn
phlogistonjohn requested a review from a team as a code owner October 2, 2026 18:24

@rkachach rkachach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rkachach

Copy link
Copy Markdown
Contributor

@rkachach
rkachach merged commit 0ee74b9 into ceph:main Oct 19, 2026
17 of 18 checks passed
@phlogistonjohn
phlogistonjohn deleted the jjm-nickle-fix branch October 29, 2026 13:01
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.

3 participants