mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
mon/PGMap: enable/disable TOO_FEW_OSDS warning with an option
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
e62cfceb95
commit
3b74fbc93d
@ -1605,6 +1605,11 @@ std::vector<Option> get_global_options() {
|
||||
.add_service("mgr")
|
||||
.set_description("Issue a health warning if there are misplaced objects"),
|
||||
|
||||
Option("mon_warn_on_too_few_osds", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
|
||||
.set_default(true)
|
||||
.add_service("mgr")
|
||||
.set_description("Issue a health warning if there are fewer OSDs than osd_pool_default_size"),
|
||||
|
||||
Option("mon_max_snap_prune_per_epoch", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(100)
|
||||
.add_service("mon")
|
||||
|
@ -2693,8 +2693,9 @@ void PGMap::get_health_checks(
|
||||
}
|
||||
|
||||
// TOO_FEW_OSDS
|
||||
auto warn_too_few_osds = cct->_conf.get_val<bool>("mon_warn_on_too_few_osds");
|
||||
auto osd_pool_default_size = cct->_conf.get_val<uint64_t>("osd_pool_default_size");
|
||||
if (osdmap.get_num_osds() < osd_pool_default_size) {
|
||||
if (warn_too_few_osds && osdmap.get_num_osds() < osd_pool_default_size) {
|
||||
ostringstream ss;
|
||||
ss << "OSD count " << osdmap.get_num_osds()
|
||||
<< " < osd_pool_default_size " << osd_pool_default_size;
|
||||
|
Loading…
Reference in New Issue
Block a user