Douglas Schilling Landgraf has uploaded a new change for review. Change subject: engine_page: Catch exception KeyError ......................................................................
engine_page: Catch exception KeyError If VDSM is not ready to provide network data via vdscli.getVdsCaps()['info']['networks'] and fail with KeyError we should throw an error message and not stuck in the login. Additionally, for unexpected exceptions in vdscli we should log as error and not use raise to avoid users getting blocked into the login page. Change-Id: I4b7666c2020307c6119f96a2935684bc268e459b Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1198029 Signed-off-by: Douglas Schilling Landgraf <dougsl...@redhat.com> --- M src/engine_page.py 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node-plugin-vdsm refs/changes/50/38450/1 diff --git a/src/engine_page.py b/src/engine_page.py index d028e6c..13c78d1 100644 --- a/src/engine_page.py +++ b/src/engine_page.py @@ -114,12 +114,14 @@ elif err.errno == errno.ENETUNREACH: LOGGER.debug("Network is unreachable to reach VDSM", exc_info=True) else: - raise + LOGGER.error("Catching exception:", exc_info=True) + except KeyError as err: + LOGGER.error("Cannot collect network data!", exc_info=True) except Exception as err: if 'No permission to read file:' in str(err): LOGGER.debug("pem files not available yet!", exc_info=True) else: - raise + LOGGER.error("Catching exception:", exc_info=True) if cfg["server"] is not None and cfg["server"] != "None" and \ cfg["server"] != "": -- To view, visit https://gerrit.ovirt.org/38450 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b7666c2020307c6119f96a2935684bc268e459b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node-plugin-vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Douglas Schilling Landgraf <dougsl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches