← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1236372] Re: Router without active ports fails to be deleted, are reports wrong error message

 

** Also affects: neutron/icehouse
   Importance: Undecided
       Status: New

** Changed in: neutron/icehouse
    Milestone: None => icehouse-rc2

** Changed in: neutron/icehouse
     Assignee: (unassigned) => Mark McClain (markmcclain)

** Changed in: neutron/icehouse
   Importance: Undecided => Low

** Changed in: neutron/icehouse
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1236372

Title:
  Router without active ports fails to be deleted, are reports wrong
  error message

Status in OpenStack Neutron (virtual network service):
  Fix Committed
Status in neutron icehouse series:
  In Progress

Bug description:
  Version
  =======
  Havana, RHEL, neutron+ovs, python-neutron-2013.2-0.3.3.b3.el6ost

  Description
  ===========
  It's impossible to delete a router while it still has inactive ports.
  The error message states that the router still has active ports.

  
  # neutron router-port-list router1
  +--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
  | id                                   | name | mac_address       | fixed_ips                                                                            |
  +--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
  | 052a48e4-0868-4675-bef7-8f763dd697b4 |      | fa:16:3e:60:73:8d | {"subnet_id": "c5d63940-71e8-4338-865e-f5364fbe4e78", "ip_address": "10.35.214.1"}   |
  | 065cef02-a949-45c9-b3df-e005dbf96c9a |      | fa:16:3e:a6:6d:d8 | {"subnet_id": "044bcc05-f37b-4d1d-a700-c91c4381fbc8", "ip_address": "10.35.211.1"}   |
  | 7a020243-90e5-439d-90fb-ec96b07843e7 |      | fa:16:3e:04:0c:1f | {"subnet_id": "4081fbca-3e59-4be5-a98e-3c9e0d13d3a6", "ip_address": "10.35.212.1"}   |
  | 7af56958-674e-472b-8dbe-09b60501a6e6 |      | fa:16:3e:1a:07:a4 | {"subnet_id": "ef8e7c03-f17f-4c3c-9afe-252aca1283fd", "ip_address": "10.35.170.102"} |
  | f034cb8a-2a09-4d41-b46c-a08fe208461e |      | fa:16:3e:de:9d:32 | {"subnet_id": "cca4edc7-2872-4c1e-a270-3b0beb60f421", "ip_address": "10.35.213.1"}   |
  +--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+

  
  # for i in `neutron router-port-list router1 | grep subnet_id | cut -d" " -f 2` ; do neutron port-show $i ; done | grep status
  | status                | ACTIVE                                                                             |
  | status                | ACTIVE                                                                             |
  | status                | ACTIVE                                                                             |
  | status                | ACTIVE                                                                               |
  | status                | ACTIVE                                                                             |

  
  # neutron router-delete router1
  Router 727edf71-f637-402e-9fd9-767c372922ee still has active ports

  
  # for i in `neutron router-port-list router1 | grep subnet_id | cut -d" " -f 2` ; do neutron port-update $i --admin_state_up False ; done | grep status

  
  # for i in `neutron router-port-list router1 | grep subnet_id | cut -d" " -f 2` ; do neutron port-show $i ; done | grep status
  | status                | DOWN                                                                               |
  | status                | DOWN                                                                               |
  | status                | DOWN                                                                               |
  | status                | DOWN                                                                                 |
  | status                | DOWN                                                                               |

  
  # neutron router-delete router1
  Router 727edf71-f637-402e-9fd9-767c372922ee still has active ports

  
  From /var/log/neutron/server.log
  ================================
  2013-10-07 16:39:40.429 2341 ERROR neutron.api.v2.resource [-] delete failed
  2013-10-07 16:39:40.429 2341 TRACE neutron.api.v2.resource Traceback (most recent call last):
  2013-10-07 16:39:40.429 2341 TRACE neutron.api.v2.resource   File "/usr/lib/python2.6/site-packages/neutron/api/v2/resource.py", line 84, in resource
  2013-10-07 16:39:40.429 2341 TRACE neutron.api.v2.resource     result = method(request=request, **args)
  2013-10-07 16:39:40.429 2341 TRACE neutron.api.v2.resource   File "/usr/lib/python2.6/site-packages/neutron/api/v2/base.py", line 432, in delete
  2013-10-07 16:39:40.429 2341 TRACE neutron.api.v2.resource     obj_deleter(request.context, id, **kwargs)
  2013-10-07 16:39:40.429 2341 TRACE neutron.api.v2.resource   File "/usr/lib/python2.6/site-packages/neutron/db/l3_db.py", line 266, in delete_router
  2013-10-07 16:39:40.429 2341 TRACE neutron.api.v2.resource     raise l3.RouterInUse(router_id=id)
  2013-10-07 16:39:40.429 2341 TRACE neutron.api.v2.resource RouterInUse: Router 727edf71-f637-402e-9fd9-767c372922ee still has active ports
  2013-10-07 16:39:40.429 2341 TRACE neutron.api.v2.resource 
  2013-10-07 16:40:34.870 2341 ERROR neutron.api.v2.resource [-] delete failed
  2013-10-07 16:40:34.870 2341 TRACE neutron.api.v2.resource Traceback (most recent call last):
  2013-10-07 16:40:34.870 2341 TRACE neutron.api.v2.resource   File "/usr/lib/python2.6/site-packages/neutron/api/v2/resource.py", line 84, in resource
  2013-10-07 16:40:34.870 2341 TRACE neutron.api.v2.resource     result = method(request=request, **args)
  2013-10-07 16:40:34.870 2341 TRACE neutron.api.v2.resource   File "/usr/lib/python2.6/site-packages/neutron/api/v2/base.py", line 432, in delete
  2013-10-07 16:40:34.870 2341 TRACE neutron.api.v2.resource     obj_deleter(request.context, id, **kwargs)
  2013-10-07 16:40:34.870 2341 TRACE neutron.api.v2.resource   File "/usr/lib/python2.6/site-packages/neutron/db/l3_db.py", line 266, in delete_router
  2013-10-07 16:40:34.870 2341 TRACE neutron.api.v2.resource     raise l3.RouterInUse(router_id=id)
  2013-10-07 16:40:34.870 2341 TRACE neutron.api.v2.resource RouterInUse: Router 727edf71-f637-402e-9fd9-767c372922ee still has active ports
  2013-10-07 16:40:34.870 2341 TRACE neutron.api.v2.resource

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1236372/+subscriptions