← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1274682] Re: Vlans are not cleanly deleted in SQL database leaving stale entries

 

This looks like a Neutron bug, not an installation issue.

** Changed in: openstack-cisco
     Assignee: (unassigned) => Kyle Mestery (mestery)

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

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

Title:
  Vlans are not cleanly deleted in SQL database leaving stale entries

Status in OpenStack Neutron (virtual network service):
  New
Status in Openstack @ Cisco:
  New

Bug description:
  Steps to see

  - Create the Tenant with subnet , 
  - instantiate a VM on the subnet which will create a VLAN using neutron plugin for Nexus . 
  - Now delete the subnet and the vlan on the switch . 
  - Create the subnet again , the controller will again allocate the same segmentation id but it will not create the Vlan again on Nexus switch 

  When looking the SQL database the previous vlan entries are still
  present in the database and the controller is not able to assign the
  vlans correctly . The workaround is to select a different range of
  segmentation ids in the plugin .

  Error : 
  2014-01-29 13:47:03.059 2562 WARNING neutron.db.agentschedulers_db [-] Fail scheduling network {'status': u'ACTIVE', 'subnets': [u'5146ec1e-ad1d-4ca2-9e1d-e9e97126ae05'], 'name': u'External-1', 'provider
  :physical_network': u'physnet1', 'admin_state_up': True, 'tenant_id': u'adfdcc7e64904ab1b812ad1cbbf92f1a', 'provider:network_type': u'vlan', 'router:external': False, 'shared': False, 'id': u'd71796ca-d1
  0c-4f4d-b742-1e720ce8b94e', 'provider:segmentation_id': 504L}
  2014-01-29 13:47:03.078 2562 ERROR neutron.api.v2.resource [-] add_router_interface failed
  2014-01-29 13:47:03.078 2562 TRACE neutron.api.v2.resource Traceback (most recent call last):
  2014-01-29 13:47:03.078 2562 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 84, in resource
  2014-01-29 13:47:03.078 2562 TRACE neutron.api.v2.resource     result = method(request=request, **args)
  2014-01-29 13:47:03.078 2562 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 185, in _handle_action
  2014-01-29 13:47:03.078 2562 TRACE neutron.api.v2.resource     return getattr(self._plugin, name)(*arg_list, **kwargs)
  2014-01-29 13:47:03.078 2562 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/neutron/plugins/cisco/models/virt_phy_sw_v2.py", line 439, in add_router_interface
  2014-01-29 13:47:03.078 2562 TRACE neutron.api.v2.resource     raise cexc.SubnetNotSpecified()
  2014-01-29 13:47:03.078 2562 TRACE neutron.api.v2.resource SubnetNotSpecified: No subnet_id specified for router gateway.
  2014-01-29 13:47:03.078 2562 TRACE neutron.api.v2.resource 
  2014-01-29 13:51:28.220 2562 WARNING neutron.db.agentschedulers_db [-] Fail scheduling network {'status': u'ACTIVE', 'subnets': [u'e98ed533-bbc6-44b4-909a-a94992875c3d'], 'name': u'Tenant_coke', 'provide
  r:physical_network': u'physnet1', 'admin_state_up': True, 'tenant_id': u'adfdcc7e64904ab1b812ad1cbbf92f1a', 'provider:network_type': u'vlan', 'router:external': False, 'shared': False, 'id': u'f1f0c30c-a
  14b-4b33-8212-5b8763dbd594', 'provider:segmentation_id': 503L}

  
  SQL Entries

  Old Stale  Entries

   
  mysql> SELECT * FROM ovs_network_bindings;
  +--------------------------------------+--------------+------------------+-----------------+
  | network_id                           | network_type | physical_network | segmentation_id |
  +--------------------------------------+--------------+------------------+-----------------+
  | 07f60f68-8482-4972-aa7c-398f4cdf6abd | vlan         | physnet1         |             500 |
  | 8b034e8d-7b6a-4198-94bd-5278d7934c78 | vlan         | physnet1         |             502 |
  +--------------------------------------+--------------+------------------+-----------------+
  2 rows in set (0.00 sec)

  mysql> SELECT * FROM subnets;
  +----------------------------------+--------------------------------------+---------+--------------------------------------+------------+------------------+---------------+-------------+--------+
  | tenant_id                        | id                                   | name    | network_id                           | ip_version | cidr             | gateway_ip    | enable_dhcp | shared |
  +----------------------------------+--------------------------------------+---------+--------------------------------------+------------+------------------+---------------+-------------+--------+
  | adfdcc7e64904ab1b812ad1cbbf92f1a | 186b1806-2d44-420a-a48e-ea027dcae543 | Inet-1  | 8b034e8d-7b6a-4198-94bd-5278d7934c78 |          4 | 10.111.111.0/24  | 10.111.111.1  |           1 |      0 |
  | adfdcc7e64904ab1b812ad1cbbf92f1a | 2fce01d6-6616-4137-a451-d63c80567929 | Ext-Net | 07f60f68-8482-4972-aa7c-398f4cdf6abd |          4 | 192.168.111.0/24 | 192.168.111.1 |           1 |      1 |
  +----------------------------------+--------------------------------------+---------+--------------------------------------+------------+------------------+---------------+-------------+--------+

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