]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: 'realm pull' uses realm's current_period for do_period_pull
authorCasey Bodley <cbodley@redhat.com>
Mon, 7 Dec 2015 16:30:50 +0000 (11:30 -0500)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:50 +0000 (16:13 -0800)
instead of using period_id/period_epoch, which are radosgw-admin
arguments that are unused by 'realm pull', use the period id from
realm.get_current_period() and epoch=0 to get its latest epoch

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_admin.cc

index 57c488bf201a22dfb606ad5e42b73d3c8e8e5e34..da0cf14638ed519f08cb76f090055887727195af 100644 (file)
@@ -2401,12 +2401,14 @@ int main(int argc, char **argv)
           return -EINVAL;
         }
         RGWPeriod period;
-        if (!realm.get_current_period().empty()) {
+        auto& current_period = realm.get_current_period();
+        if (!current_period.empty()) {
+          // pull the latest epoch of the realm's current period
           ret = do_period_pull(remote, url, access_key, secret_key,
-                               realm_id, realm_name, period_id, period_epoch,
+                               realm_id, realm_name, current_period, "",
                                &period);
           if (ret < 0) {
-            cerr << "could not fetch period " << realm.get_current_period() << std::endl;
+            cerr << "could not fetch period " << current_period << std::endl;
             return -ret;
           }
         }