)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9759e4b6bd2f6a1463bf2eb8124911ceb65256db","unresolved":false,"context_lines":[{"line_number":17,"context_line":"BEFORE_DELETE network event."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug #1697324"},{"line_number":20,"context_line":"Closes-Bug #1696537"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I7c3c4654f183b317647a28d599a538fe460db68f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff346bd7_c39a3b60","line":20,"updated":"2017-07-28 16:56:36.000000000","message":"is it the right bug number? doesn\u0027t seem related, but maybe I miss smth.","commit_id":"f5439aa7c29fe867b0d8b2e03e587fa736a6ec87"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"96b2e87d19a9c78d86a0f4d0cd8e58509403804e","unresolved":false,"context_lines":[{"line_number":17,"context_line":"BEFORE_DELETE network event."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug #1697324"},{"line_number":20,"context_line":"Closes-Bug #1696537"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I7c3c4654f183b317647a28d599a538fe460db68f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"df3967d1_51edd423","line":20,"in_reply_to":"ff346bd7_c39a3b60","updated":"2017-07-28 17:27:43.000000000","message":"It might not be. I\u0027ll fix this","commit_id":"f5439aa7c29fe867b0d8b2e03e587fa736a6ec87"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"633cf571942f24090bfa317363c41be1ee51d3c8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Miguel Lavalle \u003cmalavall@us.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-07-30 21:33:12 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Revert \"Delete segments on BEFORE_DELETE instead of PRECOMMIT\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This reverts commit 12d24abba75ab3b926edbac389437bacc23914dd."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7f287b81_16e3ae07","line":7,"updated":"2017-08-22 21:15:56.000000000","message":"also, is it even a clean revert now?","commit_id":"76814ecd852c68c0c5995142af24bcd3fd82d627"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7282e236bb58becb9cae969639ac7198c53a4d99","unresolved":false,"context_lines":[{"line_number":18,"context_line":"around that, network_db is expired and read again after notifying the"},{"line_number":19,"context_line":"PRECOMMIT_DELETE event in delete_network in the DB core plug-in."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Closes-Bug #1697324"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I7c3c4654f183b317647a28d599a538fe460db68f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7f287b81_96d79e24","line":21,"updated":"2017-08-22 21:15:42.000000000","message":"Closes-Bug: #...","commit_id":"76814ecd852c68c0c5995142af24bcd3fd82d627"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d4ce8ed98c7d9edd1bd435f79ab52be5b7369608","unresolved":false,"context_lines":[{"line_number":27,"context_line":"not in use and can be deleted."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Closes-Bug: #1697324"},{"line_number":30,"context_line":"Closes-Bug: #1732543"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Change-Id: I7c3c4654f183b317647a28d599a538fe460db68f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"df87a7cf_2c64d1b8","line":30,"updated":"2017-12-06 15:43:14.000000000","message":"I would suggest we don\u0027t mark it as done before we have full test coverage (tempest) for the scenario.","commit_id":"eaf7e65469d38156b2a38f62cf75d9f8015aaa0c"}],"doc/source/contributor/internals/segments.rst":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c6a7aed1cd0a30ff62926770074ea228ed4066a2","unresolved":false,"context_lines":[{"line_number":33,"context_line":"* ``PRECOMMIT_DELETE``"},{"line_number":34,"context_line":"* ``AFTER_DELETE``"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":".. note:: The deletion of a network will not notify the deletion of the"},{"line_number":37,"context_line":"   associated segments."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"As of this writing, ``ML2`` and ``OVN`` register callbacks to receive events"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff346bd7_e201d907","line":36,"updated":"2017-07-27 20:25:21.000000000","message":"Maybe expand this just a bit to suggest to subscribe to network_delete events so they can cleanup segments if they need to.","commit_id":"58b04027144545c78daef8083bdd03c472c52097"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"65879ca7c21a8fb6a4e01b4118956feb3abca377","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":".. note:: The deletion of a network will not notify the deletion of the"},{"line_number":37,"context_line":"   associated segments. Core plug-ins can subscribe  a callback to the"},{"line_number":38,"context_line":"   ``AFTER_DELETE`` event for the ``NETWORK`` resource, in case a segments"},{"line_number":39,"context_line":"   related clean up is necessary after a network deletion."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"As of this writing, ``ML2`` and ``OVN`` register callbacks to receive events"}],"source_content_type":"text/x-rst","patch_set":5,"id":"df3967d1_b13400e0","line":38,"updated":"2017-07-28 17:21:53.000000000","message":"can\u0027t we continue issuing the event, just not relying on segment plugin to delete the records in db? I think that would be less intrusive for existing consumers of the event.","commit_id":"f5439aa7c29fe867b0d8b2e03e587fa736a6ec87"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"96b2e87d19a9c78d86a0f4d0cd8e58509403804e","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":".. note:: The deletion of a network will not notify the deletion of the"},{"line_number":37,"context_line":"   associated segments. Core plug-ins can subscribe  a callback to the"},{"line_number":38,"context_line":"   ``AFTER_DELETE`` event for the ``NETWORK`` resource, in case a segments"},{"line_number":39,"context_line":"   related clean up is necessary after a network deletion."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"As of this writing, ``ML2`` and ``OVN`` register callbacks to receive events"}],"source_content_type":"text/x-rst","patch_set":5,"id":"df3967d1_1174ec98","line":38,"in_reply_to":"df3967d1_b13400e0","updated":"2017-07-28 17:27:43.000000000","message":"This is actually an excellent idea. I will propose another revision shortly","commit_id":"f5439aa7c29fe867b0d8b2e03e587fa736a6ec87"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7282e236bb58becb9cae969639ac7198c53a4d99","unresolved":false,"context_lines":[{"line_number":456,"context_line":"                network \u003d self._make_network_dict(network_db, context\u003dcontext)"},{"line_number":457,"context_line":"                registry.notify(resources.NETWORK, events.PRECOMMIT_DELETE,"},{"line_number":458,"context_line":"                                self, context\u003dcontext, network_id\u003did)"},{"line_number":459,"context_line":"                # We expire network_db here because segment deletion migh have"},{"line_number":460,"context_line":"                # left the relationship stale"},{"line_number":461,"context_line":"                context.session.expire(network_db)"},{"line_number":462,"context_line":"                network_db \u003d self._get_network(context, id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_d61766ed","line":459,"updated":"2017-08-22 21:15:42.000000000","message":"might","commit_id":"76814ecd852c68c0c5995142af24bcd3fd82d627"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42f51c700bce95330e2809fd5198c159525162a2","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                # We expire network_db here because segment deletion migh have"},{"line_number":460,"context_line":"                # left the relationship stale"},{"line_number":461,"context_line":"                context.session.expire(network_db)"},{"line_number":462,"context_line":"                network_db \u003d self._get_network(context, id)"},{"line_number":463,"context_line":"                context.session.delete(network_db)"},{"line_number":464,"context_line":"        registry.notify(resources.NETWORK, events.AFTER_DELETE,"},{"line_number":465,"context_line":"                        self, context\u003dcontext, network\u003dnetwork)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_9740b509","line":462,"updated":"2017-08-23 03:03:44.000000000","message":"this just seems totally random. can you please add that in the callback this is done","commit_id":"76814ecd852c68c0c5995142af24bcd3fd82d627"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4312b4d19a11f4b9d44d1f047f3a2cb8c0fbb450","unresolved":false,"context_lines":[{"line_number":456,"context_line":"                network \u003d self._make_network_dict(network_db, context\u003dcontext)"},{"line_number":457,"context_line":"                registry.notify(resources.NETWORK, events.PRECOMMIT_DELETE,"},{"line_number":458,"context_line":"                                self, context\u003dcontext, network_id\u003did)"},{"line_number":459,"context_line":"                # We expire network_db here because precommit deletion"},{"line_number":460,"context_line":"                # might have left the relationship stale, for example,"},{"line_number":461,"context_line":"                # if we deleted a segment."},{"line_number":462,"context_line":"                context.session.expire(network_db)"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_7774e668","line":459,"updated":"2017-12-06 16:19:45.000000000","message":"this for me is opening a can of worms - each time we do a notify and the notify tampers with the database then it can causes the same issue. would this be addressed if we call this out of the context manager (line 454)?","commit_id":"eaf7e65469d38156b2a38f62cf75d9f8015aaa0c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"acace0624780bb368985b2c994766a35e103ef84","unresolved":false,"context_lines":[{"line_number":456,"context_line":"                network \u003d self._make_network_dict(network_db, context\u003dcontext)"},{"line_number":457,"context_line":"                registry.notify(resources.NETWORK, events.PRECOMMIT_DELETE,"},{"line_number":458,"context_line":"                                self, context\u003dcontext, network_id\u003did)"},{"line_number":459,"context_line":"                # We expire network_db here because precommit deletion"},{"line_number":460,"context_line":"                # might have left the relationship stale, for example,"},{"line_number":461,"context_line":"                # if we deleted a segment."},{"line_number":462,"context_line":"                context.session.expire(network_db)"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_db62b43e","line":459,"in_reply_to":"df87a7cf_18e107d1","updated":"2017-12-06 22:08:19.000000000","message":"For the record, the patch attempting the refactoring is: https://review.openstack.org/#/c/526137/","commit_id":"eaf7e65469d38156b2a38f62cf75d9f8015aaa0c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f389ed478c89211f903e6630818b601f31d093af","unresolved":false,"context_lines":[{"line_number":456,"context_line":"                network \u003d self._make_network_dict(network_db, context\u003dcontext)"},{"line_number":457,"context_line":"                registry.notify(resources.NETWORK, events.PRECOMMIT_DELETE,"},{"line_number":458,"context_line":"                                self, context\u003dcontext, network_id\u003did)"},{"line_number":459,"context_line":"                # We expire network_db here because precommit deletion"},{"line_number":460,"context_line":"                # might have left the relationship stale, for example,"},{"line_number":461,"context_line":"                # if we deleted a segment."},{"line_number":462,"context_line":"                context.session.expire(network_db)"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_18e107d1","line":459,"in_reply_to":"df87a7cf_3222ec01","updated":"2017-12-06 18:09:51.000000000","message":"We all want to avoid the session expire call if possible. Since we already have a Tempest test that validates this solution (https://review.openstack.org/#/c/526124/), this is what we are going to do:\n\n1) Land this patch\n2) Test\n3) Make a patch that refactors this method based on the fact that that the notify call in L457 only passes the network id. In other words, we can move L455-456 after the notify call and remove the expire in L462","commit_id":"eaf7e65469d38156b2a38f62cf75d9f8015aaa0c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cdee45abdbb4e01ee75f84c7b8b994f14ec8d28e","unresolved":false,"context_lines":[{"line_number":456,"context_line":"                network \u003d self._make_network_dict(network_db, context\u003dcontext)"},{"line_number":457,"context_line":"                registry.notify(resources.NETWORK, events.PRECOMMIT_DELETE,"},{"line_number":458,"context_line":"                                self, context\u003dcontext, network_id\u003did)"},{"line_number":459,"context_line":"                # We expire network_db here because precommit deletion"},{"line_number":460,"context_line":"                # might have left the relationship stale, for example,"},{"line_number":461,"context_line":"                # if we deleted a segment."},{"line_number":462,"context_line":"                context.session.expire(network_db)"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_3222ec01","line":459,"in_reply_to":"df87a7cf_7774e668","updated":"2017-12-06 17:03:02.000000000","message":"From looking at other code, this always seems to be inside the writer context, since I believe we have to roll-back all these transactions if there is a failure.","commit_id":"eaf7e65469d38156b2a38f62cf75d9f8015aaa0c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4312b4d19a11f4b9d44d1f047f3a2cb8c0fbb450","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                # We expire network_db here because precommit deletion"},{"line_number":460,"context_line":"                # might have left the relationship stale, for example,"},{"line_number":461,"context_line":"                # if we deleted a segment."},{"line_number":462,"context_line":"                context.session.expire(network_db)"},{"line_number":463,"context_line":"                network_db \u003d self._get_network(context, id)"},{"line_number":464,"context_line":"                context.session.delete(network_db)"},{"line_number":465,"context_line":"        registry.notify(resources.NETWORK, events.AFTER_DELETE,"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_77c6269d","line":462,"updated":"2017-12-06 16:19:45.000000000","message":"could this have issues with the retry above? (line 449)","commit_id":"eaf7e65469d38156b2a38f62cf75d9f8015aaa0c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cdee45abdbb4e01ee75f84c7b8b994f14ec8d28e","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                # We expire network_db here because precommit deletion"},{"line_number":460,"context_line":"                # might have left the relationship stale, for example,"},{"line_number":461,"context_line":"                # if we deleted a segment."},{"line_number":462,"context_line":"                context.session.expire(network_db)"},{"line_number":463,"context_line":"                network_db \u003d self._get_network(context, id)"},{"line_number":464,"context_line":"                context.session.delete(network_db)"},{"line_number":465,"context_line":"        registry.notify(resources.NETWORK, events.AFTER_DELETE,"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_f2bec463","line":462,"in_reply_to":"df87a7cf_77c6269d","updated":"2017-12-06 17:03:02.000000000","message":"I don\u0027t know to tell you the truth, perhaps Miguel has an opinion.","commit_id":"eaf7e65469d38156b2a38f62cf75d9f8015aaa0c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7b8e94f7f91813f5c197c71d0628b7f07d827fd4","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                # We expire network_db here because precommit deletion"},{"line_number":460,"context_line":"                # might have left the relationship stale, for example,"},{"line_number":461,"context_line":"                # if we deleted a segment."},{"line_number":462,"context_line":"                context.session.expire(network_db)"},{"line_number":463,"context_line":"                network_db \u003d self._get_network(context, id)"},{"line_number":464,"context_line":"                context.session.delete(network_db)"},{"line_number":465,"context_line":"        registry.notify(resources.NETWORK, events.AFTER_DELETE,"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_7d2845e1","line":462,"in_reply_to":"df87a7cf_f2bec463","updated":"2017-12-06 17:27:18.000000000","message":"I believe retry is validated with test_delete_network_port_exists_owned_by_network_race ?","commit_id":"eaf7e65469d38156b2a38f62cf75d9f8015aaa0c"}],"neutron/tests/unit/extensions/test_segment.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d4ce8ed98c7d9edd1bd435f79ab52be5b7369608","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            self._update(\u0027segments\u0027, segment[\u0027segment\u0027][\u0027id\u0027], segment,"},{"line_number":366,"context_line":"                         expected_code\u003dwebob.exc.HTTPClientError.code)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    def test_segment_notification_on_delete_network(self):"},{"line_number":369,"context_line":"        with mock.patch.object(db, \u0027_delete_segments_for_network\u0027) as dsn:"},{"line_number":370,"context_line":"            db.subscribe()"},{"line_number":371,"context_line":"            with self.network() as network:"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_cc41a50d","line":368,"updated":"2017-12-06 15:43:14.000000000","message":"technically, the test case doesn\u0027t validate the bug. it validates that precommit-delete event triggers delete_segments_for_network, but it doesn\u0027t validate that segment is NOT deleted before precommit-delete. You could in theory have situation where delete_segments_for_network is triggered twice / segments deleted in some other way before precommit-delete, which would expose the same failure mode.\n\nI think we should have a test case that validates the actual scenario. It should be easier to do that with tempest api admin test. AFAIU Jakub was working on it.","commit_id":"eaf7e65469d38156b2a38f62cf75d9f8015aaa0c"}]}
