Fix recheck_pgs bug introduced in 1.4.0
Test / buildenv (push) Successful in 10s Details
Test / build (push) Successful in 2m36s Details
Test / test_cas (push) Successful in 12s Details
Test / make_test (push) Successful in 38s Details
Test / test_change_pg_size (push) Successful in 10s Details
Test / test_change_pg_count (push) Successful in 47s Details
Test / test_create_nomaxid (push) Successful in 9s Details
Test / test_change_pg_count_ec (push) Successful in 42s Details
Test / test_interrupted_rebalance_imm (push) Successful in 1m21s Details
Test / test_add_osd (push) Successful in 2m43s Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 1m23s Details
Test / test_failure_domain (push) Successful in 9s Details
Test / test_snapshot (push) Successful in 21s Details
Test / test_snapshot_ec (push) Successful in 21s Details
Test / test_minsize_1 (push) Successful in 14s Details
Test / test_move_reappear (push) Successful in 19s Details
Test / test_rm (push) Successful in 14s Details
Test / test_interrupted_rebalance_ec (push) Successful in 3m27s Details
Test / test_snapshot_chain (push) Successful in 1m24s Details
Test / test_snapshot_down (push) Successful in 25s Details
Test / test_snapshot_chain_ec (push) Successful in 1m54s Details
Test / test_snapshot_down_ec (push) Successful in 20s Details
Test / test_splitbrain (push) Successful in 15s Details
Test / test_rebalance_verify_imm (push) Successful in 2m42s Details
Test / test_etcd_fail (push) Failing after 10m8s Details
Test / test_interrupted_rebalance (push) Failing after 10m9s Details
Test / test_write (push) Successful in 1m22s Details
Test / test_rebalance_verify_ec (push) Failing after 1m51s Details
Test / test_write_no_same (push) Successful in 16s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 3m27s Details
Test / test_write_xor (push) Failing after 3m13s Details
Test / test_heal_pg_size_2 (push) Successful in 3m22s Details
Test / test_rebalance_verify (push) Failing after 10m9s Details
Test / test_heal_ec (push) Successful in 4m41s Details
Test / test_heal_csum_32k_dmj (push) Successful in 4m42s Details
Test / test_heal_csum_32k_dj (push) Successful in 4m58s Details
Test / test_heal_csum_32k (push) Successful in 6m34s Details
Test / test_scrub (push) Successful in 54s Details
Test / test_heal_csum_4k_dmj (push) Successful in 6m56s Details
Test / test_scrub_zero_osd_2 (push) Successful in 49s Details
Test / test_heal_csum_4k_dj (push) Successful in 6m1s Details
Test / test_scrub_ec (push) Has been cancelled Details
Test / test_heal_csum_4k (push) Has been cancelled Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Has been cancelled Details
Test / test_scrub_xor (push) Has been cancelled Details
Test / test_scrub_pg_size_3 (push) Has been cancelled Details

test-fix-ec-unknown-state-51
Vitaliy Filippov 2024-01-16 23:49:21 +03:00
parent 2cf649eba6
commit 3ca3b8a8d8
1 changed files with 13 additions and 1 deletions

View File

@ -1414,7 +1414,14 @@ class Mon
}
if (changed)
{
await this.save_pg_config(new_config_pgs);
const ok = await this.save_pg_config(new_config_pgs);
if (ok)
console.log('PG configuration successfully changed');
else
{
console.log('Someone changed PG configuration while we also tried to change it. Retrying in '+this.config.mon_change_timeout+' ms');
this.schedule_recheck();
}
}
}
this.recheck_pgs_active = false;
@ -1495,6 +1502,11 @@ class Mon
this.save_new_pgs_txn(new_config_pgs, etcd_request, pool_id, up_osds, osd_tree, real_prev_pgs, pool_res.pgs, pg_history);
}
new_config_pgs.hash = tree_hash;
return await this.save_pg_config(new_config_pgs, etcd_request);
}
async save_pg_config(new_config_pgs, etcd_request = { compare: [], success: [] })
{
etcd_request.compare.push(
{ key: b64(this.etcd_prefix+'/mon/master'), target: 'LEASE', lease: ''+this.etcd_lease_id },
{ key: b64(this.etcd_prefix+'/config/pgs'), target: 'MOD', mod_revision: ''+this.etcd_watch_revision, result: 'LESS' },