reef:mon/Monitor.cc: exit function if !osdmon()->is_writeable()#51409
Merged
reef:mon/Monitor.cc: exit function if !osdmon()->is_writeable()#51409
Conversation
Problem: In the function `maybe_go_degraded_stretch_mode()` when `osdmon` is not writeable we shouldn't go into `trigger_degraded_stretch_mode` because we will crash at `ceph_assert(osdmon()->is_writeable())`. The current code does not exit `maybe_go_degraded_stretch_mode()` when we are waiting for `osdmon` to be writeable, therefore, we crash. Solution: Exit the function by returning nothing after going into `wait_for_writeable_ctx`, since at that point we would have queued the context and all we have to do is wait for finish context to execute `maybe_go_degraded_stretch_mode` again. Also, added a bit of logging so that user is aware when `osdmon` and `monmon` are not writeable. We fix other parts of the monitor code that are missing the return after `wait_for_writeable_ctx` and `wait_for_readable_ctx` as well. Fixes: https://tracker.ceph.com/issues/59271 Signed-off-by: Kamoltat <ksirivad@redhat.com> (cherry picked from commit 7f7c2d5)
Separate `mon-stretch` from `mon`. Renamed `mon-stretched-cluster.sh` to `mon-stretch-fail-recovery.sh`. This isolation of stretch cluster test will enable developers to get results faster for stretch-cluster related stuff. Signed-off-by: Kamoltat <ksirivad@redhat.com> (cherry picked from commit 431c455)
neha-ojha
approved these changes
May 15, 2023
Member
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.
NOTE: no need to backport #47340 because it already exists in reef.
Problem:
maybe_go_degraded_stretch_mode()when
osdmonis not writeable we shouldn't go intotrigger_degraded_stretch_modebecause we willcrash at
ceph_assert(osdmon()->is_writeable()).The current code does not exit
maybe_go_degraded_stretch_mode()when we are waiting for
osdmonto be writeable, therefore,we crash.
Solution:
wait_for_writeable_ctx, since at that point we would havequeued the context and all we have to do is wait for finish
context to execute
maybe_go_degraded_stretch_modeagain.Also, added a bit of logging so that user is aware
when
osdmonandmonmonare not writeable.We fix other parts of the monitor code that are missing
the return after
wait_for_writeable_ctxandwait_for_readable_ctxas well.
Fixes:
https://tracker.ceph.com/issues/59271
Backporting relevant commits from main PRs:
#50857
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. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows