)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d993cb2228e3d20fbd5fdd4d55574d2679218ea6","unresolved":false,"context_lines":[{"line_number":22,"context_line":"read again after notifying the PRECOMMIT_DELETE event in"},{"line_number":23,"context_line":"delete_network in the DB core plug-in."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Second, create a BEFORE notifier in external_net_db to check if"},{"line_number":26,"context_line":"there are associated floating IPs, so it can fail before we try"},{"line_number":27,"context_line":"and delete the network.  The existing BEFORE notifier can then"},{"line_number":28,"context_line":"be moved to PRECOMMIT."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_f371050e","line":25,"updated":"2017-12-05 19:38:27.000000000","message":"how is this piece related to bugs reported? I don\u0027t think it should be part of the patch, no? It\u0027s already too many things in a single patch. Besides, we may need to then backport the external network fix to Ocata or earlier, at which point the segment piece won\u0027t make sense because it\u0027s only for Pike+. This will make life of the engineer backporting it to earlier branches / product releases more miserable.\n\nLet\u0027s keep it to one thing at a time.","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"027f8c3454f5fdaf01acb6fe3007ed88cf9b0a3d","unresolved":false,"context_lines":[{"line_number":22,"context_line":"read again after notifying the PRECOMMIT_DELETE event in"},{"line_number":23,"context_line":"delete_network in the DB core plug-in."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Second, create a BEFORE notifier in external_net_db to check if"},{"line_number":26,"context_line":"there are associated floating IPs, so it can fail before we try"},{"line_number":27,"context_line":"and delete the network.  The existing BEFORE notifier can then"},{"line_number":28,"context_line":"be moved to PRECOMMIT."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_c9c9ae78","line":25,"in_reply_to":"df87a7cf_867955fd","updated":"2017-12-05 20:50:15.000000000","message":"As we discussed in IRC just now, the order of ensure() vs. BEFORE_DELETE handlers call shouldn\u0027t matter anymore for HA networks since segment handler no longer removes models from database. So I still don\u0027t see a reason to keep those bits tangled in a single patch.\n\nThat being said, that\u0027s a legit bug in external network code where any failure in delete_network persistence layer may result in floating IP resources removed but not the network itself. This issue asks for a separate bug report and separate assessment. Please spin it off.","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b73d1b2498e22b9431febdab52585fca1364a5bf","unresolved":false,"context_lines":[{"line_number":22,"context_line":"read again after notifying the PRECOMMIT_DELETE event in"},{"line_number":23,"context_line":"delete_network in the DB core plug-in."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Second, create a BEFORE notifier in external_net_db to check if"},{"line_number":26,"context_line":"there are associated floating IPs, so it can fail before we try"},{"line_number":27,"context_line":"and delete the network.  The existing BEFORE notifier can then"},{"line_number":28,"context_line":"be moved to PRECOMMIT."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_867955fd","line":25,"in_reply_to":"df87a7cf_f371050e","updated":"2017-12-05 20:22:05.000000000","message":"It\u0027s related to Sun\u0027s comment in bug 1732543, where we could now fail if the external network has any un-associated floating IPs where we used to succeed.\n\nWe have to change the current BEFORE notifier to just check if we can delete the network, and move the current BEFORE to PRECOMMIT.  We would have deleted un-associated floating IPs accidentally as well.","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d993cb2228e3d20fbd5fdd4d55574d2679218ea6","unresolved":false,"context_lines":[{"line_number":27,"context_line":"and delete the network.  The existing BEFORE notifier can then"},{"line_number":28,"context_line":"be moved to PRECOMMIT."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Third, make _ensure_network_not_in_use() a BEFORE notifier,"},{"line_number":31,"context_line":"since that better fits the design of how it is being used."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Closes-Bug #1697324"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_f3dfc5d3","line":30,"updated":"2017-12-05 19:38:27.000000000","message":"that\u0027s not needed for this patch either. it\u0027s refactoring and so shouldn\u0027t be then backported to earlier releases.","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b73d1b2498e22b9431febdab52585fca1364a5bf","unresolved":false,"context_lines":[{"line_number":27,"context_line":"and delete the network.  The existing BEFORE notifier can then"},{"line_number":28,"context_line":"be moved to PRECOMMIT."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Third, make _ensure_network_not_in_use() a BEFORE notifier,"},{"line_number":31,"context_line":"since that better fits the design of how it is being used."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Closes-Bug #1697324"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_46834dcd","line":30,"in_reply_to":"df87a7cf_f3dfc5d3","updated":"2017-12-05 20:22:05.000000000","message":"Right, I can move the call and leave it alone, then refactor in another patch.","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d993cb2228e3d20fbd5fdd4d55574d2679218ea6","unresolved":false,"context_lines":[{"line_number":30,"context_line":"Third, make _ensure_network_not_in_use() a BEFORE notifier,"},{"line_number":31,"context_line":"since that better fits the design of how it is being used."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Closes-Bug #1697324"},{"line_number":34,"context_line":"Closes-Bug #1732543"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Change-Id: I5360847769120e4366629223ca5f93406ef9beb0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_3323ed07","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":19},"updated":"2017-12-05 19:38:27.000000000","message":"Closes-Bug: #...","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b73d1b2498e22b9431febdab52585fca1364a5bf","unresolved":false,"context_lines":[{"line_number":30,"context_line":"Third, make _ensure_network_not_in_use() a BEFORE notifier,"},{"line_number":31,"context_line":"since that better fits the design of how it is being used."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Closes-Bug #1697324"},{"line_number":34,"context_line":"Closes-Bug #1732543"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Change-Id: I5360847769120e4366629223ca5f93406ef9beb0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_c64f5dbb","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":19},"in_reply_to":"df87a7cf_3323ed07","updated":"2017-12-05 20:22:05.000000000","message":"Will fix.","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"}],"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":"d993cb2228e3d20fbd5fdd4d55574d2679218ea6","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                ndb_utils.filter_non_model_columns(n, models_v2.Network))"},{"line_number":422,"context_line":"        return self._make_network_dict(network, context\u003dcontext)"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    @registry.receives(resources.NETWORK, [events.BEFORE_DELETE])"},{"line_number":425,"context_line":"    def _ensure_network_not_in_use(self, resource, event, trigger,"},{"line_number":426,"context_line":"                                   context, network_id, **kwargs):"},{"line_number":427,"context_line":"        non_auto_ports \u003d context.session.query("}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_939519e7","line":424,"updated":"2017-12-05 19:38:27.000000000","message":"please don\u0027t include this change in this patch (rationale in the commit message comments).","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b73d1b2498e22b9431febdab52585fca1364a5bf","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                ndb_utils.filter_non_model_columns(n, models_v2.Network))"},{"line_number":422,"context_line":"        return self._make_network_dict(network, context\u003dcontext)"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    @registry.receives(resources.NETWORK, [events.BEFORE_DELETE])"},{"line_number":425,"context_line":"    def _ensure_network_not_in_use(self, resource, event, trigger,"},{"line_number":426,"context_line":"                                   context, network_id, **kwargs):"},{"line_number":427,"context_line":"        non_auto_ports \u003d context.session.query("}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_a6ca5917","line":424,"in_reply_to":"df87a7cf_939519e7","updated":"2017-12-05 20:22:05.000000000","message":"I\u0027ll leave this alone.","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d993cb2228e3d20fbd5fdd4d55574d2679218ea6","unresolved":false,"context_lines":[{"line_number":458,"context_line":"                registry.notify(resources.NETWORK, events.PRECOMMIT_DELETE,"},{"line_number":459,"context_line":"                                self, context\u003dcontext, network_id\u003did)"},{"line_number":460,"context_line":"                # We expire network_db here because precommit deletion might"},{"line_number":461,"context_line":"                # have left the relationship stale"},{"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)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_b3985d1b","line":461,"updated":"2017-12-05 19:38:27.000000000","message":", \u0027...for example ...\u0027","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b73d1b2498e22b9431febdab52585fca1364a5bf","unresolved":false,"context_lines":[{"line_number":458,"context_line":"                registry.notify(resources.NETWORK, events.PRECOMMIT_DELETE,"},{"line_number":459,"context_line":"                                self, context\u003dcontext, network_id\u003did)"},{"line_number":460,"context_line":"                # We expire network_db here because precommit deletion might"},{"line_number":461,"context_line":"                # have left the relationship stale"},{"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)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_e6df01d4","line":461,"in_reply_to":"df87a7cf_b3985d1b","updated":"2017-12-05 20:22:05.000000000","message":"I\u0027ll add \"for example, if we deleted a segment.\"","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"027f8c3454f5fdaf01acb6fe3007ed88cf9b0a3d","unresolved":false,"context_lines":[{"line_number":458,"context_line":"                registry.notify(resources.NETWORK, events.PRECOMMIT_DELETE,"},{"line_number":459,"context_line":"                                self, context\u003dcontext, network_id\u003did)"},{"line_number":460,"context_line":"                # We expire network_db here because precommit deletion might"},{"line_number":461,"context_line":"                # have left the relationship stale"},{"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)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_49227ea6","line":461,"in_reply_to":"df87a7cf_e6df01d4","updated":"2017-12-05 20:50:15.000000000","message":"+","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"}],"neutron/db/external_net_db.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d993cb2228e3d20fbd5fdd4d55574d2679218ea6","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                context.session.delete(rbdb)"},{"line_number":140,"context_line":"            net_data[external_net.EXTERNAL] \u003d False"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _check_l3_delete(self, context, network_id):"},{"line_number":143,"context_line":"        l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":144,"context_line":"        if l3plugin:"},{"line_number":145,"context_line":"            l3plugin.check_associated_floatingips(context, network_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_33844db1","line":142,"updated":"2017-12-05 19:38:27.000000000","message":"please don\u0027t include this change in this patch (rationale in the commit message comments).","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"}],"neutron/db/l3_db.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d993cb2228e3d20fbd5fdd4d55574d2679218ea6","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"                                                filters\u003dfilters)"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1428,"context_line":"    def check_associated_floatingips_count(self, context, network_id):"},{"line_number":1429,"context_line":"        fip_model \u003d l3_models.FloatingIP"},{"line_number":1430,"context_line":"        query \u003d model_query.query_with_hooks(context, fip_model)"},{"line_number":1431,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_1377c9d6","line":1428,"updated":"2017-12-05 19:38:27.000000000","message":"where is it called exactly? I can\u0027t find a trace of it in other files.","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"027f8c3454f5fdaf01acb6fe3007ed88cf9b0a3d","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"                                                filters\u003dfilters)"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1428,"context_line":"    def check_associated_floatingips_count(self, context, network_id):"},{"line_number":1429,"context_line":"        fip_model \u003d l3_models.FloatingIP"},{"line_number":1430,"context_line":"        query \u003d model_query.query_with_hooks(context, fip_model)"},{"line_number":1431,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_09af96e3","line":1428,"range":{"start_line":1428,"start_character":36,"end_line":1428,"end_character":42},"updated":"2017-12-05 20:50:15.000000000","message":"why count exactly? semantically the goal of the method is to check that no associated floatingips *exist*, not *count* them. so maybe -\u003e check_no_associated_floatingips. Count functions usually return a number (see in line 1424).","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b73d1b2498e22b9431febdab52585fca1364a5bf","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"                                                filters\u003dfilters)"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1428,"context_line":"    def check_associated_floatingips_count(self, context, network_id):"},{"line_number":1429,"context_line":"        fip_model \u003d l3_models.FloatingIP"},{"line_number":1430,"context_line":"        query \u003d model_query.query_with_hooks(context, fip_model)"},{"line_number":1431,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_c6f3dd9d","line":1428,"in_reply_to":"df87a7cf_1377c9d6","updated":"2017-12-05 20:22:05.000000000","message":"I\u0027m calling it as check_associated_floatingips() from external_net_db.py, just forgot to change the name.","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"027f8c3454f5fdaf01acb6fe3007ed88cf9b0a3d","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"                                                filters\u003dfilters)"},{"line_number":1426,"context_line":""},{"line_number":1427,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1428,"context_line":"    def check_associated_floatingips_count(self, context, network_id):"},{"line_number":1429,"context_line":"        fip_model \u003d l3_models.FloatingIP"},{"line_number":1430,"context_line":"        query \u003d model_query.query_with_hooks(context, fip_model)"},{"line_number":1431,"context_line":"        query \u003d query.filter_by(floating_network_id\u003dnetwork_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_093c76c6","line":1428,"in_reply_to":"df87a7cf_c6f3dd9d","updated":"2017-12-05 20:50:15.000000000","message":"Right. Do we have tests that will blow up because of that?","commit_id":"74152c5fa75ba66d7d5915292e60c35f8cb5f4a7"}]}
