Repository navigation
mgr/prometheus: Handle empty JSON from orch get-security-config - #65033
Conversation
23c7557 to
c570c4d
Compare
|
PTAL |
rkachach
left a comment
There was a problem hiding this comment.
Sorry @Sunnatillo but I didn't have time to look at this issue in details. But as I can tell, the problem is not with bad json parsing (that's already being captured) but with the logging of the exception. If you check the logs you would see the error:
2025-07-27T22:54:07.624 INFO:tasks.ceph.mgr.x.smithi088.stderr:TypeError: not all arguments converted during string formatting
And this is the real problem. So basically the except Execption is working correctly but then there's another exception raised by logging sentence as the f-string formatting is not working properly with log.exception:
self.log.exception(f'Failed to setup cephadm based secure monitoring stack: {e}\n',
'Falling back to default configuration')
So the fix has to be in the logging instruction. Plz, can you try by using the following:
except Exception as e:
self.log.exception(
'Failed to setup cephadm based secure monitoring stack: %s\n'
'Falling back to default configuration',
e
)
To test quickly the changes you can fake a bad json by setting the out variable directly to an invalid json.
Signed-off-by: Sunnatillo <[email protected]>
c570c4d to
7760637
Compare
|
@rkachach @nizamial09 How should we proceed to take this in? |
|
I've marked it ready for QA. For sure this issue reproduces in the rados suite, so we can verify it with that. Not sure if other testing might be needed. |
|
Lets get this PR in |
Add patch for ceph tracker #72380 where the prometheus mgr module crashes with TypeError due to incorrect f-string usage in exception logging. Upstream fix: ceph/ceph#65033 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Utkarsh Bhatt <[email protected]>
Add patch for ceph tracker #72380 where the prometheus mgr module crashes with TypeError due to incorrect f-string usage in exception logging. Upstream fix: ceph/ceph#65033 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Utkarsh Bhatt <[email protected]>
Add patch for ceph tracker #72380 where the prometheus mgr module crashes with TypeError due to incorrect f-string usage in exception logging. Upstream fix: ceph/ceph#65033 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Utkarsh Bhatt <[email protected]>
Add patch for ceph tracker #72380 where the prometheus mgr module crashes with TypeError due to incorrect f-string usage in exception logging. Upstream fix: ceph/ceph#65033 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Utkarsh Bhatt <[email protected]>
Add patch for ceph tracker #72380 where the prometheus mgr module crashes with TypeError due to incorrect f-string usage in exception logging. Upstream fix: ceph/ceph#65033 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Utkarsh Bhatt <[email protected]>
Add patch for ceph tracker #72380 where the prometheus mgr module crashes with TypeError due to incorrect f-string usage in exception logging. Upstream fix: ceph/ceph#65033 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Utkarsh Bhatt <[email protected]>
Add patch for ceph tracker #72380 where the prometheus mgr module crashes with TypeError due to incorrect f-string usage in exception logging. Upstream fix: ceph/ceph#65033 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Utkarsh Bhatt <[email protected]>
Add patch for ceph tracker #72380 where the prometheus mgr module crashes with TypeError due to incorrect f-string usage in exception logging. Upstream fix: ceph/ceph#65033 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Utkarsh Bhatt <[email protected]>
Two RookTest failures from PR #94 (run 25206184833): * prometheus mgr module hits TypeError: not all arguments converted during string formatting at module.py:1894. Bug is in upstream Ceph v20.2.0 source (fixed on tentacle branch post-tag, ceph/ceph#65033; also fixed in v20.2.1). Adapted from MicroCeph patches/0002. * dashboard fails to load with No module named 'smb'. The smb mgr module exists in upstream Tentacle but Ubuntu/Debian do not yet ship a ceph-mgr-smb binary package. Drop in a stub satisfying the dashboard's import surface (Intent, Simplified, Cluster, JoinAuth, Share, UsersAndGroups). Adapted from MicroCeph patches/0003. Both patches use usr/share/ceph/mgr/... prefix to match our overlay layout (MicroCeph stages without the usr/ prefix; we don't). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* Prepare main for Ceph Tentacle * Fix CephadmTest and RookTest for Tentacle bump * Install python3-ceph-common alongside cephadm on Tentacle host * Install ceph-common alongside cephadm to provide ceph daemon user * test: capture mgr diagnostics on cephadm bootstrap failure * rock: switch tentacle base to noble + microceph PPA * rock: shim missing verify_cacrt_content in mgr_util * rock: shim prometheus TypeError and stub missing smb mgr module * prometheus mgr module hits TypeError: not all arguments converted during string formatting at module.py:1894. Bug is in upstream Ceph v20.2.0 source (fixed on tentacle branch post-tag, ceph/ceph#65033; also fixed in v20.2.1). Adapted from MicroCeph patches/0002. * dashboard fails to load with No module named 'smb'. The smb mgr module exists in upstream Tentacle but Ubuntu/Debian do not yet ship a ceph-mgr-smb binary package. Drop in a stub satisfying the dashboard's import surface (Intent, Simplified, Cluster, JoinAuth, Share, UsersAndGroups). Adapted from MicroCeph patches/0003. * rock: pin PPA signing key fingerprint to skip launchpadlib lookup * rock: pin tentacle PPA with priority always; split nfs-ganesha part * test: bypass rook 1.19 rgw selector mismatch * test: update external-cluster fixture paths for rook 1.19 * test: rename csi-rbd-provisioner to indexed form for rook 1.19 * test: lowercase rados namespace name for rook 1.19 * test: pass realm/zonegroup/zone to validate-rgw-endpoint --------- Signed-off-by: Utkarsh Bhatt <[email protected]> Co-authored-by: Claude Opus 4.7 <[email protected]>
The 0002-fix-prometheus-module-string-formatting-error.patch is already applied in tentacle-rc ceph (verified in ceph-mgr-modules-core_20.2.1-0ubuntu1~bpo24.04.1~ppa202605272024_all.deb from ppa:lmlogiudice/ceph-tentacle-rc). The override-stage scriptlet fails patch reverse-detection and aborts the build. Upstream: ceph/ceph#65033 Tracker: https://tracker.ceph.com/issues/72380 Signed-off-by: Utkarsh Bhatt <[email protected]> Assisted-by: Claude Opus 4.7 (1M context) <[email protected]>
This PR handles the empty invalid JSON errors from orch get-security-config
Fixes. https://tracker.ceph.com/issues/72380
Issue introduced by this PR: #61468
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition