Bug #1370
closed
pgmon: PGMap::creating_pgs is not checked on leader election
Added by Greg Farnum over 12 years ago.
Updated over 12 years ago.
Description
So, state is lost when the leader changes. This needs a little bit of thought to handle leaders updating their maps properly.
- Status changed from New to In Progress
- Target version changed from v0.33 to v0.34
- Translation missing: en.field_position set to 31
Ah, not quite what I thought it was. creating_pgs is actually maintained via stat_pg_[add|sub], and it's done correctly. The problem is that creating_pgs is only dealt with in register_new_pgs, which is only called via check_osd_map, which is only called by OSDMonitor::update_from_paxos. Which is called frequently, but backs out unless there's a new map it didn't have before.
And if your cluster is stable, you can keep the same OSD map for a looooooong time.
Which meant that if you got a new leader election at the wrong time, you could have PG creations that are indefinitely delayed. To handle this, use the virtual on_active() method and call check_osd_map (if you're the leader.
- Subject changed from pgmon: PGMap::creating_pgs is not serialized to disk to pgmon: PGMap::creating_pgs is not checked on leader election
- Status changed from In Progress to 7
- Status changed from 7 to Resolved
Also available in: Atom
PDF