yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #80596
[Bug 1849976] Re: "networkdhcpagentbindings.binding_index" autoincrement parameter is not working
Reviewed: https://review.opendev.org/692285
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0a3c53e411769141adc44b14af5efb854359af1a
Submitter: Zuul
Branch: master
commit 0a3c53e411769141adc44b14af5efb854359af1a
Author: Oleg Bondarev <obondarev@xxxxxxxxxxxx>
Date: Thu Oct 31 11:36:59 2019 +0400
Move migration to proper dir and fix objects tests
This is an alternative to revert patch:
https://review.opendev.org/#/c/691710/
Change-Id: I72082226e6b3930efb537cab9d979e5770211f72
Closes-Bug: #1849976
** 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/1849976
Title:
"networkdhcpagentbindings.binding_index" autoincrement parameter is
not working
Status in neutron:
Fix Released
Bug description:
Bug related to:
- https://bugs.launchpad.net/neutron/+bug/1535554
- https://review.opendev.org/#/c/288271/
As commented in [1], the "autoincrement" parameter in a non-primary key column does not work. This will lead to problems when creating objects without specifying explicitly the "binding_index" column. We can see some errors in UTs [2][3].
Error log (http://paste.openstack.org/show/785596/):
oslo_db.exception.DBDuplicateEntry: (sqlite3.IntegrityError) UNIQUE constraint failed: networkdhcpagentbindings.network_id, networkdhcpagentbindings.binding_index
[SQL: INSERT INTO networkdhcpagentbindings (network_id, dhcp_agent_id, binding_index) VALUES (?, ?, ?)]
[parameters: ('d87f9ef1-e892-4d32-b3fa-5b7d07fd1107', '5a909c22-3a34-4e16-b129-07e3ea1807a8', 783)]
(Background on this error at: http://sqlalche.me/e/gkpj)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 181, in func
return f(self, *args, **kwargs)
File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/objects/test_base.py", line 2014, in test_objects_exist_validate_filters_false
self._make_object(fields).create()
File "/home/zuul/src/opendev.org/openstack/neutron/neutron/objects/base.py", line 337, in decorator
return func(self, *args, **kwargs)
File "/home/zuul/src/opendev.org/openstack/neutron/neutron/objects/base.py", line 870, in create
object_class=self.__class__, db_exception=db_exc)
neutron_lib.objects.exceptions.NeutronDbObjectDuplicateEntry: Failed to create a duplicate NetworkDhcpAgentBinding: for attribute(s) ['network_id', 'binding_index'] with value(s) None
[1] https://review.opendev.org/#/c/288271/28/neutron/db/migration/alembic_migrations/versions/train/expand/c3e9d13c4367_add_binding_index_to_.py
[2] https://storage.gra1.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_2aa/690514/4/check/openstack-tox-py36/2aadb9c/testr_results.html.gz
[3] https://cb9c7313dea10c2758bb-cbf7b900962d6b77d5144bf757270132.ssl.cf2.rackcdn.com/690514/4/gate/openstack-tox-py36/a9064c9/testr_results.html.gz
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1849976/+subscriptions
References