]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix json output for bucket layout 60499/head
authorSeena Fallah <seenafallah@gmail.com>
Fri, 25 Oct 2024 23:57:24 +0000 (01:57 +0200)
committerSeena Fallah <seenafallah@gmail.com>
Fri, 25 Oct 2024 23:57:24 +0000 (01:57 +0200)
f19347d43b7cd4bb1e009e66305f6e736c4c5d89 has broken the bucket
layout JSON output by printing `judge_reshard_lock_time` inside
the logs array.

Fixes: https://tracker.ceph.com/issues/68726
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
src/rgw/rgw_bucket_layout.cc

index f8c485d89c33b9ca9628c253b308f971146163e0..1f8db396a0d13487a96cd3ba825390ca80bb3853 100644 (file)
@@ -376,9 +376,9 @@ void encode_json_impl(const char *name, const BucketLayout& l, ceph::Formatter *
   for (const auto& log : l.logs) {
     encode_json("log", log, f);
   }
+  f->close_section(); // logs[]
   utime_t jt(l.judge_reshard_lock_time);
   encode_json("judge_reshard_lock_time", jt, f);
-  f->close_section(); // logs[]
   f->close_section();
 }
 void decode_json_obj(BucketLayout& l, JSONObj *obj)