From bb2e9473bec56c87c75275f4b8694e0336a4ed7f Mon Sep 17 00:00:00 2001 From: zhang Shaowen Date: Wed, 4 Sep 2019 14:46:13 +0800 Subject: [PATCH] rgw: add minssing admin property when sync user info. Fixes: https://tracker.ceph.com/issues/41643 Signed-off-by: zhang Shaowen (cherry picked from commit 9ad975d422aba67c0bf7bc1b114079331e2f7fd5) Conflicts: src/rgw/rgw_json_enc.cc - trivial resolution src/rgw/rgw_user.cc - modification to "static void dump_user_info()" dropped because it changes code that was added by d2c02b37e3a7 which is not being backported --- src/rgw/rgw_json_enc.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index 0c85a57496869..de71a0c9c3c98 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -472,6 +472,9 @@ void RGWUserInfo::dump(Formatter *f) const if (system) { /* no need to show it for every user */ encode_json("system", (bool)system, f); } + if (admin) { + encode_json("admin", (bool)admin, f); + } encode_json("default_placement", default_placement, f); encode_json("placement_tags", placement_tags, f); encode_json("bucket_quota", bucket_quota, f); @@ -550,7 +553,9 @@ void RGWUserInfo::decode_json(JSONObj *obj) bool sys = false; JSONDecoder::decode_json("system", sys, obj); system = (__u8)sys; + bool ad = false; JSONDecoder::decode_json("default_placement", default_placement, obj); + admin = (__u8)ad; JSONDecoder::decode_json("placement_tags", placement_tags, obj); JSONDecoder::decode_json("bucket_quota", bucket_quota, obj); JSONDecoder::decode_json("user_quota", user_quota, obj); -- 2.39.5