]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
src/mon/MonMap: modify dump function
authorKamoltat Sirivadhna <ksirivad@redhat.com>
Sat, 14 Sep 2024 18:22:55 +0000 (18:22 +0000)
committerKamoltat Sirivadhna <ksirivad@redhat.com>
Wed, 17 Sep 2025 05:39:37 +0000 (05:39 +0000)
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 <ksirivad@redhat.com>
(cherry picked from commit a7f3b7b749acabd235d615a3f5b80e3398a6d80d)

src/mon/MonMap.cc
src/osd/osd_types.cc

index 3dbc3106fe11e57490b5fc5171614891e23977f0..178eeebd92c637c3b499725c9e25b245664c18cb 100644 (file)
@@ -415,10 +415,10 @@ void MonMap::dump(Formatter *f) const
   f->dump_unsigned("min_mon_release", to_integer<unsigned>(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");
index 841a44b32f5387d55c3d4f7a021b1889ea2ff1be..5e100315848ccf2e7a7aafe76a6db5a29fb0772e 100644 (file)
@@ -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));