Skip to content

mgr: don't record a crash dump for NotImplementedError from dispatch_remote - #70967

Merged
batrick merged 4 commits into
ceph:mainfrom
NitzanMordhai:wip-nitzan-mgr-crash-dump-notimplementederror
Aug 13, 2026
Merged

batrick merged 4 commits into
ceph:mainfrom
NitzanMordhai:wip-nitzan-mgr-crash-dump-notimplementederror

Conversation

@NitzanMordhai

@NitzanMordhai NitzanMordhai commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

NotImplementedError is how an orchestrator module signals it doesn't
implement an optional method not a fault. But dispatch_remote() asked
for a crash dump on any exception the callee raised, so following that
convention still produced a crash record.

On a Rook-managed cluster this bit hard: mgr/prometheus calls the
cephadm-only node_proxy_fullreport() every scrape, Rook doesn't
implement it, and each scrape left a crash record behind about 5,760
a day. RECENT_MGR_MODULE_CRASH gets raised within minutes and never
clears, so HEALTH_OK becomes unreachable.

Skip the crash dump for NotImplementedError; the exception itself is
still raised and returned to the caller as before. handle_pyerror()
already took a crash_dump parameter for this but never honored it
now it does, with no effect on any other caller.

Fixes: https://tracker.ceph.com/issues/79106
Signed-off-by: Sebastian Marschke [email protected]
Signed-off-by: Nitzan Mordechai [email protected]
Commit message assisted by: IBM Bob

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

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

flauschi1985 and others added 4 commits August 11, 2026 08:27
…remote

NotImplementedError is how an orchestrator module signals it doesn't
implement an optional method not a fault. But dispatch_remote() asked
for a crash dump on any exception the callee raised, so following that
convention still produced a crash record.

On a Rook-managed cluster this bit hard: mgr/prometheus calls the
cephadm-only node_proxy_fullreport() every scrape, Rook doesn't
implement it, and each scrape left a crash record behind about 5,760
a day. RECENT_MGR_MODULE_CRASH gets raised within minutes and never
clears, so HEALTH_OK becomes unreachable.

Skip the crash dump for NotImplementedError; the exception itself is
still raised and returned to the caller as before. handle_pyerror()
already took a crash_dump parameter for this but never honored it
now it does, with no effect on any other caller.

Fixes: https://tracker.ceph.com/issues/79106
Signed-off-by: Sebastian Marschke <[email protected]>
Signed-off-by: Nitzan Mordechai <[email protected]>
Assisted by: IBM Bob
Even after the crash dump was suppressed, BaseMgrModule.cc still
logged "Remote method threw exception: ..." at error level for every
NotImplementedError. Since that's not actually an error, log it at
debug level instead same crash_dump flag, threaded up from dispatch_remote()
through to the log call.

Fixes: https://tracker.ceph.com/issues/79106
Signed-off-by: Nitzan Mordechai <[email protected]>
get_hardware_metrics() only checked orch_is_available(), which just
means some orchestrator is present — not that it implements
node-proxy. On Rook that's true but node_proxy_fullreport() isn't
implemented, so every scrape hit it anyway and relied entirely on the
mgr-side fix to avoid being reported as a crash.

Check the orchestrator backend directly instead, same as the existing
_select_orchestrator() == "cephadm" check in orchestrator/module.py.

Related: https://tracker.ceph.com/issues/79106
Signed-off-by: Nitzan Mordechai <[email protected]>
Add a self-test that exercises the fix directly: call a method via
self.remote() that raises NotImplementedError and confirm it leaves
crash_dir untouched, then do the same with a genuine RuntimeError as
a control and confirm that one *does* produce (and clean up) a real
crash dump.

Wired into orchestrator's existing self_test(), which already runs
live inside ceph-mgr and is exercised by
qa/tasks/mgr/test_module_selftest.py::test_orchestrator - no new test
file needed.

Related: https://tracker.ceph.com/issues/79106
Signed-off-by: Nitzan Mordechai <[email protected]>
@NitzanMordhai

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath7-testing-20260811.152323-main.

@nizamial09 nizamial09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

prometheus changes lgtm

@ljflores

Copy link
Copy Markdown
Member

@batrick
batrick merged commit 5513ae2 into ceph:main Aug 13, 2026
10 of 14 checks passed
ivan-a-souza added a commit to ivan-a-souza/k8s-one that referenced this pull request Aug 13, 2026
- Storage: Longhorn -> Rook-Ceph (ceph-block RWO + cephfs RWX)
- Runtime: alpine distroless -> minimal debian:bookworm-slim
- Components table: Rook v1.20.3, Ceph v20.2.2 (pinned), Ceph CSI v3.17.0,
  HAProxy pinned by digest
- Build args: LONGHORN_VERSION -> ROOK_VERSION; OSD size via ROOK_OSD_SIZE
- Volumes: rook-data bind mount with gitignore warning (Ceph keyrings!)
- Ports: 8082/8443 host mapping (NodePort 30080/30443)
- New sections: Known Issues (mgr crash-loop workaround #18124), RWX example,
  'OSD not created after reboot' troubleshooting
- Note: rook mgr module disabled until upstream fix (ceph/ceph#70967)
Peej11 added a commit to Peej11/homelab that referenced this pull request Aug 18, 2026
szinn added a commit to szinn/k8s-homelab that referenced this pull request Aug 20, 2026
The prometheus mgr module polls orchestrator.node_proxy_fullreport()
on every scrape (~15s); the rook orchestrator backend doesn't
implement it, so it raises NotImplementedError which mgr logs as a
crash. Confirmed matching upstream rook#18124 / ceph tracker 79106.
Disabling the rook mgr module short-circuits prometheus's
orch_is_available() guard so the failing call is never attempted.
Loses ceph orch CLI / dashboard orchestrator panel until upstream
fix (ceph/ceph#70967) ships; Rook operator itself is unaffected
since it manages state via CRDs, not ceph orch.
billimek added a commit to billimek/k8s-gitops that referenced this pull request Aug 20, 2026
Ceph v20.2.4 (Tentacle) has the prometheus module call
node_proxy_fullreport() on every scrape, which the Rook orchestrator
backend doesn't implement, and the mgr framework records each
NotImplementedError as a module crash before the caller's own
try/except can catch it (rook/rook#18124, ceph/ceph#70967). With a
15s scrape interval this generated a new crash every ~15s, and once
enough piled up the crash module itself started failing with
"dictionary changed size during iteration", pushing the cluster into
a permanent HEALTH_ERR.

Disabling the rook mgr module stops orch_is_available() from
returning true, so prometheus skips the failing call. Trade-off is
losing `ceph orch` CLI and some dashboard orchestrator widgets, which
this repo doesn't use since everything is CRD/GitOps-managed. Revert
once the pending Tentacle backport ships.
fivetime added a commit to fivetime/ceph that referenced this pull request Sep 8, 2026
The three mgr Python files are copied unconditionally, and they are cut from
v20.2.4. Rebuilding this against a newer base -- which is what anyone would do
to pick up an unrelated fix in v20.2.5 -- would overwrite files upstream had
already fixed with stale ones, silently. That is exactly the trap that makes a
throwaway overlay outlive its usefulness.

So inspect the base first and fail, naming the part that has become redundant:

  ERROR: base image quay.io/ceph/ceph:v20.2.5 already carries: ceph#69250(mgr/rook)
  This overlay has outlived that part. Retire it instead of rebuilding.

Verified both directions, because a guard that cannot fire proves nothing:
against quay.io/ceph/ceph:v20.2.4 it prints "base still needs all three fixes"
and the build completes; against this overlay's own output it names all three
(ceph#69250, ceph#70967, nfs-ganesha 9.16) and exits 1.

BASE_IMAGE is re-declared after FROM: an ARG from before the first FROM is out
of scope inside the stage, so the error would otherwise name no image.

README gains the retirement procedure and the one command that decides it,
which needs no knowledge of which PRs merged.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017xWtySCN31tS8CrJWo3sRo
btkostner added a commit to btkostner/infrastructure that referenced this pull request Oct 23, 2026
rook/rook#18124 (open): Ceph's prometheus mgr module calls
node_proxy_fullreport() on every scrape; Rook's orchestrator module
doesn't implement it, raising NotImplementedError that the mgr
framework records as a module crash every ~15s, producing a permanent
HEALTH_WARN/ERR that never clears (confirmed on our v20.2.4 cluster:
5 crashes, same traceback, mgr.a). Upstream fix (ceph/ceph#70967,
tracker 79106) has not landed in the v20.2.4 Tentacle backport yet.

Rook's own official upgrade guide recommends disabling the rook mgr
module as the documented mitigation. Trade-off: loses 'ceph orch' CLI
and some dashboard orchestrator-integration features -- we don't use
CephNFS (not deployed) and don't rely on ceph orch (Rook manages
everything via CRDs already). This Ceph-internal mgr module is
unrelated to the Kubernetes-level ceph-csi-operator controller.
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.

7 participants