Do not die on invalid pool configurations
Test / buildenv (push) Successful in 10s Details
Test / build (push) Successful in 3m13s Details
Test / test_cas (push) Successful in 9s Details
Test / make_test (push) Successful in 39s Details
Test / test_change_pg_count (push) Successful in 37s Details
Test / test_change_pg_size (push) Successful in 7s Details
Test / test_change_pg_count_ec (push) Successful in 34s Details
Test / test_create_nomaxid (push) Successful in 7s Details
Test / test_etcd_fail (push) Successful in 55s Details
Test / test_add_osd (push) Successful in 2m44s Details
Test / test_interrupted_rebalance_ec (push) Successful in 2m5s Details
Test / test_interrupted_rebalance_imm (push) Successful in 2m58s Details
Test / test_interrupted_rebalance (push) Successful in 3m0s Details
Test / test_failure_domain (push) Successful in 10s Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 1m27s Details
Test / test_minsize_1 (push) Successful in 16s Details
Test / test_snapshot (push) Successful in 26s Details
Test / test_snapshot_ec (push) Successful in 27s Details
Test / test_rm (push) Successful in 16s Details
Test / test_move_reappear (push) Successful in 24s Details
Test / test_snapshot_down (push) Successful in 26s Details
Test / test_snapshot_down_ec (push) Successful in 31s Details
Test / test_splitbrain (push) Successful in 17s Details
Test / test_snapshot_chain (push) Successful in 2m34s Details
Test / test_snapshot_chain_ec (push) Successful in 3m12s Details
Test / test_rebalance_verify_imm (push) Successful in 2m59s Details
Test / test_rebalance_verify (push) Successful in 3m27s Details
Test / test_switch_primary (push) Successful in 34s Details
Test / test_write (push) Successful in 55s Details
Test / test_write_xor (push) Successful in 54s Details
Test / test_write_no_same (push) Successful in 15s Details
Test / test_rebalance_verify_ec (push) Successful in 4m37s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 4m8s Details
Test / test_heal_pg_size_2 (push) Successful in 3m48s Details
Test / test_heal_ec (push) Successful in 3m47s Details
Test / test_heal_csum_32k_dmj (push) Successful in 6m8s Details
Test / test_heal_csum_32k_dj (push) Successful in 6m18s Details
Test / test_heal_csum_32k (push) Successful in 7m9s Details
Test / test_heal_csum_4k_dmj (push) Successful in 7m7s Details
Test / test_scrub (push) Successful in 1m9s Details
Test / test_scrub_zero_osd_2 (push) Successful in 1m8s Details
Test / test_scrub_xor (push) Successful in 1m7s Details
Test / test_heal_csum_4k_dj (push) Successful in 6m20s Details
Test / test_heal_csum_4k (push) Successful in 5m58s Details
Test / test_scrub_pg_size_3 (push) Successful in 2m9s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 1m4s Details
Test / test_nfs (push) Successful in 15s Details
Test / test_scrub_ec (push) Successful in 21s Details

master
Vitaliy Filippov 2024-01-02 00:50:23 +03:00
parent 31c2751b9b
commit 9fe779a691
1 changed files with 6 additions and 2 deletions

View File

@ -1349,8 +1349,8 @@ class Mon
// Something has changed
console.log('Pool configuration or OSD tree changed, re-optimizing');
// First re-optimize PGs, but don't look at history yet
const optimize_results = await Promise.all(Object.keys(this.state.config.pools)
.map(pool_id => this.generate_pool_pgs(pool_id, osd_tree, levels)));
const optimize_results = (await Promise.all(Object.keys(this.state.config.pools)
.map(pool_id => this.generate_pool_pgs(pool_id, osd_tree, levels)))).filter(r => r);
// Then apply the modification in the form of an optimistic transaction,
// each time considering new pg/history modifications (OSDs modify it during rebalance)
while (!await this.apply_pool_pgs(optimize_results, up_osds, osd_tree, tree_hash))
@ -1436,6 +1436,10 @@ class Mon
async apply_pool_pgs(results, up_osds, osd_tree, tree_hash)
{
if (!results.length)
{
return true;
}
for (const pool_id in (this.state.config.pgs||{}).items||{})
{
// We should stop all PGs when deleting a pool or changing its PG count