]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_volume_client: add delay for MDSMap to be distributed 23726/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 27 Jul 2018 23:53:53 +0000 (16:53 -0700)
committerJos Collin <jcollin@redhat.com>
Fri, 24 Aug 2018 03:52:31 +0000 (09:22 +0530)
Otherwise the setxattr will fail if the mds has not yet received the MDSMap
which adds the new data pool.

Fixes: https://tracker.ceph.com/issues/25141
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 4853aa7d42f49850b718a20154817c3f11f9455a)

src/pybind/ceph_volume_client.py

index d38f72be9a37ab9e7773e1da3e09832ef05cc3b6..5203f1c0579cd08d279f98da662d3f3ca0f654ab 100644 (file)
@@ -629,6 +629,7 @@ class CephFSVolumeClient(object):
                 self._rados_command("mds add_data_pool", {
                     'pool': pool_name
                 })
+            time.sleep(5) # time for MDSMap to be distributed
             self.fs.setxattr(path, 'ceph.dir.layout.pool', pool_name, 0)
 
         # enforce security isolation, use separate namespace for this volume