Compare commits

...

2 Commits

Author SHA1 Message Date
Vitaliy Filippov 23a9aa93b5 Fix pool create/modify --block_size validation
Test / test_splitbrain (push) Has been skipped Details
Test / test_rebalance_verify (push) Has been skipped Details
Test / test_rebalance_verify_imm (push) Has been skipped Details
Test / test_rebalance_verify_ec (push) Has been skipped Details
Test / test_rebalance_verify_ec_imm (push) Has been skipped Details
Test / test_root_node (push) Has been skipped Details
Test / test_switch_primary (push) Has been skipped Details
Test / test_write (push) Has been skipped Details
Test / test_write_xor (push) Has been skipped Details
Test / test_write_no_same (push) Has been skipped Details
Test / test_heal_pg_size_2 (push) Has been skipped Details
Test / test_heal_ec (push) Has been skipped Details
Test / test_heal_csum_32k_dmj (push) Has been skipped Details
Test / test_heal_csum_32k_dj (push) Has been skipped Details
Test / test_heal_csum_32k (push) Has been skipped Details
Test / test_heal_csum_4k_dmj (push) Has been skipped Details
Test / test_heal_csum_4k_dj (push) Has been skipped Details
Test / test_heal_csum_4k (push) Has been skipped Details
Test / test_osd_tags (push) Has been skipped Details
Test / test_enospc (push) Has been skipped Details
Test / test_enospc_xor (push) Has been skipped Details
Test / test_enospc_imm (push) Has been skipped Details
Test / test_enospc_imm_xor (push) Has been skipped Details
Test / test_scrub (push) Has been skipped Details
Test / test_scrub_zero_osd_2 (push) Has been skipped Details
Test / test_scrub_xor (push) Has been skipped Details
Test / test_scrub_pg_size_3 (push) Has been skipped Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Has been skipped Details
Test / test_scrub_ec (push) Has been skipped Details
Test / test_nfs (push) Has been skipped Details
2024-05-04 16:33:22 +03:00
Vitaliy Filippov 2412d9e239 Fix TTL comparison for lease/keepalive
Test / test_snapshot_chain_ec (push) Successful in 3m5s Details
Test / test_rebalance_verify_imm (push) Successful in 3m29s Details
Test / test_root_node (push) Successful in 9s Details
Test / test_rebalance_verify (push) Successful in 4m3s Details
Test / test_switch_primary (push) Successful in 35s Details
Test / test_write (push) Successful in 54s Details
Test / test_write_no_same (push) Successful in 13s Details
Test / test_write_xor (push) Successful in 54s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 3m58s Details
Test / test_rebalance_verify_ec (push) Successful in 4m58s Details
Test / test_heal_pg_size_2 (push) Successful in 4m6s Details
Test / test_heal_ec (push) Successful in 4m15s Details
Test / test_heal_csum_32k_dmj (push) Successful in 5m52s Details
Test / test_heal_csum_32k_dj (push) Successful in 5m59s Details
Test / test_heal_csum_32k (push) Successful in 7m7s Details
Test / test_heal_csum_4k_dmj (push) Successful in 6m57s Details
Test / test_osd_tags (push) Successful in 28s Details
Test / test_enospc (push) Successful in 1m58s Details
Test / test_heal_csum_4k_dj (push) Successful in 6m53s Details
Test / test_heal_csum_4k (push) Successful in 6m20s Details
Test / test_enospc_xor (push) Successful in 2m9s Details
Test / test_enospc_imm (push) Successful in 41s Details
Test / test_scrub_zero_osd_2 (push) Successful in 35s Details
Test / test_scrub (push) Successful in 38s Details
Test / test_scrub_xor (push) Successful in 34s Details
Test / test_enospc_imm_xor (push) Successful in 58s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 35s Details
Test / test_scrub_ec (push) Successful in 33s Details
Test / test_nfs (push) Successful in 19s Details
Test / test_scrub_pg_size_3 (push) Successful in 41s Details
2024-04-30 01:53:05 +03:00
3 changed files with 10 additions and 3 deletions

View File

@ -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*',

View File

@ -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")

View File

@ -534,7 +534,7 @@ void osd_t::renew_lease(bool reload)
{ "ID", etcd_lease_id }
}, st_cli.etcd_quick_timeout, 0, 0, [this, reload](std::string err, json11::Json data)
{
if (err == "" && data["result"]["TTL"].string_value() == "")
if (err == "" && data["result"]["TTL"].uint64_value() == 0)
{
// Die
fprintf(stderr, "Error refreshing etcd lease\n");