Skip to content

Commit

Permalink
Merge pull request #11082 from aiicore/nearfull_flag_fix
Browse files Browse the repository at this point in the history
mon: OSDMonitor: Missing nearfull flag set

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
yuriw committed Sep 22, 2016
2 parents 8f8a7a4 + 754887b commit 729a43f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/mon/OSDMonitor.cc
Expand Up @@ -2866,9 +2866,20 @@ void OSDMonitor::tick()
dout(10) << "No full osds, removing full flag" << dendl;
remove_flag(CEPH_OSDMAP_FULL);
}

if (!mon->pgmon()->pg_map.nearfull_osds.empty()) {
dout(5) << "There are near full osds, setting nearfull flag" << dendl;
add_flag(CEPH_OSDMAP_NEARFULL);
} else if (osdmap.test_flag(CEPH_OSDMAP_NEARFULL)){
dout(10) << "No near full osds, removing nearfull flag" << dendl;
remove_flag(CEPH_OSDMAP_NEARFULL);
}
if (pending_inc.new_flags != -1 &&
(pending_inc.new_flags ^ osdmap.flags) & CEPH_OSDMAP_FULL) {
dout(1) << "New setting for CEPH_OSDMAP_FULL -- doing propose" << dendl;
(pending_inc.new_flags ^ osdmap.flags) & (CEPH_OSDMAP_FULL | CEPH_OSDMAP_NEARFULL)) {
dout(1) << "New setting for" <<
(pending_inc.new_flags & CEPH_OSDMAP_FULL ? " CEPH_OSDMAP_FULL" : "") <<
(pending_inc.new_flags & CEPH_OSDMAP_NEARFULL ? " CEPH_OSDMAP_NEARFULL" : "")
<< " -- doing propose" << dendl;
do_propose = true;
}
}
Expand Down

0 comments on commit 729a43f

Please sign in to comment.