Fix non-existing pool handling in `vitastor-cli ls`
Test / buildenv (push) Successful in 10s Details
Test / build (push) Successful in 2m48s Details
Test / make_test (push) Successful in 35s Details
Test / test_add_osd (push) Successful in 1m55s Details
Test / test_cas (push) Successful in 8s Details
Test / test_change_pg_count (push) Successful in 37s Details
Test / test_change_pg_count_ec (push) Successful in 35s Details
Test / test_change_pg_size (push) Successful in 8s Details
Test / test_create_nomaxid (push) Successful in 7s Details
Test / test_etcd_fail (push) Successful in 1m24s Details
Test / test_interrupted_rebalance (push) Successful in 2m6s Details
Test / test_interrupted_rebalance_imm (push) Successful in 3m11s Details
Test / test_interrupted_rebalance_ec (push) Successful in 2m6s Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 2m20s Details
Test / test_failure_domain (push) Successful in 22s Details
Test / test_snapshot (push) Successful in 50s Details
Test / test_snapshot_ec (push) Successful in 33s Details
Test / test_minsize_1 (push) Successful in 13s Details
Test / test_move_reappear (push) Successful in 1m23s Details
Test / test_rm (push) Successful in 13s Details
Test / test_snapshot_chain (push) Successful in 2m22s Details
Test / test_snapshot_chain_ec (push) Successful in 3m6s Details
Test / test_snapshot_down (push) Successful in 24s Details
Test / test_snapshot_down_ec (push) Successful in 22s Details
Test / test_splitbrain (push) Successful in 19s Details
Test / test_rebalance_verify (push) Successful in 3m28s Details
Test / test_rebalance_verify_imm (push) Successful in 3m27s Details
Test / test_rebalance_verify_ec (push) Successful in 9m10s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 9m29s Details
Test / test_write (push) Successful in 1m36s Details
Test / test_write_xor (push) Successful in 2m17s Details
Test / test_write_no_same (push) Successful in 36s Details
Test / test_heal_pg_size_2 (push) Successful in 6m27s Details
Test / test_heal_ec (push) Successful in 5m53s Details
Test / test_scrub (push) Successful in 44s Details
Test / test_scrub_zero_osd_2 (push) Successful in 35s Details
Test / test_scrub_xor (push) Successful in 36s Details
Test / test_scrub_pg_size_3 (push) Successful in 1m1s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 46s Details
Test / test_scrub_ec (push) Successful in 36s Details

hotfix-1.0.0
Vitaliy Filippov 2023-07-18 23:51:50 +03:00
parent 004912aac0
commit d0e257ee81
1 changed files with 6 additions and 3 deletions

View File

@ -56,14 +56,15 @@ struct image_lister_t
{ {
continue; continue;
} }
auto & pool_cfg = parent->cli->st_cli.pool_config.at(INODE_POOL(ic.second.num)); auto pool_it = parent->cli->st_cli.pool_config.find(INODE_POOL(ic.second.num));
bool good_pool = pool_it != parent->cli->st_cli.pool_config.end();
auto item = json11::Json::object { auto item = json11::Json::object {
{ "name", ic.second.name }, { "name", ic.second.name },
{ "size", ic.second.size }, { "size", ic.second.size },
{ "used_size", 0 }, { "used_size", 0 },
{ "readonly", ic.second.readonly }, { "readonly", ic.second.readonly },
{ "pool_id", (uint64_t)INODE_POOL(ic.second.num) }, { "pool_id", (uint64_t)INODE_POOL(ic.second.num) },
{ "pool_name", pool_cfg.name }, { "pool_name", good_pool ? pool_it->second.name : "? (ID:"+std::to_string(INODE_POOL(ic.second.num))+")" },
{ "inode_num", INODE_NO_POOL(ic.second.num) }, { "inode_num", INODE_NO_POOL(ic.second.num) },
{ "inode_id", ic.second.num }, { "inode_id", ic.second.num },
}; };
@ -247,6 +248,8 @@ resume_1:
if (state == 1) if (state == 1)
goto resume_1; goto resume_1;
get_list(); get_list();
if (state == 100)
return;
if (show_stats) if (show_stats)
{ {
resume_1: resume_1:
@ -269,7 +272,7 @@ resume_1:
{ "key", "name" }, { "key", "name" },
{ "title", "NAME" }, { "title", "NAME" },
}); });
if (!list_pool_id) if (list_pool_name == "")
{ {
cols.push_back(json11::Json::object{ cols.push_back(json11::Json::object{
{ "key", "pool_name" }, { "key", "pool_name" },