diff --git a/mon/mon.js b/mon/mon.js index 53d2cdd5..bf2ba2fe 100644 --- a/mon/mon.js +++ b/mon/mon.js @@ -37,7 +37,6 @@ const etcd_allow = new RegExp('^'+[ 'pg/state/[1-9]\\d*/[1-9]\\d*', 'pg/stats/[1-9]\\d*/[1-9]\\d*', 'pg/history/[1-9]\\d*/[1-9]\\d*', - 'pool/stats/[1-9]\\d*', 'history/last_clean_pgs', 'inode/stats/[1-9]\\d*/\\d+', 'pool/stats/[1-9]\\d*', diff --git a/src/cli_pool_cfg.cpp b/src/cli_pool_cfg.cpp index 40cf04f2..475d0a3a 100644 --- a/src/cli_pool_cfg.cpp +++ b/src/cli_pool_cfg.cpp @@ -71,7 +71,7 @@ std::string validate_pool_config(json11::Json::object & new_cfg, json11::Json ol auto & key = kv_it->first; auto & value = kv_it->second; if (key == "pg_size" || key == "parity_chunks" || key == "pg_minsize" || - key == "pg_count" || key == "max_osd_combinations" || key == "block_size" || + key == "pg_count" || key == "max_osd_combinations" || key == "bitmap_granularity" || key == "pg_stripe_size") { if (value.is_number() && value.uint64_value() != value.number_value() || @@ -81,6 +81,14 @@ std::string validate_pool_config(json11::Json::object & new_cfg, json11::Json ol } value = value.uint64_value(); } + else if (key == "block_size") + { + value = value.is_string() ? parse_size(value.string_value()) : value.uint64_value(); + if (!value) + { + return key+" must be an integer with or without size suffix (K/M/G/T)"; + } + } else if (key == "name" || key == "scheme" || key == "immediate_commit" || key == "failure_domain" || key == "root_node" || key == "scrub_interval" || key == "used_for_fs" || key == "raw_placement")