Skip to content

Commit

Permalink
Merge pull request #16534 from liewegas/wip-20751
Browse files Browse the repository at this point in the history
mon/OSDMonitor: ensure UP is not set for newly-created OSDs

Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
liewegas committed Jul 26, 2017
2 parents d2c31a8 + a950650 commit a3b4f08
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mon/OSDMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7008,6 +7008,12 @@ int OSDMonitor::prepare_command_osd_new(
assert(osdmap.is_destroyed(id));
pending_inc.new_weight[id] = CEPH_OSD_OUT;
pending_inc.new_state[id] |= CEPH_OSD_DESTROYED | CEPH_OSD_NEW;
if (osdmap.get_state(id) & CEPH_OSD_UP) {
// due to http://tracker.ceph.com/issues/20751 some clusters may
// have UP set for non-existent OSDs; make sure it is cleared
// for a newly created osd.
pending_inc.new_state[id] |= CEPH_OSD_UP;
}
pending_inc.new_uuid[id] = uuid;
} else {
assert(id >= 0);
Expand Down

0 comments on commit a3b4f08

Please sign in to comment.