]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/rbd_support: ignore missing OSD support for RBD namespaces 29945/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 31 Jul 2019 18:19:28 +0000 (14:19 -0400)
committerMykola Golub <mgolub@suse.com>
Wed, 28 Aug 2019 08:24:57 +0000 (11:24 +0300)
During upgrades, the OSDs might not yet have been upgraded yet and
therefore might be missing namespace support.

Fixes: https://tracker.ceph.com/issues/41029
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 10c0c806819741012e1c440c38fac17682125d9a)

src/pybind/mgr/rbd_support/module.py

index 85752cf452f8f57bedf320440c09592eca4c2004..4db1da4e366365ca0622d59e59e2a731f14ad2d8 100644 (file)
@@ -673,9 +673,16 @@ class TaskHandler:
                 with self.module.rados.open_ioctx2(int(pool_id)) as ioctx:
                     self.load_task_queue(ioctx, pool_name)
 
-                    for namespace in rbd.RBD().namespace_list(ioctx):
+                    try:
+                        namespaces = rbd.RBD().namespace_list(ioctx)
+                    except rbd.OperationNotSupported:
+                        self.log.debug("Namespaces not supported")
+                        continue
+
+                    for namespace in namespaces:
                         ioctx.set_namespace(namespace)
                         self.load_task_queue(ioctx, pool_name)
+
             except rados.ObjectNotFound:
                 # pool DNE
                 pass