← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1607670] Re: Cannot remove subnet from router even though the router is not used by vpnservice

 

http://lists.openstack.org/pipermail/openstack-
dev/2016-November/107384.html

** Changed in: neutron
       Status: In Progress => Won't Fix

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

Title:
  Cannot remove subnet from router even though the router is not used by
  vpnservice

Status in neutron:
  Won't Fix

Bug description:
  Cannot remove subnet from router even though the router is not used by
  vpnservice.

  When operation for router interface is requested,
  callback method(vpn_callback) in vpn_db.py is called.
  Callback tries to find vpnservice with subnet_id.
  However, it should be located with subnet_id and router_id
  because router that is not used by vpnservice may be in same subnet. 

  ===Reproduction===
  1.Creating vpnservice specifying router1 and subnet1.

  neutron router-create router1
  neutron net-create network1
  neutron subnet-create network1 10.10.10.0/24 --name subnet1
  neutron router-interface-add router1 subnet1
  neutron router-gateway-set router1 external
  neutron vpn-service-create router1 subnet1

  2.Attach subnet1 to router2(that is not used by vpnservice).
  neutron router-create router2
  neutron port-create network1 --name port1
  neutron router-interface-add router2 port=port1

  3.Remove subnet1 from router2 (that is not used by vpnservice).
  vagrant@ubuntu:/opt/stack/neutron-vpnaas$ neutron router-interface-delete b port=dc71de4a-3ee7-407f-9fab-06be99b56bbe
  Subnet 0a0db447-aa35-44aa-a4d1-c72da22bd9e4 is used by VPNService 73a06d81-85d5-47e8-8f08-e04802b167a6
  Neutron server returns request_ids: ['req-e16aae3f-2610-473d-aeee-52587c78df40']

  
  =====trace in neutron server==========
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager [req-e16aae3f-2610-473d-aeee-52587c78df40 5cd9727299164d72a308a13b96610278 d12b219751fe4b71be3df49fddbbafaf - - -] Error during notification for neutron_vpnaas.db.vpn.vpn_db.vpn_callback router_interface, before_delete
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager Traceback (most recent call last):
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager   File "/opt/stack/neutron/neutron/callbacks/manager.py", line 148, in _notify_loop
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager     callback(resource, event, trigger, **kwargs)
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager   File "/opt/stack/neutron-vpnaas/neutron_vpnaas/db/vpn/vpn_db.py", line 722, in vpn_callback
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager     check_func(context, resource_id)
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager   File "/opt/stack/neutron-vpnaas/neutron_vpnaas/db/vpn/vpn_db.py", line 549, in check_subnet_in_use
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager     vpnservice_id=vpnservices['id'])
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager SubnetInUseByVPNService: Subnet 0a0db447-aa35-44aa-a4d1-c72da22bd9e4 is used by VPNService 73a06d81-85d5-47e8-8f08-e04802b167a6
  2016-07-29 16:46:42.597 27256 ERROR neutron.callbacks.manager
  2016-07-29 16:46:42.606 27256 DEBUG neutron.callbacks.manager [req-e16aae3f-2610-473d-aeee-52587c78df40 5cd9727299164d72a308a13b96610278 d12b219751fe4b71be3df49fddbbafaf - - -] Notify callbacks for router_interface, abort_delete _notify_loop /opt/stack/neutron/neutron/callbacks/manager.py:140
  2016-07-29 16:46:42.610 27256 ERROR root [req-e16aae3f-2610-473d-aeee-52587c78df40 5cd9727299164d72a308a13b96610278 d12b219751fe4b71be3df49fddbbafaf - - -] Original exception being dropped: ['Traceback (most recent call last):\n', '  File "/opt/stack/neutron/neutron/db/l3_db.py", line 815, in _confirm_router_interface_not_in_use\n    events.BEFORE_DELETE, self, **kwargs)\n', '  File "/opt/stack/neutron/neutron/callbacks/registry.py", line 44, in notify\n    _get_callback_manager().notify(resource, event, trigger, **kwargs)\n', '  File "/opt/stack/neutron/neutron/db/api.py", line 70, in wrapped\n    raise db_exc.RetryRequest(e)\n', '  File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__\n    self.force_reraise()\n', '  File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/neutron/neutron/db/api.py", line 65, in wrapped\n    return f(*args, **kwargs)\n', '  File "/opt/stack/neutron/neutron/callbacks/manager.py", line 127, in notify\n    raise exceptions.CallbackFailure(errors=errors)\n', 'CallbackFailure: Callback neutron_vpnaas.db.vpn.vpn_db.vpn_callback failed with "Subnet 0a0db447-aa35-44aa-a4d1-c72da22bd9e4 is used by VPNService 73a06d81-85d5-47e8-8f08-e04802b167a6"\n']
  2016-07-29 16:46:42.611 27256 INFO neutron.api.v2.resource [req-e16aae3f-2610-473d-aeee-52587c78df40 5cd9727299164d72a308a13b96610278 d12b219751fe4b71be3df49fddbbafaf - - -] remove_router_interface failed (client error): There was a conflict when trying to complete your request.
  2016-07-29 16:46:42.613 27256 INFO neutron.wsgi [req-e16aae3f-2610-473d-aeee-52587c78df40 5cd9727299164d72a308a13b96610278 d12b219751fe4b71be3df49fddbbafaf - - -] 192.168.122.139 - - [29/Jul/2016 16:46:42] "PUT /v2.0/routers/41888658-74d2-4bba-a44a-f1c6af1eba96/remove_router_interface.json HTTP/1.1" 409 389 0.372817

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


References