InvalidAggregateAction exception is not handled

Bug #1303591 reported by Haiwei Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Haiwei Xu

Bug Description

When an aggregate with 'host' attribute not empty is deleted, InvalidAggregateAction exception will be raised, but this exception
is not handled.

$ nova --os-compute-api-version 3 aggregate-delete agg5
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'nova.exception.InvalidAggregateAction'> (HTTP 500) (Request-ID: req-9a8500ae-379a-4121-b217-7e7ea6188ad0)

2014-04-07 23:56:16.347 ERROR nova.api.openstack.extensions [req-f7c09203-a681-496c-a84e-18fb3d2e3659 admin demo] Unexpected exception in API method
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions Traceback (most recent call last):
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/extensions.py", line 472, in wrapped
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions return f(*args, **kwargs)
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/plugins/v3/aggregates.py", line 155, in delete
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions self.api.delete_aggregate(context, id)
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/exception.py", line 88, in wrapped
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions payload)
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions six.reraise(self.type_, self.value, self.tb)
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/exception.py", line 71, in wrapped
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions return f(self, context, *args, **kw)
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/api.py", line 3363, in delete_aggregate
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions reason='not empty')
2014-04-07 23:56:16.347 TRACE nova.api.openstack.extensions InvalidAggregateAction: Cannot perform action 'delete' on aggregate 3. Reason: not empty.

Haiwei Xu (xu-haiwei)
Changed in nova:
assignee: nobody → Haiwei Xu (xu-haiwei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/85643

Changed in nova:
status: New → In Progress
Haiwei Xu (xu-haiwei)
summary: - InvalidAggregateAction exception is not handled in v3
+ InvalidAggregateAction exception is not handled
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 86d1007c2078a0ad80e49088b37660466b1a5cb3
Author: Haiwei Xu <email address hidden>
Date: Mon Apr 7 23:49:40 2014 +0900

    Catch InvalidAggregateAction when deleting an aggregate

    When an aggregate with 'host' attribute not empty is deleted,
    InvalidAggregateAction exception will be raised, but this exception
    is not handled.

    Closes-Bug: #1303591
    Change-Id: I4ef0c4a6008acea7e9769e93de79451cfbc0a0fa

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