Project

General

Profile

Bug #1370

pgmon: PGMap::creating_pgs is not checked on leader election

Added by Greg Farnum almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Monitor
Target version:
Start date:
08/05/2011
Due date:
% Done:

0%

Spent time:
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

So, state is lost when the leader changes. This needs a little bit of thought to handle leaders updating their maps properly.

History

#1 Updated by Greg Farnum almost 8 years ago

  • Status changed from New to In Progress

#2 Updated by Sage Weil almost 8 years ago

  • Target version changed from v0.33 to v0.34

#3 Updated by Sage Weil almost 8 years ago

  • translation missing: en.field_position set to 31

#4 Updated by Greg Farnum almost 8 years ago

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.

#5 Updated by Greg Farnum almost 8 years ago

  • 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 Testing

#6 Updated by Greg Farnum almost 8 years ago

  • Status changed from Testing to Resolved

Well, I haven't seen any more errors from here, so I guess I misread something or fixed it elsewhere. Merged all the pg create bits into master in 97a77c1cbc70af7bf266afe820f2fa1627684806

Also available in: Atom PDF