Skip to content

Commit

Permalink
mon/OSDMonitor: health warn if require_{jewel,kraken} flags aren't set
Browse files Browse the repository at this point in the history
We want to prompt users to set these flags as soon as their
upgrades complete.

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Oct 18, 2016
1 parent d9baaa1 commit ae0d6eb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/mon/OSDMonitor.cc
Expand Up @@ -3094,6 +3094,26 @@ void OSDMonitor::get_health(list<pair<health_status_t,string> >& summary,
}
}

// warn about upgrade flags that can be set but are not.
if ((osdmap.get_up_osd_features() & CEPH_FEATURE_SERVER_JEWEL) &&
!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_JEWEL)) {
string msg = "all OSDs are running jewel or later but the"
" 'require_jewel_osds' osdmap flag is not set";
summary.push_back(make_pair(HEALTH_WARN, msg));
if (detail) {
detail->push_back(make_pair(HEALTH_WARN, msg));
}
}
if ((osdmap.get_up_osd_features() & CEPH_FEATURE_SERVER_KRAKEN) &&
!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_KRAKEN)) {
string msg = "all OSDs are running kraken or later but the"
" 'require_kraken_osds' osdmap flag is not set";
summary.push_back(make_pair(HEALTH_WARN, msg));
if (detail) {
detail->push_back(make_pair(HEALTH_WARN, msg));
}
}

get_pools_health(summary, detail);
}
}
Expand Down

1 comment on commit ae0d6eb

@amitkumar50
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok

Please sign in to comment.