nova.exception.ExternalNetworkAttachForbidden is not handled in V3

Bug #1353949 reported by Haiwei Xu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Haiwei Xu

Bug Description

When creating an instance and assigning a public network to it without admin authority, ExternalNetworkAttachForbidden
will be raised. But this exception is not handled in V3 api.

2014-08-07 19:40:55.032 ERROR nova.api.openstack.extensions [req-a3a824a2-d477-4720-98c7-d3161de268ba demo demo] Unexpected exception in API method
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions Traceback (most recent call last):
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/extensions.py", line 473, in wrapped
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions return f(*args, **kwargs)
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/validation/__init__.py", line 39, in wrapper
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions return func(*args, **kwargs)
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/plugins/v3/servers.py", line 507, in create
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions **create_kwargs)
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/hooks.py", line 131, in inner
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions rv = f(*args, **kwargs)
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/api.py", line 1351, in create
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions legacy_bdm=legacy_bdm)
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/api.py", line 967, in _create_instance
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions max_count)
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/api.py", line 734, in _validate_and_build_base_options
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions requested_networks, max_count)
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/api.py", line 447, in _check_requested_networks
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions max_count)
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/network/neutronv2/api.py", line 709, in validate_networks
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions neutron=neutron)
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/network/neutronv2/api.py", line 169, in _get_available_networks
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions network_uuid=net['id'])
2014-08-07 19:40:55.032 TRACE nova.api.openstack.extensions ExternalNetworkAttachForbidden: It is not allowed to create an interface on external network 447d82c5-bf58-4f39-ac2f-a30227a464e2

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/112556

Changed in nova:
status: New → In Progress
Jay Pipes (jaypipes)
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit d96a8f0e6b524c10e563418c2770069030455c25
Author: Haiwei Xu <email address hidden>
Date: Thu Aug 7 19:33:36 2014 +0900

    Handle ExternalNetworkAttachForbidden exception

    When creating an instance and assigning a public network
    to it without admin authority, ExternalNetworkAttachForbidden
    will be raised. But this exception is not handled in V3 api.

    Change-Id: Id70d8eaa704fd82cef1afdb65756d75cb56fbdce
    Closes-Bug: #1353949

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