Unable to delete a VN with router:external set

Bug #1325920 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Hampapur Ajay
R1.06
Fix Committed
Critical
Hampapur Ajay

Bug Description

Build : 1.10 ver 2194

Create a VN with a subnet and set router:external to True
Then try to do a net-delete . It fails

neutron.log :
2014-06-03 16:14:56.644 ERROR [neutron.api.v2.resource] delete failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 84, in resource
    result = method(request=request, **args)
  File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 432, in delete
    obj_deleter(request.context, id, **kwargs)
  File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrailplugin.py", line 303, in delete_network
    raise e
NoIdError: Unknown id: Error: oper 4 url /floating-ip-pool/6152b570-3f1e-4dd6-b8d9-615836134eaa body None response ID 6152b570-3f1e-4dd6-b8d9-615836134eaa does not exist

upstart/neutron.log :
---------------------------------------

<class 'cfgm_common.exceptions.NoIdError'>^M
Python 2.7.3: /usr/bin/python^M
Tue Jun 3 16:14:56 2014^M
^M
A problem occurred in a Python script. Here is the sequence of^M
function calls leading up to the error, in the order they occurred.^M
^M
 /usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrailplugin.py in delete_network(self=<neutron_plugin_contrail.plugins.opencontrail.contrailplugin.ContrailPlugin object>, context=<neutron.context.Context object>, net_id=u'd74d7c3a-fec9-4b0b-a6e1-db9859bf6135')^M
  297 try:^M
  298 cfgdb = ContrailPlugin._get_user_cfgdb(context)^M
  299 cfgdb.network_delete(net_id)^M
  300 LOG.debug("delete_network(): " + pformat(net_id))^M
  301 except Exception as e:^M
cfgdb = <neutron_plugin_contrail.plugins.opencontrail.ctdb.config_db.DBInterface object>^M
cfgdb.network_delete = <bound method DBInterface.network_delete of <neu....opencontrail.ctdb.config_db.DBInterface object>>^M
net_id = u'd74d7c3a-fec9-4b0b-a6e1-db9859bf6135'^M
^M
 /usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/ctdb/config_db.py in network_delete(self=<neutron_plugin_contrail.plugins.opencontrail.ctdb.config_db.DBInterface object>, net_id=u'd74d7c3a-fec9-4b0b-a6e1-db9859bf6135')^M
 1868 raise exceptions.NetworkInUse(net_id=net_id)^M
 1869 ^M
 1870 self._virtual_network_delete(net_id=net_id)^M
 1871 try:^M
 1872 del self._db_cache['q_networks'][net_id]^M
self = <neutron_plugin_contrail.plugins.opencontrail.ctdb.config_db.DBInterface object>^M
self._virtual_network_delete = <bound method DBInterface._virtual_network_delet....opencontrail.ctdb.config_db.DBInterface object>>^M
net_id = u'd74d7c3a-fec9-4b0b-a6e1-db9859bf6135'^M
^M
 /usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/ctdb/config_db.py in _virtual_network_delete(self=<neutron_plugin_contrail.plugins.opencontrail.ctdb.config_db.DBInterface object>, net_id=u'd74d7c3a-fec9-4b0b-a6e1-db9859bf6135')^M
  429 fip_pools = net_obj.get_floating_ip_pools()^M
  430 for fip_pool in fip_pools:^M
  431 self._floating_ip_pool_delete(fip_pool_id=fip_pool['uuid'])^M
  432 ^M
  433 self._vnc_lib.virtual_network_delete(id=net_id)^M
self = <neutron_plugin_contrail.plugins.opencontrail.ctdb.config_db.DBInterface object>^M
self._floating_ip_pool_delete = <bound method DBInterface._floating_ip_pool_dele....opencontrail.ctdb.config_db.DBInterface object>>^M
fip_pool_id undefined^M
fip_pool = {u'href': u'http://10.204.217.7:8082/floating-ip-pool/6152b570-3f1e-4dd6-b8d9-615836134eaa', u'to': [u'default-domain', u'Test1Project', u'pvt_vn4', u'floating-ip-pool'], u'uuid': u'6152b570-3f1e-4dd6-b8d9-615836134eaa'}^M
^M
 /usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/ctdb/config_db.py in _floating_ip_pool_delete(self=<neutron_plugin_contrail.plugins.opencontrail.ctdb.config_db.DBInterface object>, fip_pool_id=u'6152b570-3f1e-4dd6-b8d9-615836134eaa')^M
  596 ^M
  597 def _floating_ip_pool_delete(self, fip_pool_id):^M
  598 fip_pool_uuid = self._vnc_lib.floating_ip_pool_delete(id=fip_pool_id)^M
  599 # end _floating_ip_pool_delete^M
  600 ^M
fip_pool_uuid undefined^M
self = <neutron_plugin_contrail.plugins.opencontrail.ctdb.config_db.DBInterface object>^M
self._vnc_lib = <vnc_api.vnc_api.VncApi object>^M
self._vnc_lib.floating_ip_pool_delete = <bound method VncApi.floating_ip_pool_delete of <vnc_api.vnc_api.VncApi object>>^M
builtinid = <built-in function id>^M
fip_pool_id = u'6152b570-3f1e-4dd6-b8d9-615836134eaa'^M
^M
 /usr/lib/python2.7/dist-packages/vnc_api/gen/vnc_api_client_gen.py in floating_ip_pool_delete(self=<vnc_api.vnc_api.VncApi object>, fq_name=None, id=u'6152b570-3f1e-4dd6-b8d9-615836134eaa', ifmap_id=None)^M
 1290 uri = vnc_api.gen.resource_client.FloatingIpPool.resource_uri_base['floating-ip-pool'] + '/' + id^M
 1291 ^M
 1292 content = self._request_server(rest.OP_DELETE, uri)^M
 1293 #end floating_ip_pool_delete^M
 1294 ^M
content undefined^M
self = <vnc_api.vnc_api.VncApi object>^M
self._request_server = <bound method VncApi._request_server of <vnc_api.vnc_api.VncApi object>>^M
global rest = <module 'cfgm_common.rest' from '/usr/lib/python2.7/dist-packages/cfgm_common/rest.pyc'>^M
rest.OP_DELETE = 4^M
uri = u'/floating-ip-pool/6152b570-3f1e-4dd6-b8d9-615836134eaa'^M
^M
 /usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py in _request_server(self=<vnc_api.vnc_api.VncApi object>, op=4, url=u'/floating-ip-pool/6152b570-3f1e-4dd6-b8d9-615836134eaa', data=None, retry_on_error=True)^M
  345 elif status == 404:^M
  346 raise NoIdError('Error: oper %s url %s body %s response %s'^M
  347 % (op, url, data, content))^M
  348 elif status == 403:^M
  349 raise PermissionDenied(content)^M
op = 4^M
url = u'/floating-ip-pool/6152b570-3f1e-4dd6-b8d9-615836134eaa'^M
data = None^M
content = u'ID 6152b570-3f1e-4dd6-b8d9-615836134eaa does not exist'^M
<class 'cfgm_common.exceptions.NoIdError'>: Unknown id: Error: oper 4 url /floating-ip-pool/6152b570-3f1e-4dd6-b8d9-615836134eaa body None response ID 6152b570-3f1e-4dd6-b8d9-615836134eaa does not exist^M
    __class__ = <class 'cfgm_common.exceptions.NoIdError'>^M
    __delattr__ = <method-wrapper '__delattr__' of NoIdError object>^M
    __dict__ = {'_unknown_id': u'Error: oper 4 url /floating-ip-pool/6152b570-3...2b570-3f1e-4dd6-b8d9-615836134eaa does not exist'}^M
    __doc__ = None^M
    __format__ = <built-in method __format__ of NoIdError object>^M
    __getattribute__ = <method-wrapper '__getattribute__' of NoIdError object>^M
    __getitem__ = <method-wrapper '__getitem__' of NoIdError object>^M
    __getslice__ = <method-wrapper '__getslice__' of NoIdError object>^M
    __hash__ = <method-wrapper '__hash__' of NoIdError object>^M
    __init__ = <bound method NoIdError.__init__ of NoIdError()>^M
    __module__ = 'cfgm_common.exceptions'^M
    __new__ = <built-in method __new__ of type object>^M
    __reduce__ = <built-in method __reduce__ of NoIdError object>^M
    __reduce_ex__ = <built-in method __reduce_ex__ of NoIdError object>^M
    __repr__ = <method-wrapper '__repr__' of NoIdError object>^M
    __setattr__ = <method-wrapper '__setattr__' of NoIdError object>^M
    __setstate__ = <built-in method __setstate__ of NoIdError object>^M
    __sizeof__ = <built-in method __sizeof__ of NoIdError object>^M
    __str__ = <bound method NoIdError.__str__ of NoIdError()>^M
    __subclasshook__ = <built-in method __subclasshook__ of type object>^M
    __unicode__ = <built-in method __unicode__ of NoIdError object>^M
    __weakref__ = None^M
    _unknown_id = u'Error: oper 4 url /floating-ip-pool/6152b570-3...2b570-3f1e-4dd6-b8d9-615836134eaa does not exist'^M
    args = ()^M
    message = ''^M
^M
The above is a description of an error in a Python program. Here is^M
the original traceback:^M
^M
^M
Traceback (most recent call last):^M
  File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrailplugin.py", line 299, in delete_network^M
    cfgdb.network_delete(net_id)^M
  File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/ctdb/config_db.py", line 1870, in network_delete^M
    self._virtual_network_delete(net_id=net_id)^M
  File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/ctdb/config_db.py", line 431, in _virtual_network_delete^M
    self._floating_ip_pool_delete(fip_pool_id=fip_pool['uuid'])^M
  File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/ctdb/config_db.py", line 598, in _floating_ip_pool_delete^M
    fip_pool_uuid = self._vnc_lib.floating_ip_pool_delete(id=fip_pool_id)^M
  File "/usr/lib/python2.7/dist-packages/vnc_api/gen/vnc_api_client_gen.py", line 1292, in floating_ip_pool_delete^M
    content = self._request_server(rest.OP_DELETE, uri)^M
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 347, in _request_server^M
    % (op, url, data, content))^M
NoIdError: Unknown id: Error: oper 4 url /floating-ip-pool/6152b570-3f1e-4dd6-b8d9-615836134eaa body None response ID 6152b570-3f1e-4dd6-b8d9-615836134eaa does not exist^M
^M
^M
2014-06-03 16:14:56.644 ERROR [neutron.api.v2.resource] delete failed^M
Traceback (most recent call last):^M
  File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 84, in resource^M
    result = method(request=request, **args)^M
  File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 432, in delete^M
    obj_deleter(request.context, id, **kwargs)^M
  File "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrailplugin.py", line 303, in delete_network^M
    raise e^M
NoIdError: Unknown id: Error: oper 4 url /floating-ip-pool/6152b570-3f1e-4dd6-b8d9-615836134eaa body None response ID 6152b570-3f1e-4dd6-b8d9-615836134eaa does not exist^M

Tags: config
Changed in juniperopenstack:
milestone: r1.10-beta → r1.06-fcs
information type: Proprietary → Public
Revision history for this message
Prakash Bailkeri (prakashmb) wrote :
Changed in juniperopenstack:
status: New → Fix Committed
Revision history for this message
Rahul (rahuls) wrote :
Download full text (3.6 KiB)

If the external VN is created through UI and network deleted through neutron, then see following error (there are not ports in the VN):

root@nodeg10:~# neutron net-delete pub-test
Unable to complete operation on network 6b8421b2-197c-43ed-9f5a-4e2e7765baa0. There are one or more ports still in use on the network.

root@nodeg10:~# neutron net-show pub-net
Unable to find network with name 'pub-net'
root@nodeg10:~# neutron net-show pub-test
+-------------------------+---------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+---------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| contrail:fq_name | default-domain |
| | demo |
| | pub-test |
| contrail:instance_count | 0 |
| contrail:subnet_ipam | {"subnet_cidr": "17.8.9.0/24", "ipam_fq_name": ["default-domain", "default-project", "default-network-ipam"]} |
| id | 6b8421b2-197c-43ed-9f5a-4e2e7765baa0 |
| name | pub-test |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | 7a3aeb69-8e0a-4eab-983e-c2285d296927 |
| tenant_id | 2fa9fa7be540434290dcb81433981b77 |
+-------------------------+---------------------------------------------------------------------------------------------------------------+

NoIdError: Unknown id: Error: oper 2 url /virtual-machine-interface/e32fda94-b604-4ba5-b081-e0089c28fb36 body {'fields': 'instance_ip_back_refs'} response No virtual-machine-interface object found for id e32fda94-b604-4ba5-b081-e0089c28fb36
2014-06-18 22:43:55.987 ERROR [neutron.api.v2.resource] delete failed
Traceback (most recent call last):
  File "/usr/lib/python2.7...

Read more...

Revision history for this message
Prakash Bailkeri (prakashmb) wrote :

I guess the floating ip pool is referred by project. When floating ip pool is created from UI, was it made to refer to projects?

IF yes, that reference should be deleted before trying the neutron-net-delete.

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.