-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pybind/mgr/mirroring: Fix KeyError: 'directory_count' in daemon status #57291
pybind/mgr/mirroring: Fix KeyError: 'directory_count' in daemon status #57291
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs explanation in commit message as to under what circumstances is this issue observed. Otherwise LGTM.
The directory_count key is missing in self.mgr.get_daemon_status() output json, intermittently when there is a delay caused by m_listener.handle_mirroring_enabled() to update the directory_count, which results in ServiceDaemon::update_status() creates a json with out 'directory_count' key/value. But the mgr/mirroring -> daemon_status() always expects the 'directory_count' key to be present in the json returned by self.mgr.get_daemon_status(). This issue occurs intermittently when we enable/disable mirroring and check the 'daemon status' in between. This patch fixes this issue by setting a default value 0 for 'directory_count' in doemon_status(). Fixes: https://tracker.ceph.com/issues/65795 Signed-off-by: Jos Collin <jcollin@redhat.com>
fa905a7
to
b78baa2
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
jenkins test make check arm64 |
This PR is under test in https://tracker.ceph.com/issues/66035. |
This PR is under test in https://tracker.ceph.com/issues/66063. |
This PR is under test in https://tracker.ceph.com/issues/66090. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes: https://tracker.ceph.com/issues/65795
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
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows
jenkins test rook e2e