Reviewed: https://review.openstack.org/377084 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=17ecc54493ea29e75b8fee71e3de878c965f464d Submitter: Jenkins Branch: master
commit 17ecc54493ea29e75b8fee71e3de878c965f464d Author: Mohit Malik <[email protected]> Date: Mon Sep 26 13:25:25 2016 -0700 Make OVO exception NeutronDbObjectDuplicateEntry retriable OVO object create() raises exception NeutronDbObjectDuplicateEntry on seeing duplicate entries which should be handled by retrying the transaction. Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db Closes-Bug: #1627811 Change-Id: I2b311326c2caa7500aa9318d0b5bf753cf0eb543 ** 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/1627811 Title: OVO object create raises exception NeutronDbObjectDuplicateEntry which is not handled by Retry logic Status in neutron: Fix Released Bug description: https://github.com/openstack/neutron/blob/master/neutron/objects/base.py#L563 In the above link, Neutron OVO create raises NeutronDbObjectDuplicateEntry on seeing duplicate entries when for example we try to do multiple API calls to create AutoAllocatedTopology for a project. This needs to be handled by retrying the transaction so will need the retry logic to catch this exception here https://github.com/openstack/neutron/blob/master/neutron/db/api.py#L59 Following Test Failure can be reproduced with this bug: tempest.api.compute.admin.test_auto_allocate_network.AutoAllocateNetworkTest.test_server_multi_create_auto_allocate [id-2e6cf129-9e28-4e8a-aaaa-045ea826b2a6] Console Log Output: Captured traceback: 2016-09-13 20:57:35.982634 | ~~~~~~~~~~~~~~~~~~~ 2016-09-13 20:57:35.982652 | Traceback (most recent call last): 2016-09-13 20:57:35.982687 | File "tempest/api/compute/admin/test_auto_allocate_network.py", line 183, in test_server_multi_create_auto_allocate 2016-09-13 20:57:35.982704 | min_count=3) 2016-09-13 20:57:35.982726 | File "tempest/common/compute.py", line 168, in create_test_server 2016-09-13 20:57:35.982739 | % server['id']) 2016-09-13 20:57:35.982782 | File "/opt/stack/new/tempest/.tox/tempest/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__ 2016-09-13 20:57:35.982800 | self.force_reraise() 2016-09-13 20:57:35.982837 | File "/opt/stack/new/tempest/.tox/tempest/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise 2016-09-13 20:57:35.982856 | six.reraise(self.type_, self.value, self.tb) 2016-09-13 20:57:35.982877 | File "tempest/common/compute.py", line 150, in create_test_server 2016-09-13 20:57:35.982896 | clients.servers_client, server['id'], wait_until) 2016-09-13 20:57:35.982929 | File "tempest/common/waiters.py", line 75, in wait_for_server_status 2016-09-13 20:57:35.982941 | server_id=server_id) 2016-09-13 20:57:35.982973 | tempest.exceptions.BuildErrorException: Server b310365a-3db3-4a7a-a8fa-ffab9ba8c25f failed to build and is in ERROR status 2016-09-13 20:57:35.983389 | Details: {u'code': 500, u'message': u'Build of instance b310365a-3db3-4a7a-a8fa-ffab9ba8c25f aborted: Failed to allocate the network(s), not rescheduling.', u'created': u'2016-09-13T20:11:12Z'} Neutron Service Log: ERROR neutron.services.auto_allocate.db [req- 3d2a58fe-f110-42c7-b4d5-611ee52869ea tempest- AutoAllocateNetworkTest-163226826 -] Unknown error while provisioning topology for tenant da1f1d52ca6447cb8762a22342bdf007. Reason: Failed to create a duplicate AutoAllocatedTopology: for attribute(s) ['PRIMARY'] with value(s) da1f1d52ca6447cb8762a22342bdf007 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1627811/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

