quincy: mgr/telemetry: handle empty device report when "send" is triggered#45092
Merged
ljflores merged 1 commit intoceph:quincyfrom Feb 22, 2022
Merged
quincy: mgr/telemetry: handle empty device report when "send" is triggered#45092ljflores merged 1 commit intoceph:quincyfrom
ljflores merged 1 commit intoceph:quincyfrom
Conversation
On certain environments, such as the "ceph-dev-docker" environment (https://github.com/ricardoasmarques/ceph-dev-docker), the mgr module is unable to fetch device metrics. As a result, the device report generated by "gather_device_report()" returns an empty dict. This causes an AssertionError when the "send" function is triggered (i.e. by running `ceph telemetry status` or `ceph telemetry send`), and the module crashes. The fix in this commit checks that the generated device report contains metrics before trying to send it. If the device report does not contain metrics (it returns an empty dict), the module will log an appropriate message in the mgr log and not send the device report. If this scenario happens when running the `ceph telemetry send` command, the user will additionally see this message: ``` Ceph report sent to https://telemetry.ceph.com/report Unable to send device report: channel is on, but generated report was empty. ``` I also added a few more debug messages in gather_device_report() to make future debugging easier. Fixes: https://tracker.ceph.com/issues/54250 Signed-off-by: Laura Flores <lflores@redhat.com> (cherry picked from commit 54e0e58)
Member
|
jenkins test api |
nizamial09
approved these changes
Feb 21, 2022
yaarith
approved these changes
Feb 21, 2022
Member
Author
|
Failures, unrelated: Details: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/54326
backport of #44994
parent tracker: https://tracker.ceph.com/issues/54250
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh