Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon: OSDMonitor: Missing nearfull flag set #11082

Merged
merged 1 commit into from Sep 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/mon/OSDMonitor.cc
Expand Up @@ -2827,9 +2827,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