)]}'
{"id":"openstack%2Fplacement~807493","triplet_id":"openstack%2Fplacement~master~I0f684b7a7a37e672316025564f0ae65478bdab6c","project":"openstack/placement","branch":"master","topic":"story-2009159","hashtags":[],"change_id":"I0f684b7a7a37e672316025564f0ae65478bdab6c","subject":"Add reproducer for Allocation/Inventory update race bug","status":"ABANDONED","created":"2021-09-06 05:57:54.000000000","updated":"2021-09-08 18:42:11.000000000","total_comment_count":4,"unresolved_comment_count":2,"has_review_started":true,"meta_rev_id":"4a366639ed427827aa943609dab4705527c14fa6","_number":807493,"virtual_id_number":807493,"owner":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"actions":{},"labels":{"Verified":{"disliked":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"tag":"autogenerated:zuul:check","value":-1,"date":"2021-09-06 06:18:24.000000000","permitted_voting_range":{"min":-2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","value":-1,"default_value":0,"optional":true},"Code-Review":{"disliked":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"all":[{"value":0,"permitted_voting_range":{"min":-2,"max":2},"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},{"value":-1,"date":"2021-09-06 14:40:35.000000000","permitted_voting_range":{"min":-2,"max":2},"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","value":-1,"default_value":0,"optional":true},"Workflow":{"rejected":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"all":[{"value":-1,"date":"2021-09-07 16:44:16.000000000","permitted_voting_range":{"min":-1,"max":1},"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"permitted_voting_range":{"min":0,"max":2},"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},{"value":0,"permitted_voting_range":{"min":0,"max":2},"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"value":0,"permitted_voting_range":{"min":0,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{" 0":"Default Priority","+1":"Contributor Review Promise","+2":"Core Review Promise"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2021-09-06 06:18:24.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2021-09-06 14:09:08.000000000","updated_by":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"reviewer":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"state":"CC"},{"updated":"2021-09-06 14:40:35.000000000","updated_by":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"reviewer":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"state":"REVIEWER"}],"messages":[{"id":"114d4b272c91a7cad9d74a14ec52f7c56eb2b4fd","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2021-09-06 05:57:54.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"aff40eff407662395b4ac607e841766058d187f1","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2021-09-06 06:00:09.000000000","message":"Patch Set 1:\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"8528fd92fee213f4b050c4cfdddbf0037ba475c7","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2021-09-06 06:18:24.000000000","message":"Patch Set 1: Verified-1\n\nBuild failed (check pipeline).  For information on how to proceed, see\nhttps://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing\n\n\n- build-openstack-api-ref https://zuul.opendev.org/t/openstack/build/93d486a2fbae4b4ca323dd573e08c8a2 : SUCCESS in 7m 13s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/8becf6be93794dc5bb00e66424276dea : SUCCESS in 8m 57s\n- openstack-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/f4032bb33e1d4a6c97ea9e73b69fe6d3 : SUCCESS in 7m 50s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/7ce7892eba1b43b6b52a8d3198bb9847 : SUCCESS in 6m 43s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/8f9eade92cd5423abaaac729009a8a5b : SUCCESS in 6m 20s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/6be0efecabf647c69008389f96e4b843 : SUCCESS in 8m 37s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/8e91d65fa8624303adba8937145cb3e0 : SUCCESS in 6m 31s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/1efa0fd79920426d8976a4c4e9b60a49 : SUCCESS in 7m 58s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/7a99f64b27b44d5a9927abc1512c0aa2 : SUCCESS in 10m 00s\n- openstack-tox-functional-py36 https://zuul.opendev.org/t/openstack/build/83e40d6e8cb3427b858ee4830c0060ea : SUCCESS in 7m 32s\n- openstack-tox-functional-py37 https://zuul.opendev.org/t/openstack/build/2930e07f0f04452e9bb98d6682c284bd : FAILURE in 7m 16s\n- openstack-tox-functional-py38 https://zuul.opendev.org/t/openstack/build/3d636356ceda49f194eacd79222d92d5 : FAILURE in 7m 53s\n- openstack-tox-functional-py39 https://zuul.opendev.org/t/openstack/build/aee7130e217c4089931fab35a5752d1e : SUCCESS in 7m 29s (non-voting)\n- placement-nova-tox-functional-py38 https://zuul.opendev.org/t/openstack/build/34af647a4ec847bba93993bd5bec9013 : SUCCESS in 18m 17s","accounts_in_message":[],"_revision_number":1},{"id":"acf42276fce57412fcee0bbc322311c5f0980c5c","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2021-09-06 06:34:40.000000000","message":"Patch Set 1:\n\nI don\u0027t understand why this is failing in the gate (it didn\u0027t fail locally) 😞\n\nft1.3: placement.tests.functional.test_allocation.TestAllocationSetConflictRetry.test_set_allocationstesttools.testresult.real._StringException: pythonlogging:\u0027\u0027: {{{\nINFO [oslo_db.sqlalchemy.provision] CREATE BACKEND mysql+pymysql://openstack_citest:openstack_citest@localhost/ TOKEN vdclwkxiya\n    INFO [placement.requestlog] 127.0.0.1 \"POST /placement/resource_providers\" status: 200 len: 833 microversion: 1.38\n    INFO [placement.requestlog] 127.0.0.1 \"PUT /placement/resource_providers/4c7c270c-d747-4566-b813-0e3666a07f2d/inventories\" status: 400 len: 389 microversion: 1.38\n    INFO [oslo_db.sqlalchemy.provision] DROP ALL OBJECTS, BACKEND mysql+pymysql://openstack_citest:openstack_citest@localhost/vdclwkxiya\n    INFO [oslo_db.sqlalchemy.provision] DROP BACKEND Engine(mysql+pymysql://openstack_citest:***@localhost/) TOKEN vdclwkxiya\n    INFO [oslo_db.sqlalchemy.provision] DISPOSE ENGINE Engine(mysql+pymysql://openstack_citest:***@localhost/)\n}}}\n\nstderr-1: {{{\n/home/zuul/src/opendev.org/openstack/placement/.tox/py38/lib/python3.8/site-packages/oslo_db/sqlalchemy/test_base.py:179: DeprecationWarning: Using class \u0027MySQLOpportunisticFixture\u0027 (either directly or via inheritance) is deprecated\n  self.FIXTURE(\n/home/zuul/src/opendev.org/openstack/placement/.tox/py38/lib/python3.8/site-packages/debtcollector/removals.py:277: DeprecationWarning: Using class \u0027DbFixture\u0027 (either directly or via inheritance) is deprecated: Please use oslo_db.sqlalchemy.test_fixtures directly\n  return old_init(self, *args, **kwargs)\n}}}\n\nTraceback (most recent call last):\n  File \"/home/zuul/src/opendev.org/openstack/placement/placement/tests/functional/test_allocation.py\", line 282, in setUp\n    create_resource_provider_and_inventory(self, conf, self.headers)\n  File \"/home/zuul/src/opendev.org/openstack/placement/placement/tests/functional/test_allocation.py\", line 123, in create_resource_provider_and_inventory\n    test.assertEqual(200, resp.status_code)\n  File \"/home/zuul/src/opendev.org/openstack/placement/.tox/py38/lib/python3.8/site-packages/testtools/testcase.py\", line 393, in assertEqual\n    self.assertThat(observed, matcher, message)\n  File \"/home/zuul/src/opendev.org/openstack/placement/.tox/py38/lib/python3.8/site-packages/testtools/testcase.py\", line 480, in assertThat\n    raise mismatch_error\ntesttools.matchers._impl.MismatchError: 200 !\u003d 400","accounts_in_message":[],"_revision_number":1},{"id":"6f33fe231559d05b077432f18a31d3a390d86a08","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2021-09-06 14:09:08.000000000","message":"Patch Set 1:\n\none thing I noticed that it did not fail in functional-py39 run so it is probably a race somewhere.","accounts_in_message":[],"_revision_number":1},{"id":"3332509055682e0cf6c3af7027f843f0927919a4","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2021-09-06 14:20:14.000000000","message":"Patch Set 1:\n\n\u003e Patch Set 1:\n\u003e \n\u003e one thing I noticed that it did not fail in functional-py39 run so it is probably a race somewhere.\n\nI was able to reproduce it locally and it seems it is failing randomly in these tests: https://paste.opendev.org/show/808602/ \n\nalso the reshape test took 1 minute to run which suggests another issue I guess.","accounts_in_message":[],"_revision_number":1},{"id":"fcb46cda7c4b136bd83da9b5c400075fb6ce2c34","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2021-09-06 14:27:10.000000000","message":"Patch Set 1:\n\n\u003e Patch Set 1:\n\u003e \n\u003e \u003e Patch Set 1:\n\u003e \u003e \n\u003e \u003e one thing I noticed that it did not fail in functional-py39 run so it is probably a race somewhere.\n\u003e \n\u003e I was able to reproduce it locally and it seems it is failing randomly in these tests: https://paste.opendev.org/show/808602/ \n\u003e \n\u003e also the reshape test took 1 minute to run which suggests another issue I guess.\n\nrunning just TestAllocationSetConflictRetry.test_set_allocations_for_consumer alone passes.","accounts_in_message":[],"_revision_number":1},{"id":"66060f39062fb2598f08250d0f9ef830977334c1","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2021-09-06 14:40:35.000000000","message":"Patch Set 1: Code-Review-1\n\n(1 comment)\n\nOK I found one possible reason for a race.","accounts_in_message":[],"_revision_number":1},{"id":"0e4a63a16605fab3e8ab5936b03dc039b273f0ba","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2021-09-06 15:17:10.000000000","message":"Patch Set 1:\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"e0e9bd1850f475d00d52cce1925bdee2b0e823ab","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2021-09-06 15:48:02.000000000","message":"Patch Set 1:\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"89496554130ec41ccd13f3d2bff96af9382f2052","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2021-09-07 16:44:16.000000000","message":"Patch Set 1: Workflow-1\n\nwomp womp","accounts_in_message":[],"_revision_number":1},{"id":"4a366639ed427827aa943609dab4705527c14fa6","tag":"autogenerated:gerrit:abandon","author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"date":"2021-09-08 18:42:11.000000000","message":"Abandoned\n\nAbandoning this as we likely have agreement that the related fix can merge without a reproducer.","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"f4c9c82f753380b221520d4184835b62cebc4205","revisions":{"f4c9c82f753380b221520d4184835b62cebc4205":{"kind":"REWORK","_number":1,"created":"2021-09-06 05:57:54.000000000","uploader":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"ref":"refs/changes/93/807493/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/93/807493/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/93/807493/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/93/807493/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/93/807493/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/93/807493/1"}}},"commit":{"parents":[{"commit":"8b000867ca50ca99877fe8819785918aa6f58764","subject":"Add reproducer for Project creation race bug","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/8b000867ca50ca99877fe8819785918aa6f58764"}]}],"author":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2021-09-03 23:18:34.000000000","tz":0},"committer":{"name":"melanie witt","email":"melwittt@gmail.com","date":"2021-09-06 05:53:08.000000000","tz":0},"subject":"Add reproducer for Allocation/Inventory update race bug","message":"Add reproducer for Allocation/Inventory update race bug\n\nCurrently, because the AllocationList.replace_all() call in the PUT\n/allocations/{consumer_uuid} path is contained within an outer database\ntransaction, if the set allocations attempt raises a\nResourceProviderConcurrentUpdateDetected exception, the retry mechanism\ninside replace_all() will repeatedly read the same resource provider\ngeneration value from the database (if the transaction isolation level\nis the default REPEATABLE_READ) and never succeed at retrying with a\nfreshly retrieved resource provider generation. It looks like this:\n\n  PUT /placement/allocations/ad20cf43-efa8-418b-b66b-8e0ac5655ce6\n  Retrying allocations write on resource provider generation conflict\n  Retrying allocations write on resource provider generation conflict\n  [...]\n  Exceeded retry limit of 10 on allocations write\n  Placement API returning an error response: Inventory and/or\n    allocations changed while attempting to allocate: Another thread\n    concurrently updated the resource provider data. Please retry your\n    update\n\nThis adds reproducer tests to validate a future fix of the issue. These\ntests run only with a real mysql database as transaction isolation is\nnecessary to reproduce the bug and validate a fix.\n\nThe OS_TEST_DBAPI_ADMIN_CONNECTION is also added as an allowed\npassthrough environment variable for those working on mysql\nopportunistic tests locally.\n\nStory: 2009178\nTask: 43211\n\nChange-Id: I0f684b7a7a37e672316025564f0ae65478bdab6c\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/f4c9c82f753380b221520d4184835b62cebc4205"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/f4c9c82f753380b221520d4184835b62cebc4205"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
