You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
panic: pg 1.38f: conflicting mapping(s) found when trying to map from 66 to 19 #5
Thanks for the report! I'll try to take a look next week.
This is commonly caused by Ceph not cleaning out stale upmaps, and pgremapper is perhaps overly cautious when it encounters this. We will often manually ceph OSD rm-pg-upmap-items <pgid> in this case if we're about to cancel backfill anyway, but I think there are ways to safely and gracefully handle this better within the tool.
This is definitely a bug; there's already an upmap 19->11 and pgremapper is trying to do 66->19. It should be doing 66->39. The issue, I think, is that cancel-backfill doesn't take existing upmaps that haven't been backfilled yet into account properly. For EC this is a bit easier because the positions within the sets is meaningful, and thus we can rely on the positioning to understand which chunk is moving where; for replicated pools I have yet to find a concept of a "replica ID" that can be used to match the acting and up sets and thus we attempt to reorder the up and acting sets so that their ordering is the same for any shared elements. I suspect the best fix will be for the sort to take into account the upmaps for the PG.
A workaround in this case would be to ceph osd pg-upmap-items 1.38f 51 3 and then re-run cancel-backfill.
Whew, sorry for the silence - been a busy couple weeks.
Indeed, error handling can be improved in general in this area. I suspect that as we further improve the resilience of the upmap engine then the panics will disappear.
Activity
baergj commentedon May 29, 2021
Thanks for the report! I'll try to take a look next week.
This is commonly caused by Ceph not cleaning out stale upmaps, and pgremapper is perhaps overly cautious when it encounters this. We will often manually
ceph OSD rm-pg-upmap-items <pgid>in this case if we're about to cancel backfill anyway, but I think there are ways to safely and gracefully handle this better within the tool.baergj commentedon Jun 5, 2021
Here's the upmap entry for this PG:
{ "pgid": "1.38f", "mappings": [ { "from": 51, "to": 3 }, { "from": 19, "to": 11 } ] },And the current PG state:
{ "pgid": "1.38f", "state": "active+remapped+backfill_wait", "up": [ 3, 66, 11 ], "acting": [ 3, 19, 39 ], "up_primary": 3, "acting_primary": 3 },This is definitely a bug; there's already an upmap 19->11 and pgremapper is trying to do 66->19. It should be doing 66->39. The issue, I think, is that
cancel-backfilldoesn't take existing upmaps that haven't been backfilled yet into account properly. For EC this is a bit easier because the positions within the sets is meaningful, and thus we can rely on the positioning to understand which chunk is moving where; for replicated pools I have yet to find a concept of a "replica ID" that can be used to match the acting and up sets and thus we attempt to reorder the up and acting sets so that their ordering is the same for any shared elements. I suspect the best fix will be for the sort to take into account the upmaps for the PG.A workaround in this case would be to
ceph osd pg-upmap-items 1.38f 51 3and then re-runcancel-backfill.k0ste commentedon Jun 6, 2021
We too. As suggestion, my be pgremapper can handle this for like a exception and message to stdout, instead panic?🤔
baergj commentedon Jun 17, 2021
Whew, sorry for the silence - been a busy couple weeks.
Indeed, error handling can be improved in general in this area. I suspect that as we further improve the resilience of the upmap engine then the panics will disappear.
baergj commentedon Jun 17, 2021
Fixed by #7.