rest handlers for sync status need to return ENOENT errors. the only
other callers are in radosgw-admin, so the ENOENT errors are ignored at
those call sites instead
Signed-off-by: Casey Bodley <cbodley@redhat.com>
}
ret = sync.read_sync_status();
- if (ret < 0) {
+ if (ret < 0 && ret != -ENOENT) {
push_ss(ss, status, tab) << string("failed read sync status: ") + cpp_strerror(-ret);
return;
}
}
ret = sync.read_sync_status();
- if (ret < 0) {
+ if (ret < 0 && ret != -ENOENT) {
cerr << "ERROR: sync.read_sync_status() returned ret=" << ret << std::endl;
return -ret;
}
int RGWRemoteDataLog::read_sync_status(rgw_data_sync_status *sync_status)
{
- int r = run(new RGWReadDataSyncStatusCoroutine(&sync_env, sync_status));
- if (r == -ENOENT) {
- r = 0;
- }
- return r;
+ return run(new RGWReadDataSyncStatusCoroutine(&sync_env, sync_status));
}
int RGWRemoteDataLog::init_sync_status(int num_shards)