yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #78144
[Bug 1339885] Re: exceptions.check_message does not work
** Also affects: manila-ui
Importance: Undecided
Status: New
** Changed in: manila-ui
Assignee: (unassigned) => Robin Cernin (rcernin)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1339885
Title:
exceptions.check_message does not work
Status in OpenStack Dashboard (Horizon):
In Progress
Status in manila-ui:
New
Bug description:
When using exceptions.check_message to check if a connection was
refused by an API, check_message will check to see if the exception's
message contains "Connection" and "refused". When a connection is
refused, the message does not contain exactly "Connection" and
"refused", but rather "Connection" and "refused)". In this situation
check_message does nothing and the exception is re-raised.
To reproduce:
Stop the Nova API
Navigate to http://<ip>/admin/info/
Other notes:
1. Even if the error message contains "Connection" and "refused" exactly, the same error screen is shown, because the exception is re-raised in both situations, and is not being handled properly higher up.
2. The exception being raised when a connection is refused is
ConnectionError, a Python built-in exception.
3. The only other situation where check_message is used within Horizon
is in
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/volumes/volumes/tables.py
when a volume is deleted. When this occurs, the re-raised exception is
properly handled, and a red error message is shown correctly.
4. The current use of check_message is not compatible with
localization. The keywords checked for are not translated, so if the
exception message is translated, the words will never match.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1339885/+subscriptions
References