When radosgw-admin data sync init is called on a cluster, the next run
of rgw crashes as when it processes ListBucketIndexesCR, num_shards
isn't set which is later referenced in ListBucketIndexesCR. Setting the
n sync_info.num_shards correctly to handle this case
Fixes: http://tracker.ceph.com/issues/22083
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit
4015a57c473d896164b0617be93777d0947a9576)
Conflicts:
src/rgw/rgw_data_sync.cc
}
if ((rgw_data_sync_info::SyncState)sync_status.sync_info.state == rgw_data_sync_info::StateBuildingFullSyncMaps) {
+ sync_status.sync_info.num_shards = num_shards;
/* state: building full sync maps */
ldout(sync_env->cct, 20) << __func__ << "(): building full sync maps" << dendl;
yield call(new RGWListBucketIndexesCR(sync_env, &sync_status));