can't delete network by quantum api v2 (LB plugin)

Bug #1020879 reported by Hua Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Gary Kotton

Bug Description

can't delete network by quantum api v2, related info is as bellow:

[root@hua quantum]# quantumv2 -v delete_net 72a1f939-b015-4712-9fdc-ea97e521cc50
DEBUG: quantumclient.quantum.v2_0.network.DeleteNetwork run(Namespace(id='72a1f939-b015-4712-9fdc-ea97e521cc50', request_format='json'))
DEBUG: quantumclient.quantum.client we are using client: quantumclient.v2_0.client.Client
DEBUG: quantumclient.client REQ: curl -i http://localhost:9696/v2.0/networks/72a1f939-b015-4712-9fdc-ea97e521cc50.json DELETE -H "User-Agent: python-quantumclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN"

DEBUG: quantumclient.client RESP:{'date': 'Wed, 04 Jul 2012 09:11:54 GMT', 'status': '404', 'content-length': '83', 'content-type': 'application/json'}

DEBUG: quantumclient.client RESP BODY:{"QuantumError": "Network 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found"}

DEBUG: quantumclient.v2_0.client Error message: {"QuantumError": "Network 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found"}
ERROR: cliff.app Network 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found
DEBUG: quantumclient.shell clean_up DeleteNetwork
DEBUG: quantumclient.shell got an error: Network 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found
[root@hua quantum]# quantumv2 -v delete_net 9bba3f8b-004e-4c86-befb-a56011dfb534
DEBUG: quantumclient.quantum.v2_0.network.DeleteNetwork run(Namespace(id='9bba3f8b-004e-4c86-befb-a56011dfb534', request_format='json'))
DEBUG: quantumclient.quantum.client we are using client: quantumclient.v2_0.client.Client
DEBUG: quantumclient.client REQ: curl -i http://localhost:9696/v2.0/networks/9bba3f8b-004e-4c86-befb-a56011dfb534.json DELETE -H "User-Agent: python-quantumclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN"

DEBUG: quantumclient.client RESP:{'date': 'Wed, 04 Jul 2012 09:12:46 GMT', 'status': '500', 'content-length': '54', 'content-type': 'application/json'}

DEBUG: quantumclient.client RESP BODY:{"QuantumError": "global name 'const' is not defined"}

DEBUG: quantumclient.v2_0.client Error message: {"QuantumError": "global name 'const' is not defined"}
ERROR: cliff.app global name 'const' is not defined
DEBUG: quantumclient.shell clean_up DeleteNetwork
DEBUG: quantumclient.shell got an error: global name 'const' is not defined

quantum server's log:

012-07-04 17:12:24 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [04/Jul/2012 17:12:24] "POST //v2.0/networks.json HTTP/1.1" 201 279 0.154678
2012-07-04 17:12:46 DEBUG [routes.middleware] No route matched for DELETE /networks/9bba3f8b-004e-4c86-befb-a56011dfb534.json
2012-07-04 17:12:46 DEBUG [routes.middleware] Matched DELETE /networks/9bba3f8b-004e-4c86-befb-a56011dfb534.json
2012-07-04 17:12:46 DEBUG [routes.middleware] Route path: '/networks/{id}{.format}', defaults: {'action': u'delete', 'controller': wsgify(quantum.api.v2.resource.resource, RequestClass=<class 'quantum.api.v2.resource.Request'>)}
2012-07-04 17:12:46 DEBUG [routes.middleware] Match dict: {'action': u'delete', 'controller': wsgify(quantum.api.v2.resource.resource, RequestClass=<class 'quantum.api.v2.resource.Request'>), 'id': u'9bba3f8b-004e-4c86-befb-a56011dfb534', 'format': u'json'}
2012-07-04 17:12:46 DEBUG [quantum.plugins.linuxbridge.db.l2network_db] get_vlan_binding() called
2012-07-04 17:12:46 ERROR [quantum.api.v2.resource] delete failed
Traceback (most recent call last):
  File "/bak/openstack/quantum/quantum/api/v2/resource.py", line 95, in resource
    result = method(request=request, **args)
  File "/bak/openstack/quantum/quantum/api/v2/base.py", line 196, in delete
    obj_deleter(request.context, id)
  File "/bak/openstack/quantum/quantum/plugins/linuxbridge/lb_quantum_plugin.py", line 52, in delete_network
    cdb.release_vlanid(vlan_binding[const.VLANID])
NameError: global name 'const' is not defined

Gary Kotton (garyk)
Changed in quantum:
assignee: nobody → Gary Kotton (garyk)
Revision history for this message
Gary Kotton (garyk) wrote : Re: [Bug 1020879] [NEW] can't delete network by quantum api v2
Download full text (4.1 KiB)

Thanks!

I'll fix this soon.

Thank you
Gary

On 07/04/2012 12:18 PM, Hua Zhang wrote:
> Public bug reported:
>
> can't delete network by quantum api v2, related info is as bellow:
>
> [root@hua quantum]# quantumv2 -v delete_net 72a1f939-b015-4712-9fdc-ea97e521cc50
> DEBUG: quantumclient.quantum.v2_0.network.DeleteNetwork run(Namespace(id='72a1f939-b015-4712-9fdc-ea97e521cc50', request_format='json'))
> DEBUG: quantumclient.quantum.client we are using client: quantumclient.v2_0.client.Client
> DEBUG: quantumclient.client REQ: curl -i http://localhost:9696/v2.0/networks/72a1f939-b015-4712-9fdc-ea97e521cc50.json DELETE -H "User-Agent: python-quantumclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN"
>
> DEBUG: quantumclient.client RESP:{'date': 'Wed, 04 Jul 2012 09:11:54
> GMT', 'status': '404', 'content-length': '83', 'content-type':
> 'application/json'}
>
> DEBUG: quantumclient.client RESP BODY:{"QuantumError": "Network
> 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found"}
>
> DEBUG: quantumclient.v2_0.client Error message: {"QuantumError": "Network 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found"}
> ERROR: cliff.app Network 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found
> DEBUG: quantumclient.shell clean_up DeleteNetwork
> DEBUG: quantumclient.shell got an error: Network 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found
> [root@hua quantum]# quantumv2 -v delete_net 9bba3f8b-004e-4c86-befb-a56011dfb534
> DEBUG: quantumclient.quantum.v2_0.network.DeleteNetwork run(Namespace(id='9bba3f8b-004e-4c86-befb-a56011dfb534', request_format='json'))
> DEBUG: quantumclient.quantum.client we are using client: quantumclient.v2_0.client.Client
> DEBUG: quantumclient.client REQ: curl -i http://localhost:9696/v2.0/networks/9bba3f8b-004e-4c86-befb-a56011dfb534.json DELETE -H "User-Agent: python-quantumclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN"
>
> DEBUG: quantumclient.client RESP:{'date': 'Wed, 04 Jul 2012 09:12:46
> GMT', 'status': '500', 'content-length': '54', 'content-type':
> 'application/json'}
>
> DEBUG: quantumclient.client RESP BODY:{"QuantumError": "global name
> 'const' is not defined"}
>
> DEBUG: quantumclient.v2_0.client Error message: {"QuantumError": "global name 'const' is not defined"}
> ERROR: cliff.app global name 'const' is not defined
> DEBUG: quantumclient.shell clean_up DeleteNetwork
> DEBUG: quantumclient.shell got an error: global name 'const' is not defined
>
>
> quantum server's log:
>
> 012-07-04 17:12:24 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [04/Jul/2012 17:12:24] "POST //v2.0/networks.json HTTP/1.1" 201 279 0.154678
> 2012-07-04 17:12:46 DEBUG [routes.middleware] No route matched for DELETE /networks/9bba3f8b-004e-4c86-befb-a56011dfb534.json
> 2012-07-04 17:12:46 DEBUG [routes.middleware] Matched DELETE /networks/9bba3f8b-004e-4c86-befb-a56011dfb534.json
> 2012-07-04 17:12:46 DEBUG [routes.middleware] Route path: '/networks/{id}{.format}', defaults: {'action': u'delete', 'controller': wsgify(quantum.api.v2.resource.resource, RequestClass=<class 'quantum.api.v2.resource.Request'>)}
>...

Read more...

Revision history for this message
dan wendlandt (danwent) wrote : Re: [Bug 1020879] [NEW] can't delete network by quantum api v2
Download full text (9.1 KiB)

btw, sounds like this should be targeted at F-2. we'll need to backport it
to milestone-proposed once the fix is in.

dan

On Wed, Jul 4, 2012 at 10:39 AM, Gary Kotton <email address hidden>wrote:

> Thanks!
>
> I'll fix this soon.
>
> Thank you
> Gary
>
> On 07/04/2012 12:18 PM, Hua Zhang wrote:
> > Public bug reported:
> >
> > can't delete network by quantum api v2, related info is as bellow:
> >
> > [root@hua quantum]# quantumv2 -v delete_net
> 72a1f939-b015-4712-9fdc-ea97e521cc50
> > DEBUG: quantumclient.quantum.v2_0.network.DeleteNetwork
> run(Namespace(id='72a1f939-b015-4712-9fdc-ea97e521cc50',
> request_format='json'))
> > DEBUG: quantumclient.quantum.client we are using client:
> quantumclient.v2_0.client.Client
> > DEBUG: quantumclient.client REQ: curl -i
> http://localhost:9696/v2.0/networks/72a1f939-b015-4712-9fdc-ea97e521cc50.jsonDELETE -H "User-Agent: python-quantumclient" -H "Content-Type:
> application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN"
> >
> > DEBUG: quantumclient.client RESP:{'date': 'Wed, 04 Jul 2012 09:11:54
> > GMT', 'status': '404', 'content-length': '83', 'content-type':
> > 'application/json'}
> >
> > DEBUG: quantumclient.client RESP BODY:{"QuantumError": "Network
> > 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found"}
> >
> > DEBUG: quantumclient.v2_0.client Error message: {"QuantumError":
> "Network 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found"}
> > ERROR: cliff.app Network 72a1f939-b015-4712-9fdc-ea97e521cc50 could not
> be found
> > DEBUG: quantumclient.shell clean_up DeleteNetwork
> > DEBUG: quantumclient.shell got an error: Network
> 72a1f939-b015-4712-9fdc-ea97e521cc50 could not be found
> > [root@hua quantum]# quantumv2 -v delete_net
> 9bba3f8b-004e-4c86-befb-a56011dfb534
> > DEBUG: quantumclient.quantum.v2_0.network.DeleteNetwork
> run(Namespace(id='9bba3f8b-004e-4c86-befb-a56011dfb534',
> request_format='json'))
> > DEBUG: quantumclient.quantum.client we are using client:
> quantumclient.v2_0.client.Client
> > DEBUG: quantumclient.client REQ: curl -i
> http://localhost:9696/v2.0/networks/9bba3f8b-004e-4c86-befb-a56011dfb534.jsonDELETE -H "User-Agent: python-quantumclient" -H "Content-Type:
> application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN"
> >
> > DEBUG: quantumclient.client RESP:{'date': 'Wed, 04 Jul 2012 09:12:46
> > GMT', 'status': '500', 'content-length': '54', 'content-type':
> > 'application/json'}
> >
> > DEBUG: quantumclient.client RESP BODY:{"QuantumError": "global name
> > 'const' is not defined"}
> >
> > DEBUG: quantumclient.v2_0.client Error message: {"QuantumError": "global
> name 'const' is not defined"}
> > ERROR: cliff.app global name 'const' is not defined
> > DEBUG: quantumclient.shell clean_up DeleteNetwork
> > DEBUG: quantumclient.shell got an error: global name 'const' is not
> defined
> >
> >
> > quantum server's log:
> >
> > 012-07-04 17:12:24 DEBUG [eventlet.wsgi.server] 127.0.0.1 - -
> [04/Jul/2012 17:12:24] "POST //v2.0/networks.json HTTP/1.1" 201 279 0.154678
> > 2012-07-04 17:12:46 DEBUG [routes.middleware] No route matched for
> DELETE /networks/9bba3f8b-004e-4c86-befb-a56011dfb534.json
> > 2012-07-04 ...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

Changed in quantum:
status: New → In Progress
Gary Kotton (garyk)
Changed in quantum:
milestone: none → folsom-2
dan wendlandt (danwent)
summary: - can't delete network by quantum api v2
+ can't delete network by quantum api v2 (LB plugin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/9312
Committed: http://github.com/openstack/quantum/commit/ae65b07b4c67889ccf28a02a25f2d723c759e80e
Submitter: Jenkins
Branch: master

commit ae65b07b4c67889ccf28a02a25f2d723c759e80e
Author: Gary Kotton <email address hidden>
Date: Wed Jul 4 06:54:10 2012 -0400

    Address problems with foreign keys with subnet and network deletion

    This also fixes bug 1020879 and bug 1020847

    Change-Id: Ib68f9357ed65f35e56d17577b83fabe8f96388cf

Changed in quantum:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/9341

Changed in quantum:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (milestone-proposed)

Reviewed: https://review.openstack.org/9341
Committed: http://github.com/openstack/quantum/commit/36e64afd4494d7c73bccb230ba1c4a97752b5751
Submitter: Jenkins
Branch: milestone-proposed

commit 36e64afd4494d7c73bccb230ba1c4a97752b5751
Author: Gary Kotton <email address hidden>
Date: Wed Jul 4 06:54:10 2012 -0400

    Address problems with foreign keys with subnet and network deletion

    This also fixes bug 1020879 and bug 1020847

    Change-Id: Ib68f9357ed65f35e56d17577b83fabe8f96388cf

Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-2 → 2012.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.