← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1152876] Re: Can not remove router interface that without fixed ip

 

@Roman, I can delete subnet directly in this commit
'921f203f4906a3b566f5a58471a55a4eedfc939c', then the port will be
without ip.

But now I can't delete subnet with master. It will message as below:

'Unable to complete operation on subnet
64a14036-67e0-477a-b666-7740bf2a31e9. One or more ports have an IP
allocation from this subnet.'

Check the log, I think this commit fix this bug:

commit b50e66f1863416c5c65d05f294f7b8a519dfb78c
Author: Salvatore Orlando <salv.orlando@xxxxxxxxx>
Date:   Fri Mar 8 18:10:38 2013 +0100

    Do not delete subnets with IPs on router interfaces
    
    Bug 1152171
    
    This patch simply causes a 409 to be returned when attempting to
    delete a subnet which has IPs on ports whose device_owner is
    network:router_interface
    
    This does not address a similar problem that arises when the ips for
    a port owned by a router_interface are updated. This problem is hidden
    when updating a port which has been assigned the gateway_ip by an
    exception in the IP recycling process. However, it will hit when the
    port was explicitly added to the router, since it will have an ip
    different from the subnet's gateway ip.
    
    Change-Id: I38dfd2639acd03db8d3f1f933495a456a4a8724f

So this bug is invalid

** Changed in: quantum
       Status: New => Invalid

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

Title:
  Can not remove router interface that without fixed ip

Status in OpenStack Quantum (virtual network service):
  Invalid

Bug description:
  soulxu1204@soulxu1204-ThinkPad-T410:~/work-code/openstack/quantum$ quantum port-show 6127e749-7ff8-4f1a-9db1-651465dc0bcb
  +----------------------+--------------------------------------+
  | Field                | Value                                |
  +----------------------+--------------------------------------+
  | admin_state_up       | True                                 |
  | binding:capabilities | {"port_filter": true}                |
  | binding:vif_type     | ovs                                  |
  | device_id            | 27abb3ea-067f-407f-ba2e-0c194e8b777e |
  | device_owner         | network:router_interface             |
  | fixed_ips            |                                      |
  | id                   | 6127e749-7ff8-4f1a-9db1-651465dc0bcb |
  | mac_address          | fa:16:3e:17:e3:5e                    |
  | name                 |                                      |
  | network_id           | 087796a9-422e-460e-8c49-c61f5af7aa2c |
  | security_groups      |                                      |
  | status               | DOWN                                 |
  | tenant_id            | 20bd52ff3e1b40039c312395b04683cf     |
  +----------------------+--------------------------------------+

  soulxu1204@soulxu1204-ThinkPad-T410:~/work-code/openstack/quantum$ quantum router-interface-delete router3 2f2c9f3e-8df3-4cf0-9769-70915be95c6b
  Request Failed: internal server error while processing your request.

  2013-03-09 14:36:46.330 5822 ERROR quantum.api.v2.resource [-] remove_router_interface failed
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource Traceback (most recent call last):
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource   File "/home/soulxu/work-code/openstack/quantum/quantum/api/v2/resource.py", line 82, in resource
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource     result = method(request=request, **args)
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource   File "/home/soulxu/work-code/openstack/quantum/quantum/api/v2/base.py", line 147, in _handle_action
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource     body, **kwargs)
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource   File "/home/soulxu/work-code/openstack/quantum/quantum/db/l3_db.py", line 448, in remove_router_interface
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource     if p['fixed_ips'][0]['subnet_id'] == subnet_id:
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/dynamic.py", line 249, in __getitem__
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource     return self._clone(sess).__getitem__(index)
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2028, in __getitem__
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource     return list(self[item:item+1])[0]
  2013-03-09 14:36:46.330 5822 TRACE quantum.api.v2.resource IndexError: list index out of range

  And this doesn't work for delete router interface by port-id

  This can't be done by just fix logic in rmeove_router_interface.
  Because we disallow user delete router interface that need by
  floatingip. If we delete the router interface without fixed ip, we
  can't check that case (quantum.db.l3_db.py:423).

  Propose disallow user update fixed ip for router interface. In future
  we may support update router interface fixed ip.

  But this will touch all plugins's update_port. It's not good for RC

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