delete a net reports wrong information in nova-network

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

Bug Description

we should handle NetworkInUse exception in api layer

[root@controller ~]# nova net-delete be95de64-a2aa-42de-a522-37802cdbe133
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-14462746-5ab9-4eec-819f-d330222a66a0)

api log:

2014-03-19 02:26:11.856 12319 ERROR nova.api.openstack [req-14462746-5ab9-4eec-819f-d330222a66a0 d6779a827003465db2d3c52fe135d926 45210fba73d24dd681dc5c292c6b1e7f] Caught error: Network 1 is still in use.

File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 2483, in network_delete_safe
    raise exception.NetworkInUse(network_id=network_id)

jichenjc (jichenjc)
Changed in nova:
assignee: nobody → jichencom (jichenjc)
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/82424

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

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

commit 9645f19abf03a0ef66831a032247c068f4ed0faf
Author: jichenjc <email address hidden>
Date: Sun Mar 23 00:15:25 2014 +0800

    Handle NetworkInUse exception in api layer

    In nova-network, if we delete an existing network with port already
    associated, a 500 error will be reported and this is not helpful for
    end user. This patch catch the network in use exception and raise
    an HTTPConflict exception with formatted message.

    Change-Id: I7361e461e0eecc0ef6e47fa8ef9a48a24b7d5dfd
    Closes-Bug: #1294920

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