mon/Monitor.cc: exit function if !osdmon()->is_writeable()
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
7f7c2d51c60c58aeb031ec279a48910bc02444de)