Bug #77633
closedOOM-Kills of standby MGR after Upgrade to rook v1.20.1 / ceph v20.2.2
0%
Description
after upgrade from rook v1.19.7 to v1.20.1 and from ceph v20.2.1 to ceph v20.2.2 the standby mgr gets oom-killed repeatedly.
it seems 20.2.2 introduced a mem-leak.
please see https://github.com/rook/rook/issues/17786 for further informations.
MH Updated by Matthew Heler 5 months ago
I believe this to be a dup of https://tracker.ceph.com/issues/77538
KC Updated by Kefu Chai 5 months ago
I don't think this is a dup of #77538, at least not yet.
#77538 is the rook module logging ~228KB of kubernetes PodList JSON at DEBUG. Three reasons that doesn't transfer to the standby OOM:
- Rook doesn't run on the standby. It has no
MgrStandbyModulesubclass, and standby_start() only starts modules that provide a standby class, so the 228KB logging never happens there. - #77538 is log volume. In a container the daemon log goes to stderr and the node's disk, not the pod's RSS. The only in-memory part is the recent-log ring (m_recent), a count-bounded circular_buffer(10000) that plateaus. Log volume can't produce an unbounded RSS climb to OOM.
- The two reports disagree on which pod grows: one sees the standby stable (~64MB) with the active growing, the other sees the standby growing.
KC Updated by Kefu Chai 5 months ago
- Status changed from New to Need More Info
i am trying to follow up at https://github.com/rook/rook/issues/17786 asking for more info.
NM Updated by Nitzan Mordechai 5 months ago
- Related to Bug #77538: Mgr logs are extremely verbose with list of pods in json output from the Rook module added
KC Updated by Kefu Chai 5 months ago
- Has duplicate Bug #78165: mgr regression in v20.2.2: prometheus + rook OOM due to unbounded logging added
KC Updated by Kefu Chai 5 months ago
i am quoting Will Glynn's bug report at #78165 here for a better context and analysis:
Will Glynn wrote:
With Rook v1.20.1 and Ceph v20.2.2, the active
mgr's Python heap grows without bound whenever the prometheus module's background collection loop is running (`mgr/prometheus/cache=true` + `scrape_interval=15`, both the default), even with zero scrapers polling the metrics endpoint at :9283.Reverting the
mgrcomponent to v20.2.1 corrected the issue, confirming this is a regression.ceph mgr failreleased the memory. Disablingprometheusreleased the memory.ceph config set mgr mgr/prometheus/cache falseprevented it from growing at idle (but still grew each scrape).This behavior is a combination of three things:
1.
prometheuscollect()callsorch_is_available()which lists all pods in the namespace.
2. The "list all pods" response body is logged verbatim, as described in #77538.
3.log_max_recentlog entries are kept in a circular buffer, but despite the documentation claiming the default is 500, the effective limit here isdaemon_default: 10000.This cluster has 137 OSDs, so "list all pods in namespace" produces 6 MB of JSON.
collect()is called every 15 seconds, somgrfootprint grows 24 MB/minute. The log buffer is willing to hold 10000 such entries; mymgrhit 30 GB in about a day.My current workaround is
ceph config set mgr log_max_recent 100, bounding the leak to 600 MB. This is effective and stable.I propose:
1. Answering
orch_is_available()with a lighter-weight query.
2. Backporting the #77538 fix as planned.
3. Causinglog_max_recentto limit bytes in addition to limiting entries. (Perhaps also a documentation change.)
KC Updated by Kefu Chai 4 months ago
- Copied to Bug #78589: mgr/rook: a watcher thread and API connection leak on every orchestrator call added
UB Updated by Upkeep Bot 4 months ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to a4c43f6e50335fa14fe3953a9089cc85cc423e16
- Fixed In set to v21.3.0-1311-ga4c43f6e50
- Upkeep Timestamp set to 2026-07-23T03:04:35+00:00
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #78590: umbrella: OOM-Kills of standby MGR after Upgrade to rook v1.20.1 / ceph v20.2.2 added
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #78591: tentacle: OOM-Kills of standby MGR after Upgrade to rook v1.20.1 / ceph v20.2.2 added
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #78592: squid: OOM-Kills of standby MGR after Upgrade to rook v1.20.1 / ceph v20.2.2 added
UB Updated by Upkeep Bot 4 months ago
- Tags (freeform) set to backport_processed
NM Updated by Nitzan Mordechai 4 months ago
- Has duplicate Bug #79492: root logger left at NOTSET floods the Ceph log with third-party DEBUG records and OOMs ceph-mgr added
NM Updated by Nitzan Mordechai 4 months ago
- Has duplicate deleted (Bug #79492: root logger left at NOTSET floods the Ceph log with third-party DEBUG records and OOMs ceph-mgr)
NM Updated by Nitzan Mordechai 4 months ago
- Related to Bug #79492: root logger left at NOTSET floods the Ceph log with third-party DEBUG records and OOMs ceph-mgr added
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Backporting
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-07-23T03:04:35+00:00 to 2026-08-27T18:42:41+00:00