]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/dashboard: monkeypatch os.exit to stop cherrypy from taking down mgr 15588/head
authorSage Weil <sage@redhat.com>
Thu, 8 Jun 2017 22:12:02 +0000 (18:12 -0400)
committerSage Weil <sage@redhat.com>
Thu, 8 Jun 2017 22:12:02 +0000 (18:12 -0400)
Fixes: http://tracker.ceph.com/issues/20216
Suggested-by: Tim Serong <tserong@suse.com>
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/dashboard/module.py

index 6e5c2347c8dce748c8bfee44e3137daab3ed6a0d..df0437da550b50638a4a02d9d6f8cdb535e86c51 100644 (file)
@@ -43,6 +43,12 @@ log = logging.getLogger("dashboard")
 # python module for the convenience of the GUI?
 LOG_BUFFER_SIZE = 30
 
+# cherrypy likes to sys.exit on error.  don't let it take us down too!
+def os_exit_noop():
+    pass
+
+os._exit = os_exit_noop
+
 
 def recurse_refs(root, path):
     if isinstance(root, dict):