From: Casey Bodley Date: Mon, 7 Dec 2015 16:30:50 +0000 (-0500) Subject: rgw: 'realm pull' uses realm's current_period for do_period_pull X-Git-Tag: v10.1.0~354^2~84 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2d90f85803ed70b5867a7b59e7312ab5e5457a06;p=ceph.git rgw: 'realm pull' uses realm's current_period for do_period_pull 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 --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 57c488bf201a..da0cf14638ed 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -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; } }