Unhelpful error when modifying security group fails

Bug #1329888 reported by Chris St. Pierre
6
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/99912
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=43248863d0a8099ace90df27af2f0ac269b707b6
Submitter: Jenkins
Branch: master

commit 43248863d0a8099ace90df27af2f0ac269b707b6
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
    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.exception.ClientException, we give Horizon a fighting
    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
    Change-Id: I38d9977d6d20dfeddbb77b1a7e63e74597bf7331

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.