← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1261652] Re: Internal server error when deleting empty network with OVS plugin

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

** Changed in: neutron
    Milestone: None => icehouse-2

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

Title:
  Internal server error when deleting empty network with OVS plugin

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  Deleting a network which has no ports and no subnets on it produces
  the following stack trace in neutron-server logs when using
  PostgreSql:

  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource Traceback (most recent call last):
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/resource.py", line 84, in resource
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     result = method(request=request, **args)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 438, in delete
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     obj_deleter(request.context, id, **kwargs)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/openvswitch/ovs_neutron_plugin.py", line 526, in delete_network
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     super(OVSNeutronPluginV2, self).delete_network(context, id)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/db_base_plugin_v2.py", line 999, in delete_network
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     for p in ports)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2227, in __iter__
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     return self._execute_and_instances(context)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     result = conn.execute(querycontext.statement, self._params)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     params)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     compiled_sql, distilled_params
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     context)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     context)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource     cursor.execute(statement, parameters)
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource NotSupportedError: (NotSupportedError) SELECT FOR UPDATE/SHARE cannot be applied to the nullable side of an outer join

  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource  'SELECT ports.tenant_id AS ports_tenant_id, ports.id AS ports_id, ports.name AS ports_name, ports.network_id AS ports_network_id, ports.mac_address AS ports_mac_address, ports.admin_state_up AS ports_admin_state_up, ports.status AS ports_status, ports.device_id AS ports_device_id, ports.device_owner AS ports_device_owner, ipallocations_1.port_id AS ipallocations_1_port_id, ipallocations_1.ip_address AS ipallocations_1_ip_address, ipallocations_1.subnet_id AS ipallocations_1_subnet_id, ipallocations_1.network_id AS ipallocations_1_network_id, allowedaddresspairs_1.port_id AS allowedaddresspairs_1_port_id, allowedaddresspairs_1.mac_address AS allowedaddresspairs_1_mac_address, allowedaddresspairs_1.ip_address AS allowedaddresspairs_1_ip_address, extradhcpopts_1.id AS extradhcpopts_1_id, extradhcpopts_1.port_id AS extradhcpopts_1_port_id, extradhcpopts_1.opt_name AS extradhcpopts_1_opt_name, extradhcpopts_1.opt_value AS extradhcpopts_1_opt_value, portbindingports_1.port_id AS portbindingports_1_port_id, portbindingports_1.host AS portbindingports_1_host, securitygroupportbindings_1.port_id AS securitygroupportbindings_1_port_id, securitygroupportbindings_1.security_group_id AS securitygroupportbindings_1_security_group_id \nFROM ports LEFT OUTER JOIN portbindingports ON ports.id = portbindingports.port_id LEFT OUTER JOIN ipallocations AS ipallocations_1 ON ports.id = ipallocations_1.port_id LEFT OUTER JOIN allowedaddresspairs AS allowedaddresspairs_1 ON ports.id = allowedaddresspairs_1.port_id LEFT OUTER JOIN extradhcpopts AS extradhcpopts_1 ON ports.id = extradhcpopts_1.port_id LEFT OUTER JOIN portbindingports AS portbindingports_1 ON ports.id = portbindingports_1.port_id LEFT OUTER JOIN securitygroupportbindings AS securitygroupportbindings_1 ON ports.id = securitygroupportbindings_1.port_id \nWHERE ports.tenant_id = %(tenant_id_1)s AND ports.network_id IN (%(network_id_1)s) FOR UPDATE' {'network_id_1': u'f8344378-ed58-4ce3-99ae-408c8591cda9', 'tenant_id_1': u'df3896201a174787b65b2b098aad2968'}
  2013-12-17 12:43:49.908 7347 TRACE neutron.api.v2.resource
  2013-12-17 12:43:49.920 7347 INFO neutron.wsgi [req-b8b4b523-cf50-4bcb-8356-19bbc4b9d057 8549dfbbb00940b9b3659230186bd26d df3896201a174787b65b2b098aad2968] 192.168.1.51 - - [17/Dec/2013 12:43:49] "DELETE /v2.0/networks/f8344378-ed58-4ce3-99ae-408c8591cda9.json HTTP/1.1" 500 230 0.063668

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


References