yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #70229
[Bug 1739071] Re: Floating IP assigned to a DHCP port leads to a exception if DHCP port is deleted
Reviewed: https://review.openstack.org/529090
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=bab1ae881285ad4381a7e8bec0563d4611bdc2d1
Submitter: Zuul
Branch: master
commit bab1ae881285ad4381a7e8bec0563d4611bdc2d1
Author: Gary Kotton <gkotton@xxxxxxxxxx>
Date: Tue Dec 19 07:09:42 2017 -0800
L3: prevent associating a FIP to a DHCP port
We should not allow a floating IP to be assigned to a DHCP port.
Change-Id: I6bf940b6e9195dc7d99e13fbe4454b08488cab0f
Closes-bug: #1739071
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1739071
Title:
Floating IP assigned to a DHCP port leads to a exception if DHCP port
is deleted
Status in neutron:
Fix Released
Bug description:
A DHCP port should not be allowed to have a floating IP assigned to
it. Here is the trace for when this port is deleted.
root@loadbalancer01:~# neutron subnet-update 2d370a99-f177-4b85-892e-56def086e046 --disable-dhcp
Request Failed: internal server error while processing your request.
Neutron server returns request_ids: ['req-f43b7e82-58eb-400e-a9ac-3341f3324e8c']
Backtrace from neutron-server.log file:
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource [req-f43b7e82-58eb-400e-a9ac-3341f3324e8c ab32ddb0a8e54a6eb756a0a1d82f8345 1cb4e51898b04cbabdacb0b84b6a7e7e - - -] update failed: No details.
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource Traceback (most recent call last):
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 93, in resource
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource result = method(request=request, **args)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 617, in update
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource return self._update(request, id, body, **kwargs)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 95, in wrapped
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self.force_reraise()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 91, in wrapped
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 151, in wrapper
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self.force_reraise()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 139, in wrapper
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 131, in wrapped
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource traceback.format_exc())
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self.force_reraise()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 126, in wrapped
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 665, in _update
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource obj = obj_updater(request.context, id, **kwargs)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/vmware_nsx/plugins/nsx_v/plugin.py", line 2646, in update_subnet
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource return self._safe_update_subnet(context, id, subnet)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/vmware_nsx/plugins/nsx_v/plugin.py", line 2681, in _safe_update_subnet
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self._update_subnet_dhcp_status(subnet, context)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/vmware_nsx/plugins/nsx_v/plugin.py", line 2774, in _update_subnet_dhcp_status
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self.ipam.delete_port(context, port['id'])
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/ipam_pluggable_backend.py", line 403, in delete_port
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource port['fixed_ips'])
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/ipam_pluggable_backend.py", line 93, in _ipam_deallocate_ips
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource "external system for %s"), addresses)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self.force_reraise()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/ipam_pluggable_backend.py", line 69, in _ipam_deallocate_ips
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource ipam_subnet = ipam_driver.get_subnet(ip['subnet_id'])
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/ipam/drivers/neutrondb_ipam/driver.py", line 266, in get_subnet
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource return NeutronDbSubnet.load(subnet_id, self._context)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/ipam/drivers/neutrondb_ipam/driver.py", line 91, in load
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource ctx, neutron_subnet_id)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/ipam/drivers/neutrondb_ipam/db_api.py", line 30, in load_by_neutron_subnet_id
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource context, neutron_subnet_id=neutron_subnet_id)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/objects/base.py", line 436, in get_objects
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource with db_api.autonested_transaction(context.session):
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource return self.gen.next()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 232, in autonested_transaction
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource session_context = sess.begin(subtransactions=True)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 744, in begin
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self, nested=nested)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 181, in __init__
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self._take_snapshot()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 265, in _take_snapshot
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self.session.flush()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2027, in flush
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self._flush(objects)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2145, in _flush
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource transaction.rollback(_capture_exception=True)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource compat.reraise(exc_type, exc_value, exc_tb)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2109, in _flush
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource flush_context.execute()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource rec.execute(self)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 561, in execute
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource uow
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 249, in delete_obj
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource cached_connections, mapper, table, delete)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 892, in _emit_delete_statements
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource c = connection.execute(statement, del_objects)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource return meth(self, multiparams, params)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource return connection._execute_clauseelement(self, multiparams, params)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource compiled_sql, distilled_params
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource context)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource util.raise_from_cause(newraise, exc_info)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource reraise(type(exception), exception, tb=exc_tb)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource context)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource cursor.execute(statement, parameters)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 166, in execute
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource result = self._query(query)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 322, in _query
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource conn.query(q)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 835, in query
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1019, in _read_query_result
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource result.read()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1302, in read
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource first_packet = self.connection._read_packet()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 981, in _read_packet
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource packet.check_error()
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 393, in check_error
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource err.raise_mysql_exception(self._data)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource raise errorclass(errno, errval)
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource DBReferenceError: (pymysql.err.IntegrityError) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`neutron`.`floatingips`, CONSTRAINT `floatingips_ibfk_1` FOREIGN KEY (`fixed_port_id`) REFERENCES `ports` (`id`))') [SQL: u'DELETE FROM ports WHERE ports.id = %(id)s'] [parameters: {'id': u'e7aa58b7-8210-4ac5-967e-8b210cfe4e87'}]
2017-12-17 05:45:58.568 3666 ERROR neutron.api.v2.resource
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1739071/+subscriptions
References