Exception raised by attach interface is problematic

Bug #1335076 reported by Gary Kotton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Gary Kotton

Bug Description

The exception raised is inappropriate. It just returns the instance object. This should be a coherent message.

Gary Kotton (garyk)
Changed in nova:
importance: Undecided → High
assignee: nobody → Gary Kotton (garyk)
Changed in nova:
status: New → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Gary,

looks like the message itself has the information string. right?

class InterfaceAttachFailed(Invalid):
    msg_fmt = _("Failed to attach network adapter device to %(instance)s")

-- dims

Changed in nova:
status: In Progress → Incomplete
Revision history for this message
Gary Kotton (garyk) wrote :

Dims,
When the exception is raised the entire instance object is printed out to the client. That is not user friendly.
I will change the exception to be the UUID - maybe that will make this easier to understand.
Gary

Changed in nova:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/103091
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f8ae852c1a267a15f6b70026ad40d5d219fc0d33
Submitter: Jenkins
Branch: master

commit f8ae852c1a267a15f6b70026ad40d5d219fc0d33
Author: Gary Kotton <email address hidden>
Date: Fri Jun 27 04:11:51 2014 -0700

    Network: interface attach and detach raised confusing exception

    When the aforementioned operations failed they raised an exception
    that was not coherent - this is due to the fact that the instance object
    was passed to the exception. That would print the whole instance object
    which is really confusing to a openstack user. The exceptions should has passed
    the instance ID and not the instance.

    TrivialFix

    Change-Id: If3fa89b17210c1db3540cd813157b51e786e1494
    Closes-bug: #1335076

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 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.