From 9a775a1c90d3651f49d19cdb52ceb662c9cf752c Mon Sep 17 00:00:00 2001 From: Kamoltat Sirivadhna Date: Sat, 14 Sep 2024 18:22:55 +0000 Subject: [PATCH] src/mon/MonMap: modify dump function Problem: Current dump for "removed_ranks" and "disallowed_leaders" doesn't have the correct format so the python test script can parse through these values. Solution: Modified the values such that it is in the correct format Conflict: src/osd/osd_types.cc: Added f->dump_bool("is_stretch_pool", is_stretch_pool()); Signed-off-by: Kamoltat Sirivadhna (cherry picked from commit a7f3b7b749acabd235d615a3f5b80e3398a6d80d) --- src/mon/MonMap.cc | 4 ++-- src/osd/osd_types.cc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mon/MonMap.cc b/src/mon/MonMap.cc index 3dbc3106fe1..178eeebd92c 100644 --- a/src/mon/MonMap.cc +++ b/src/mon/MonMap.cc @@ -415,10 +415,10 @@ void MonMap::dump(Formatter *f) const f->dump_unsigned("min_mon_release", to_integer(min_mon_release)); f->dump_string("min_mon_release_name", to_string(min_mon_release)); f->dump_int ("election_strategy", strategy); - f->dump_stream("disallowed_leaders: ") << disallowed_leaders; + f->dump_stream("disallowed_leaders") << disallowed_leaders; f->dump_bool("stretch_mode", stretch_mode_enabled); f->dump_string("tiebreaker_mon", tiebreaker_mon); - f->dump_stream("removed_ranks: ") << removed_ranks; + f->dump_stream("removed_ranks") << removed_ranks; f->open_object_section("features"); persistent_features.dump(f, "persistent"); optional_features.dump(f, "optional"); diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 841a44b32f5..5e100315848 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -1561,6 +1561,7 @@ void pg_pool_t::dump(Formatter *f) const f->dump_int("peering_crush_bucket_target", peering_crush_bucket_target); f->dump_int("peering_crush_bucket_barrier", peering_crush_bucket_barrier); f->dump_int("peering_crush_bucket_mandatory_member", peering_crush_mandatory_member); + f->dump_bool("is_stretch_pool", is_stretch_pool()); f->dump_int("object_hash", get_object_hash()); f->dump_string("pg_autoscale_mode", get_pg_autoscale_mode_name(pg_autoscale_mode)); -- 2.39.5