From: Volker Theile Date: Tue, 11 Sep 2018 10:37:28 +0000 (+0200) Subject: mgr/dashboard: Catch LookupError when checking the RGW status X-Git-Tag: v14.0.1~233^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0035bb0831ee94293ec236fa8bb818a852ca0081;p=ceph.git mgr/dashboard: Catch LookupError when checking the RGW status This exception is thrown by the RGW client function _determine_rgw_addr(). Without catching that exception a 'The server encountered an unexpected condition which prevented it from fulfilling the request.' will be displayed in the UI instead of displaying a notification panel with a hint that the Object Gateway is not running. Fixes: https://tracker.ceph.com/issues/35921 Signed-off-by: Volker Theile --- diff --git a/src/pybind/mgr/dashboard/controllers/rgw.py b/src/pybind/mgr/dashboard/controllers/rgw.py index 71097919aed5..4576b97d81d3 100644 --- a/src/pybind/mgr/dashboard/controllers/rgw.py +++ b/src/pybind/mgr/dashboard/controllers/rgw.py @@ -38,7 +38,7 @@ class Rgw(BaseController): instance.userid) raise RequestException(status['message']) status['available'] = True - except RequestException: + except (RequestException, LookupError): pass return status