Merge pull request #19550 from dillaman/wip-22461

rbd-mirror: cluster watcher should ensure it has latest OSD map

Reviewed-by: Mykola Golub <to.my.trociny@gmail.com>
This commit is contained in:
Mykola Golub 2017-12-16 16:32:51 +02:00 committed by GitHub
commit 43b88419d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,8 +57,14 @@ void ClusterWatcher::refresh_pools()
void ClusterWatcher::read_pool_peers(PoolPeers *pool_peers,
PoolNames *pool_names)
{
int r = m_cluster->wait_for_latest_osdmap();
if (r < 0) {
derr << "error waiting for OSD map: " << cpp_strerror(r) << dendl;
return;
}
list<pair<int64_t, string> > pools;
int r = m_cluster->pool_list2(pools);
r = m_cluster->pool_list2(pools);
if (r < 0) {
derr << "error listing pools: " << cpp_strerror(r) << dendl;
return;