yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #66765
[Bug 1709938] Re: DefaultSubnetPoolsTest is racy
Reviewed: https://review.openstack.org/492653
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=637734c1b6d5a158374576ce27941a04363fc8bb
Submitter: Jenkins
Branch: master
commit 637734c1b6d5a158374576ce27941a04363fc8bb
Author: Jakub Libosvar <libosvar@xxxxxxxxxx>
Date: Thu Aug 10 17:04:45 2017 +0000
Fix DefaultSubnetPool API test
As default subnetpool is a unique resource in the cloud, it needs to be
cleaned after each test is done. This patch adds a cleanup call to
DefaultSubnetPool tests in order to delete created default subnet pool.
Change-Id: I4c963d0d0e9910f7047061b51feb36c8a19de65c
Closes-bug: #1709938
** 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/1709938
Title:
DefaultSubnetPoolsTest is racy
Status in neutron:
Fix Released
Bug description:
Default subnet can exist only once in cloud and there are two tests
that create default and one that updates to default, it happens that
tests are running in parallel while the check for existing subnet is
at the class level. So it happens that:
1) class checks for default subnet, it's not there
3) test1 creates default subnet -> it's fine, we now have our unique resource
4) test2 creates default subnet -> the error we see cause test1 has the default
From the tempest logs:
Step1:
2017-08-10 07:03:12.341 3008 INFO tempest.lib.common.rest_client [req-07271c2f-6725-4f77-b676-a55a95adbf7b ] Request (DefaultSubnetPoolsTest:setUpClass): 200 GET http://10.0.0.103:9696/v2.0/subnetpools 0.418s
ion/json', 'X-Auth-Token': '<omitted>'}
Body: None
Response - Headers: {'status': '200', u'content-length': '18', 'content-location': 'http://10.0.0.103:9696/v2.0/subnetpools', u'date': 'Thu, 10 Aug 2017 11:03:12 GMT', u'content-type': 'application/json', u'connection': 'close', u'x-openstack-request-id': 'req-07271c2f-6725-4f77-b676-a55a95adbf7b'}
Body: {"subnetpools":[]} _log_request_full /usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py:425
Step2:
2017-08-10 07:03:12.998 3008 INFO tempest.lib.common.rest_client [req-6322524f-d1d8-4c7c-abd4-f08862bcec60 ] Request (DefaultSubnetPoolsTest:test_admin_create_default_subnetpool): 201 POST http://10.0.0.103:9696/v2.0/subnetpools 0.655s
2017-08-10 07:03:12.998 3008 DEBUG tempest.lib.common.rest_client [req-6322524f-d1d8-4c7c-abd4-f08862bcec60 ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: {"subnetpool": {"is_default": true, "prefixes": ["10.11.12.0/24"], "name": "tempest-smoke-subnetpool-2026337716", "min_prefixlen": "29"}}
Response - Headers: {'status': '201', u'content-length': '508', 'content-location': 'http://10.0.0.103:9696/v2.0/subnetpools', u'date': 'Thu, 10 Aug 2017 11:03:12 GMT', u'content-type': 'application/json', u'connection': 'close', u'x-openstack-request-id': 'req-6322524f-d1d8-4c7c-abd4-f08862bcec60'}
Body: {"subnetpool":{"is_default":true,"description":"","default_quota":null,"tenant_id":"542c5acbca3f49a0bc89d0903eb5c7e5","created_at":"2017-08-10T11:03:12Z","tags":[],"updated_at":"2017-08-10T11:03:12Z","prefixes":["10.11.12.0/24"],"min_prefixlen":"29","max_prefixlen":"32","address_scope_id":null,"revision_number":0,"ip_version":4,"shared":false,"default_prefixlen":"29","project_id":"542c5acbca3f49a0bc89d0903eb5c7e5","id":"dd1b15f4-0dc1-4582-9435-394a5b2bdea9","name":"tempest-smoke-subnetpool-2026337716"}} _log_request_full /usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py:425
Step3:
2017-08-10 07:03:15.667 3008 INFO tempest.lib.common.rest_client [req-24e48bfe-473f-44e0-aaf4-8f2debf81a0e ] Request (DefaultSubnetPoolsTest:test_convert_subnetpool_to_default_subnetpool): 400 PUT http://10.0.0.103:9696/v2.0/subnetpools/fb199e24-a9e2-443f-81cc-3c07c3bd7a20 0.842s
2017-08-10 07:03:15.668 3008 DEBUG tempest.lib.common.rest_client [req-24e48bfe-473f-44e0-aaf4-8f2debf81a0e ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: {"subnetpool": {"is_default": true}}
Response - Headers: {'status': '400', u'content-length': '203', 'content-location': 'http://10.0.0.103:9696/v2.0/subnetpools/fb199e24-a9e2-443f-81cc-3c07c3bd7a20', u'date': 'Thu, 10 Aug 2017 11:03:15 GMT', u'content-type': 'application/json', u'connection': 'close', u'x-openstack-request-id': 'req-24e48bfe-473f-44e0-aaf4-8f2debf81a0e'}
Body: {"NeutronError": {"message": "Invalid input for operation: A default subnetpool for this IP family has already been set. Only one default may exist per IP family.", "type": "InvalidInput", "detail": ""}} _log_request_full /usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py:425
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1709938/+subscriptions
References