← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1627811] [NEW] OVO object create raises exception NeutronDbObjectDuplicateEntry which is not handled by Retry logic

 

Public bug reported:

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

** Affects: neutron
     Importance: Undecided
     Assignee: Mohit Malik (mmalik4)
         Status: In Progress


** Tags: ovo

-- 
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:
  In Progress

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


Follow ups