)]}'
{"id":"openstack%2Fovsdbapp~760394","triplet_id":"openstack%2Fovsdbapp~stable%2Fussuri~I98c37771883103e1fb0468de9cf85364071993fa","project":"openstack/ovsdbapp","branch":"stable/ussuri","topic":"add_a_connection_lock-stable/ussuri","hashtags":[],"change_id":"I98c37771883103e1fb0468de9cf85364071993fa","subject":"Add lock when calling idl.run()","status":"MERGED","created":"2020-10-29 16:08:05.000000000","updated":"2020-10-30 10:50:15.000000000","submitted":"2020-10-30 10:48:38.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":1,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"760394-1604054918626-94ba6c35","meta_rev_id":"764f51951e8320a6c3f134e8e20c33d12733878b","_number":760394,"virtual_id_number":760394,"owner":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},{"value":0,"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},{"value":0,"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},{"tag":"autogenerated:zuul:gate","value":2,"date":"2020-10-30 10:48:38.000000000","post_submit":true,"permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"recommended":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"all":[{"value":1,"date":"2020-10-29 20:44:03.000000000","permitted_voting_range":{"min":1,"max":2},"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},{"value":2,"date":"2020-10-30 08:33:06.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},{"value":0,"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":2,"date":"2020-10-30 09:20:45.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"}],"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":{"approved":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"all":[{"value":0,"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},{"value":0,"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},{"value":0,"date":"2020-10-29 20:25:18.000000000","permitted_voting_range":{"min":0,"max":1},"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":1,"date":"2020-10-30 09:20:45.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},{"value":0,"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},{"value":0,"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"}],"values":{"-1":"Branch Freeze"," 0":"No Priority","+1":"Important Change","+2":"Gate Blocker Fix / Urgent Change"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2020-10-29 20:25:18.000000000","updated_by":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"reviewer":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"state":"REVIEWER"},{"updated":"2020-10-29 20:44:03.000000000","updated_by":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"reviewer":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"state":"REVIEWER"},{"updated":"2020-10-30 08:33:06.000000000","updated_by":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"reviewer":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"state":"REVIEWER"},{"updated":"2020-10-30 09:20:45.000000000","updated_by":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"reviewer":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"state":"REVIEWER"},{"updated":"2020-10-30 10:48:38.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"}],"messages":[{"id":"6d46323d823c1049834eef63e65c76721b70dea0","author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"date":"2020-10-29 16:08:05.000000000","message":"Patch Set 1: Cherry Picked from branch master.","accounts_in_message":[],"_revision_number":1},{"id":"e8dcbfbefb8ebc94d1aa54eab79bcaed34a6320b","author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"date":"2020-10-29 16:08:23.000000000","message":"Patch Set 1: Cherry Picked\n\nThis patchset was cherry picked to branch stable/train as commit cbd2923245fefbd5cdeff53a1f98d7323291cd38","accounts_in_message":[],"_revision_number":1},{"id":"941a55eb6a7c57d6dd5ba2484d57f7cd1bf0526a","author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"date":"2020-10-29 16:50:36.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"1f85d991e7ef7e5b14fb94f973e3fd7efca6830d","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-29 18:06:17.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\n\n- openstack-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/b5057d87d6804c97be40e70af2967f82 : SUCCESS in 4m 04s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/19888526d4aa428cb9896de9c56cac85 : SUCCESS in 3m 22s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/0f266ae2891b4847bdd78a987525a337 : SUCCESS in 4m 47s\n- openstack-tox-py37 https://zuul.opendev.org/t/openstack/build/6ee97befdc92412b9f769a9ed91e84dd : SUCCESS in 3m 36s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/8782be0261554465b05024d918523e10 : SUCCESS in 6m 57s\n- openstack-tox-functional https://zuul.opendev.org/t/openstack/build/41ddc00c70864fac8c0151090a61fea3 : SUCCESS in 5m 33s\n- ovsdbapp-neutron-ovn-tempest-ovs-release https://zuul.opendev.org/t/openstack/build/f68ee20d97134994a768ca43796979fd : SUCCESS in 1h 12m 48s","accounts_in_message":[],"_revision_number":2},{"id":"8a75dd53214f5a4ce78e5dc5d348a40f8226f81b","author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"date":"2020-10-29 20:44:03.000000000","message":"Patch Set 2: Code-Review+1","accounts_in_message":[],"_revision_number":2},{"id":"a882ba58ea5d1d03e095772213cf005ca2c8111a","author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"date":"2020-10-30 08:33:06.000000000","message":"Patch Set 2: Code-Review+2","accounts_in_message":[],"_revision_number":2},{"id":"8b1f162a063d09080421e5c13ba4b36008c8d865","author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"date":"2020-10-30 09:20:45.000000000","message":"Patch Set 2: Code-Review+2 Workflow+1\n\n(1 comment)","accounts_in_message":[],"_revision_number":2},{"id":"b596fe3d83d5c0af1c44492f17e377738a691912","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-30 09:20:56.000000000","message":"Patch Set 2: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":2},{"id":"7b12a0848bc491c317e16193d35971c8f6a86385","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-30 10:48:38.000000000","message":"Change has been successfully merged by Zuul","accounts_in_message":[],"_revision_number":2},{"id":"586b6ce1b24c574d173323413360f147bc48f2c7","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-30 10:48:38.000000000","message":"Patch Set 2: Verified+2\n\nBuild succeeded (gate pipeline).\n\n- openstack-tox-lower-constraints https://zuul.opendev.org/t/openstack/build/3b284c930fa54359b113230489bfe6f7 : SUCCESS in 3m 55s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/98d1a95d357047c7984a690e92c6b27d : SUCCESS in 4m 04s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/1798726e6fff4e54b876b7b9c4de93cd : SUCCESS in 5m 11s\n- openstack-tox-py37 https://zuul.opendev.org/t/openstack/build/897111476c5448769933683aa9ca7d30 : SUCCESS in 4m 18s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/7726f12f8385484f8fbd94ec6381912f : SUCCESS in 6m 06s\n- openstack-tox-functional https://zuul.opendev.org/t/openstack/build/9186fc312cfc4182be6c281229a9cfd0 : SUCCESS in 7m 42s\n- ovsdbapp-neutron-ovn-tempest-ovs-release https://zuul.opendev.org/t/openstack/build/f444800200984574b8b6f70f8271b5cb : SUCCESS in 1h 03m 04s","accounts_in_message":[],"_revision_number":2},{"id":"32bdcb5831329d59d7e34d51d46b377ac4733eab","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-30 10:50:15.000000000","message":"Patch Set 2:\n\nBuild succeeded (promote pipeline).\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/b98b12ac7a094658a0451201b872945f : SUCCESS in 1m 11s","accounts_in_message":[],"_revision_number":2}],"current_revision_number":2,"current_revision":"9168ddcfa8a6cef68f89252dbda5173f58ec7c5c","revisions":{"11670a5838b9be7318d6b9af7190f85798b0335a":{"kind":"REWORK","_number":1,"created":"2020-10-29 16:08:05.000000000","uploader":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"ref":"refs/changes/94/760394/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/ovsdbapp","ref":"refs/changes/94/760394/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/ovsdbapp refs/changes/94/760394/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/ovsdbapp refs/changes/94/760394/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/ovsdbapp refs/changes/94/760394/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/ovsdbapp refs/changes/94/760394/1"}}},"commit":{"parents":[{"commit":"218cf7cc0b7da4a64ff30cdeaf8bf1cbb8ec66a2","subject":"Avoid race condition with RowEvent handling","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ovsdbapp/commit/218cf7cc0b7da4a64ff30cdeaf8bf1cbb8ec66a2"}]}],"author":{"name":"Terry Wilson","email":"twilson@redhat.com","date":"2020-08-11 18:12:47.000000000","tz":-300},"committer":{"name":"Terry Wilson","email":"twilson@redhat.com","date":"2020-10-29 16:08:05.000000000","tz":0},"subject":"Add lock when calling idl.run()","message":"Add lock when calling idl.run()\n\npython-ovs transparently handles DB reconnections during calls to\nIdl.run(). Since ovsdbapp uses a separate thread for the\nConnection (so it can handle responding to OVSDB keep-alive echo\nrequests) and for processing RowEvent notifcations, it is possible\nthat a thread could be trying to access OVSDB data at the same\ntime that the Connection thread is updating it. Especially during\na reconnect where the in-memory copy of the DB will be completely\nre-written, this causes a problem.\n\nTheoretically, an application that uses ovsdbapp shouldn\u0027t access\nanything in the backend code directly, but since there is now only\none supported Backend, that restriction has slipped a bit. If\nall accesses were in Command objects, mostly there wouldn\u0027t be a\nproblem as they would be handled in the Connection thread. But\nwith both ReadOnlyCommands and use of lookup() and anything in\nidlutils, the main thread can access the in-memory db directly and\npotentially cause problems.\n\nThe most common problematic method to be called outside of Command\nobjects is lookup() and ReadOnlyCommands. This patch adds a lock\naround calls to idl.run() and lookup() and execute() for the\nReadOnlyCommand case. row_by_value() is another target, but it is\nleft untouched because it doesn\u0027t have access to the API instance\nand it is *mostly* called from inside Command objects. User code\nthat doesn\u0027t will be easy to find because user code basically\nshouldn\u0027t use idlutils.\n\nChange-Id: I98c37771883103e1fb0468de9cf85364071993fa\nCloses-Bug: #1888878\n(cherry picked from commit 3cf8a427c0a4dfc248e0778c3b1ee65671d1d07b)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ovsdbapp/commit/11670a5838b9be7318d6b9af7190f85798b0335a"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ovsdbapp/commit/11670a5838b9be7318d6b9af7190f85798b0335a"}]},"branch":"refs/heads/stable/ussuri"},"9168ddcfa8a6cef68f89252dbda5173f58ec7c5c":{"kind":"REWORK","_number":2,"created":"2020-10-29 16:50:36.000000000","uploader":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"ref":"refs/changes/94/760394/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/ovsdbapp","ref":"refs/changes/94/760394/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/ovsdbapp refs/changes/94/760394/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/ovsdbapp refs/changes/94/760394/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/ovsdbapp refs/changes/94/760394/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/ovsdbapp refs/changes/94/760394/2"}}},"commit":{"parents":[{"commit":"218cf7cc0b7da4a64ff30cdeaf8bf1cbb8ec66a2","subject":"Avoid race condition with RowEvent handling","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ovsdbapp/commit/218cf7cc0b7da4a64ff30cdeaf8bf1cbb8ec66a2"}]}],"author":{"name":"Terry Wilson","email":"twilson@redhat.com","date":"2020-08-11 18:12:47.000000000","tz":-300},"committer":{"name":"Terry Wilson","email":"twilson@redhat.com","date":"2020-10-29 16:50:10.000000000","tz":-300},"subject":"Add lock when calling idl.run()","message":"Add lock when calling idl.run()\n\npython-ovs transparently handles DB reconnections during calls to\nIdl.run(). Since ovsdbapp uses a separate thread for the\nConnection (so it can handle responding to OVSDB keep-alive echo\nrequests) and for processing RowEvent notifcations, it is possible\nthat a thread could be trying to access OVSDB data at the same\ntime that the Connection thread is updating it. Especially during\na reconnect where the in-memory copy of the DB will be completely\nre-written, this causes a problem.\n\nTheoretically, an application that uses ovsdbapp shouldn\u0027t access\nanything in the backend code directly, but since there is now only\none supported Backend, that restriction has slipped a bit. If\nall accesses were in Command objects, mostly there wouldn\u0027t be a\nproblem as they would be handled in the Connection thread. But\nwith both ReadOnlyCommands and use of lookup() and anything in\nidlutils, the main thread can access the in-memory db directly and\npotentially cause problems.\n\nThe most common problematic method to be called outside of Command\nobjects is lookup() and ReadOnlyCommands. This patch adds a lock\naround calls to idl.run() and lookup() and execute() for the\nReadOnlyCommand case. row_by_value() is another target, but it is\nleft untouched because it doesn\u0027t have access to the API instance\nand it is *mostly* called from inside Command objects. User code\nthat doesn\u0027t will be easy to find because user code basically\nshouldn\u0027t use idlutils.\n\nConflicts:\n  ovsdbapp/tests/unit/backend/test_ovs_idl.py\n\nChange-Id: I98c37771883103e1fb0468de9cf85364071993fa\nCloses-Bug: #1888878\n(cherry picked from commit 3cf8a427c0a4dfc248e0778c3b1ee65671d1d07b)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ovsdbapp/commit/9168ddcfa8a6cef68f89252dbda5173f58ec7c5c"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/ovsdbapp/commit/9168ddcfa8a6cef68f89252dbda5173f58ec7c5c"}]},"branch":"refs/heads/stable/ussuri"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
