From 9116d9af674c22fea60745f567703afd0f5e1b37 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 31 Jul 2019 14:19:28 -0400 Subject: [PATCH] pybind/mgr/rbd_support: ignore missing OSD support for RBD namespaces 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 (cherry picked from commit 10c0c806819741012e1c440c38fac17682125d9a) --- src/pybind/mgr/rbd_support/module.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/rbd_support/module.py b/src/pybind/mgr/rbd_support/module.py index 85752cf452f8f..4db1da4e36636 100644 --- a/src/pybind/mgr/rbd_support/module.py +++ b/src/pybind/mgr/rbd_support/module.py @@ -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 -- 2.39.5