]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: sync: encoding fixes
authorYehuda Sadeh <yehuda@redhat.com>
Sat, 26 Oct 2019 01:33:12 +0000 (18:33 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 28 Jan 2020 18:20:37 +0000 (10:20 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_json_enc.cc

index f73019f3ec6c37b7517423f07d7dab7563cf6085..b2d571e53aa616381419e3e8e4abe9487d9d5360 100644 (file)
@@ -921,6 +921,13 @@ void rgw_sync_bucket_entities::decode_json(JSONObj *obj)
     }
   }
   JSONDecoder::decode_json("zones", zones, obj);
+  if (zones && zones->size() == 1) {
+    auto iter = zones->begin();
+    if (*iter == "*") {
+      zones.reset();
+      all_zones = true;
+    }
+  }
 }
 
 void rgw_sync_bucket_pipe::dump(Formatter *f) const
@@ -1351,6 +1358,7 @@ void RGWZoneGroup::decode_json(JSONObj *obj)
   JSONDecoder::decode_json("default_placement", default_placement.name, obj);
   JSONDecoder::decode_json("default_storage_class", default_placement.storage_class, obj);
   JSONDecoder::decode_json("realm_id", realm_id, obj);
+  JSONDecoder::decode_json("sync_policy", sync_policy, obj);
 }