Show backfillfull pools in vitastor-cli status
This commit is contained in:
@@ -185,6 +185,7 @@ resume_1:
|
||||
{ "space_efficiency", pool_stats[pool_cfg.id]["space_efficiency"].number_value() },
|
||||
{ "pg_real_size", pool_stats[pool_cfg.id]["pg_real_size"].uint64_value() },
|
||||
{ "osd_count", (uint64_t)pg_per_osd.size() },
|
||||
{ "backfillfull", pool_cfg.backfillfull },
|
||||
};
|
||||
}
|
||||
// Include full pool config
|
||||
@@ -484,6 +485,7 @@ resume_3:
|
||||
st["block_size_fmt"] = format_size(st["block_size"].uint64_value());
|
||||
if (st["bitmap_granularity"].uint64_value())
|
||||
st["bitmap_granularity_fmt"] = format_size(st["bitmap_granularity"].uint64_value());
|
||||
st["backfillfull_fmt"] = st["backfillfull"].bool_value() ? "yes" : "";
|
||||
}
|
||||
// All pool parameters are only displayed in the "detailed" mode
|
||||
// because there's too many of them to show them in table
|
||||
@@ -493,6 +495,7 @@ resume_3:
|
||||
{ "scheme_name", "Scheme" },
|
||||
{ "used_for_fs", "Used for VitastorFS" },
|
||||
{ "status", "Status" },
|
||||
{ "backfillfull_fmt", "Backfillfull" },
|
||||
{ "pg_count_fmt", "PGs" },
|
||||
{ "pg_minsize", "PG minsize" },
|
||||
{ "failure_domain", "Failure domain" },
|
||||
|
||||
@@ -173,6 +173,8 @@ resume_2:
|
||||
}
|
||||
});
|
||||
int pool_count = 0, pools_active = 0;
|
||||
json11::Json::array backfillfull_pool_ids;
|
||||
std::string backfillfull_pool_names;
|
||||
std::map<std::string, int> pgs_by_state;
|
||||
std::string pgs_by_state_str;
|
||||
for (auto & pool_pair: parent->cli->st_cli.pool_config)
|
||||
@@ -204,6 +206,13 @@ resume_2:
|
||||
{
|
||||
pools_active++;
|
||||
}
|
||||
if (pool_cfg.backfillfull)
|
||||
{
|
||||
backfillfull_pool_ids.push_back((uint64_t)pool_pair.first);
|
||||
if (backfillfull_pool_names != "")
|
||||
backfillfull_pool_names += ", ";
|
||||
backfillfull_pool_names += pool_cfg.name;
|
||||
}
|
||||
}
|
||||
for (auto & kv: pgs_by_state)
|
||||
{
|
||||
@@ -242,6 +251,7 @@ resume_2:
|
||||
{ "no_scrub", no_scrub },
|
||||
{ "pool_count", pool_count },
|
||||
{ "active_pool_count", pools_active },
|
||||
{ "backfillfull_pools", backfillfull_pool_ids },
|
||||
{ "pg_states", pgs_by_state },
|
||||
{ "op_stats", agg_stats["op_stats"] },
|
||||
{ "recovery_stats", agg_stats["recovery_stats"] },
|
||||
@@ -338,6 +348,13 @@ resume_2:
|
||||
}
|
||||
warning_str += "\n";
|
||||
}
|
||||
if (backfillfull_pool_names != "")
|
||||
{
|
||||
if (backfillfull_pool_ids.size() > 1)
|
||||
warning_str += " pools "+backfillfull_pool_names+" are backfillfull\n";
|
||||
else
|
||||
warning_str += " pool "+backfillfull_pool_names+" is backfillfull\n";
|
||||
}
|
||||
if (warning_str != "")
|
||||
{
|
||||
warning_str = "\n warning:\n"+warning_str;
|
||||
|
||||
Reference in New Issue
Block a user