]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: properly handle NoOrchestrator exception
authorJeff Layton <jlayton@redhat.com>
Mon, 11 Feb 2019 16:24:23 +0000 (11:24 -0500)
committerJeff Layton <jlayton@redhat.com>
Tue, 12 Feb 2019 13:08:18 +0000 (08:08 -0500)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/pybind/mgr/volumes/module.py

index 4d67c2070453d718df842c0498cde18a6b29477c..d1eff8e15d23384d5e8f1ecb2faeea9532aa4c44 100644 (file)
@@ -168,7 +168,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         try:
             completion = self.add_stateless_service("mds", spec)
             self._orchestrator_wait([completion])
-        except ImportError:
+        except (ImportError, orchestrator.NoOrchestrator):
             return 0, "", "Volume created successfully (no MDS daemons created)"
         except Exception as e:
             # Don't let detailed orchestrator exceptions (python backtraces)
@@ -249,7 +249,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         try:
             completion = self.remove_stateless_service("mds", vol_name)
             self._orchestrator_wait([completion])
-        except ImportError:
+        except (ImportError, orchestrator.NoOrchestrator):
             self.log.warning("No orchestrator, not tearing down MDS daemons")
         except Exception as e:
             # Don't let detailed orchestrator exceptions (python backtraces)