Repository navigation
osd/PG: discover missing objects when an OSD peers and PG is degraded - #27288
Conversation
43b4a58 to
d564741
Compare
d564741 to
7947c93
Compare
7947c93 to
8acc738
Compare
8acc738 to
31ade33
Compare
|
This is probably a hot candidate to be backported :) |
32888aa to
b21753a
Compare
|
@TheJJ @neha-ojha Sorry for not responding earlier(There was a national holiday last week). I think a better idea would be combining those two checker together, e.g.: if (pg->have_unfound() || (pg->is_degraded() && pg->might_have_unfound.count(notevt.from)))because there are still some corner cases(e.g., because that peer is down, or has identical log with ours) we want to avoid sending out a MQuery message. (Not sure that will be causing problems, but since we are already aware of that, then we'd better not :-) |
b21753a to
b3f0101
Compare
|
I've update my patch but I'm more and more getting the feeling that the missing object discovery has to be somehow improved as it seems very fragile. In my intuition, calling |
|
@neha-ojha good to merge? |
|
I've applied the patch to one of my clusters and experienced horrible things, one OSD is now in such a broken state that whenever it is running, some PGs on it fail to peer and remain offline. When I shut down that OSD, the PGs become active again. It seems unlikely that this patch causes such meltdown, but I just want to be sure my patch doesn't break things for other people unintentionally... |
Well, is just the application of this patch that caused problems or were there other things going on as well? If not, we should make sure that this patch is the right resolution. |
I've applied the patch and built the package for Ubuntu. Updated the When I restarted some OSDs, some PGs became inactive and remained peering. In order to bring the cluster available again quickly, I didn't spend much time on investigating the exact reason, but after installing the original 14.2.0-osd again and restarting all OSDs, some (not all) PGs were still waiting for peering with one OSD, which is the one that had to be taken offline ( As I said I'm really not sure if my patch caused this. Anyway, I'd really be glad if the bug this patch addresses is fixed one way or another 😃. I can imagine many clusters end up degraded and recovering even though not necessary. |
When a PG is remapped from OSD `a` to OSD `b`, the objects are backfilled. When OSD `a` is restarted, objects become degraded as `a` is no longer queried or considered as a backfill source. As the PG is degraded, `PG::discover_all_missing` is not called when a candidate OSD peers with the primary: The PG is already active, thus `PG::activate` (and in turn missing object discovery) is not called. Discovery is also not initiated from `PG::RecoveryState::Active::react(const MNotifyRec& notevt)` as there are no unfound objects. This patch adds a call to `discover_all_missing` when when an OSD sends its `MNotifyRec` message and the PG is degraded. Fixes: https://tracker.ceph.com/issues/37439 Signed-off-by: Jonas Jelten <[email protected]>
b3f0101 to
e152d09
Compare
|
Do you need anything else or are we getting closer to a merge (and backport)? :) |
We were very close to merging this, but the fact that you saw problems after applying this patch, makes me a bit nervous. I think I will run this through another round of testing, just to make sure we catch any bugs, before merging - better safe than sorry :) |
|
Alright, that's good, thanks! |
* refs/pull/27288/head: osd/PG: discover missing objects when an OSD peers and PG is degraded Reviewed-by: xie xingguo <[email protected]> Reviewed-by: Neha Ojha <[email protected]>
|
\o/ |
|
for reference, the backport pulls are: |
When a PG is remapped from OSD
ato OSDb, the objects arebackfilled. When OSD
ais restarted, objects become degradedas
ais no longer queried or considered as a backfill source.As the PG is degraded,
PG::discover_all_missingis not calledwhen a candidate OSD peers with the primary: The PG is already
active, thus
PG::activate(and in turn missing object discovery)is not called. Discovery is also not initiated from
PG::RecoveryState::Active::react(const MNotifyRec& notevt)as there are no unfound objects.
This patch adds a call to
discover_all_missingwhenwhen an OSD sends its
MNotifyRecmessage and the PG is degraded.Fixes: https://tracker.ceph.com/issues/37439
Signed-off-by: Jonas Jelten [email protected]