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

infernalis: mon: Ceph Pools' MAX AVAIL is 0 if some OSDs' weight is 0 #6907

Merged
merged 1 commit into from
Feb 8, 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
5 changes: 4 additions & 1 deletion src/mon/PGMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1301,9 +1301,12 @@ int64_t PGMonitor::get_rule_avail(OSDMap& osdmap, int ruleno) const
for (map<int,float>::iterator p = wm.begin(); p != wm.end(); ++p) {
ceph::unordered_map<int32_t,osd_stat_t>::const_iterator osd_info = pg_map.osd_stat.find(p->first);
if (osd_info != pg_map.osd_stat.end()) {
if (osd_info->second.kb == 0) {
if (osd_info->second.kb == 0 || p->second == 0) {
// osd must be out, hence its stats have been zeroed
// (unless we somehow managed to have a disk with size 0...)
//
// (p->second == 0), if osd weight is 0, no need to
// calculate proj below.
continue;
}
int64_t proj = (float)((osd_info->second).kb_avail * 1024ull) /
Expand Down