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 3, 2016
1 parent 5e0daf6 commit 37c8d90
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/mon/OSDMonitor.cc
Expand Up @@ -3075,6 +3075,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

0 comments on commit 37c8d90

Please sign in to comment.