Unhelpful error when modifying security group fails
Bug #1329888 reported by
Chris St. Pierre
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Undecided
|
Chris St. Pierre |
Bug Description
When modifying instance security groups, Horizon catches all exceptions and reraises a simple, dumb Exception with the message:
Failed to modify %d instance security groups.
That's useless enough, but since it reraises Exception, it has no hope of being caught further downstream and reported meaningfully to the user.
To see this in action, attempt to modify the security groups of a suspended instance. Nova returns a decent error to Horizon, but Horizon returns a useless error to the user.
Changed in horizon: | |
assignee: | nobody → Chris St. Pierre (stpierre) |
status: | New → In Progress |
Changed in horizon: | |
milestone: | none → juno-2 |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | juno-2 → 2014.2 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/99912 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=43248863d0a 8099ace90df27af 2f0ac269b707b6
Committed: https:/
Submitter: Jenkins
Branch: master
commit 43248863d0a8099 ace90df27af2f0a c269b707b6
Author: Chris St. Pierre <email address hidden>
Date: Fri Jun 13 07:24:08 2014 -0400
Raise sane error when failing to modify security group
Horizon catches and propagates recoverable exceptions back to the exception. ClientException , we give Horizon a fighting
user. This code previously caught all exceptions and then raised
Exception (with an unhelpful message), which Horizon propagated as an
even less helpful message. By raising the error as a
novaclient.
chance of passing a useful (but sanitized) error message to the user.
This changes the message the user sees from:
Error: There was an error submitting the form. Please try again.
To:
Error: Unable to modify instance "test10".
Error: Failed to modify 1 instance security groups
The error condition can be simulated by trying to modify security
groups on a suspended instance.
Closes-Bug: #1329888 eddbb77b1a7e63e 74597bf7331
Change-Id: I38d9977d6d20df