From 2d90f85803ed70b5867a7b59e7312ab5e5457a06 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 7 Dec 2015 11:30:50 -0500 Subject: [PATCH] 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 --- src/rgw/rgw_admin.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 57c488bf201a2..da0cf14638ed5 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; } } -- 2.39.5