)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"226007973221cafb4be3c88e749916d6906cf6b0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"the corresponding router interfaces."},{"line_number":12,"context_line":"We have seen recently after the csnat port is created if the"},{"line_number":13,"context_line":"RouterPort table update fails, there is a DB retry that is happening"},{"line_number":14,"context_line":"and  that retry operation is creating an additional csnat port."},{"line_number":15,"context_line":"This additional port is not getting removed automatically when the"},{"line_number":16,"context_line":"router interfaces are deleted."},{"line_number":17,"context_line":"This issue is seen when testing with a simple heat template as"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7f287b81_7eff0f34","line":14,"range":{"start_line":14,"start_character":4,"end_line":14,"end_character":5},"updated":"2017-08-25 14:53:25.000000000","message":"Nitiest of nits.","commit_id":"a5c44d3ca8426526369a298e5af08de2b5d048aa"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bf262de92a8e3052f8c3632b2d3388d90c9201b4","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            return snat_port"},{"line_number":209,"context_line":"        except Exception:"},{"line_number":210,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":211,"context_line":"                LOG.debug(\"RouterPort table update failure for csnat port: \""},{"line_number":212,"context_line":"                          \"%s\", snat_port)"},{"line_number":213,"context_line":"                # Since an exception occured this DB operation will"},{"line_number":214,"context_line":"                # retry. So it is better to clean up the port here."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_a8b586cf","line":211,"range":{"start_line":211,"start_character":63,"end_line":211,"end_character":68},"updated":"2017-08-18 16:11:09.000000000","message":"nit: s/CSNAT to match other messages in this file","commit_id":"e4f3b6e1d4a79715360742e0474154830131255c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bf262de92a8e3052f8c3632b2d3388d90c9201b4","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            return snat_port"},{"line_number":209,"context_line":"        except Exception:"},{"line_number":210,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":211,"context_line":"                LOG.debug(\"RouterPort table update failure for csnat port: \""},{"line_number":212,"context_line":"                          \"%s\", snat_port)"},{"line_number":213,"context_line":"                # Since an exception occured this DB operation will"},{"line_number":214,"context_line":"                # retry. So it is better to clean up the port here."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_c8820a01","line":211,"range":{"start_line":211,"start_character":44,"end_line":211,"end_character":50},"updated":"2017-08-18 16:11:09.000000000","message":"s/create","commit_id":"e4f3b6e1d4a79715360742e0474154830131255c"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"e101ebc941993a949f63cb1c4f169edb216cf219","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            return snat_port"},{"line_number":209,"context_line":"        except Exception:"},{"line_number":210,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":211,"context_line":"                LOG.debug(\"RouterPort table update failure for csnat port: \""},{"line_number":212,"context_line":"                          \"%s\", snat_port)"},{"line_number":213,"context_line":"                # Since an exception occured this DB operation will"},{"line_number":214,"context_line":"                # retry. So it is better to clean up the port here."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_9938d23d","line":211,"range":{"start_line":211,"start_character":63,"end_line":211,"end_character":68},"in_reply_to":"9f436f4f_a8b586cf","updated":"2017-08-18 17:51:39.000000000","message":"will fix it.","commit_id":"e4f3b6e1d4a79715360742e0474154830131255c"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"e101ebc941993a949f63cb1c4f169edb216cf219","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            return snat_port"},{"line_number":209,"context_line":"        except Exception:"},{"line_number":210,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":211,"context_line":"                LOG.debug(\"RouterPort table update failure for csnat port: \""},{"line_number":212,"context_line":"                          \"%s\", snat_port)"},{"line_number":213,"context_line":"                # Since an exception occured this DB operation will"},{"line_number":214,"context_line":"                # retry. So it is better to clean up the port here."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_796bee1e","line":211,"range":{"start_line":211,"start_character":44,"end_line":211,"end_character":50},"in_reply_to":"9f436f4f_c8820a01","updated":"2017-08-18 17:51:39.000000000","message":"will fix it.","commit_id":"e4f3b6e1d4a79715360742e0474154830131255c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"63ccdd23ceab629c8be9086268f1f3503fe66392","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":196,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        try:"},{"line_number":199,"context_line":"            l3_obj.RouterPort("},{"line_number":200,"context_line":"                context,"},{"line_number":201,"context_line":"                port_id\u003dsnat_port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_b1d60ac3","line":198,"updated":"2017-08-18 22:30:46.000000000","message":"Why not use the delete_port_on_error context manager that we have here: https://github.com/openstack/neutron/blob/master/neutron/plugins/common/utils.py#L193?\n\nWe use it for almost the same purpose here: https://github.com/openstack/neutron/blob/master/neutron/db/l3_db.py#L855","commit_id":"bb652c6798f2c0788726693f3ff2784c2e5a9805"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"1d055a7a2369c8df99b3a15a27ca896dca5ae380","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":196,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        try:"},{"line_number":199,"context_line":"            l3_obj.RouterPort("},{"line_number":200,"context_line":"                context,"},{"line_number":201,"context_line":"                port_id\u003dsnat_port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_ecd4b9bf","line":198,"in_reply_to":"9f436f4f_b1d60ac3","updated":"2017-08-18 23:20:28.000000000","message":"Good suggestion.\nLet me try check this out.","commit_id":"bb652c6798f2c0788726693f3ff2784c2e5a9805"}],"neutron/tests/functional/services/l3_router/test_l3_dvr_router_plugin.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bf262de92a8e3052f8c3632b2d3388d90c9201b4","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            self.fmt, ext_net, \u002720.0.0.1\u0027, \u002720.0.0.0/24\u0027, enable_dhcp\u003dTrue)"},{"line_number":99,"context_line":"        # Create first router and add an interface"},{"line_number":100,"context_line":"        router1 \u003d self._create_router()"},{"line_number":101,"context_line":"        ext_net_id \u003d ext_net[\u0027network\u0027][\u0027id\u0027]"},{"line_number":102,"context_line":"        # Set gateway to router"},{"line_number":103,"context_line":"        self.l3_plugin._update_router_gw_info("},{"line_number":104,"context_line":"            self.context, router1[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_e1a62854","line":101,"updated":"2017-08-18 16:11:09.000000000","message":"super nit: could set net1_id here too, then use on L122, L140","commit_id":"e4f3b6e1d4a79715360742e0474154830131255c"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"e101ebc941993a949f63cb1c4f169edb216cf219","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            self.fmt, ext_net, \u002720.0.0.1\u0027, \u002720.0.0.0/24\u0027, enable_dhcp\u003dTrue)"},{"line_number":99,"context_line":"        # Create first router and add an interface"},{"line_number":100,"context_line":"        router1 \u003d self._create_router()"},{"line_number":101,"context_line":"        ext_net_id \u003d ext_net[\u0027network\u0027][\u0027id\u0027]"},{"line_number":102,"context_line":"        # Set gateway to router"},{"line_number":103,"context_line":"        self.l3_plugin._update_router_gw_info("},{"line_number":104,"context_line":"            self.context, router1[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_39e326a7","line":101,"in_reply_to":"9f436f4f_e1a62854","updated":"2017-08-18 17:51:39.000000000","message":"will fix it.","commit_id":"e4f3b6e1d4a79715360742e0474154830131255c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"63ccdd23ceab629c8be9086268f1f3503fe66392","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            self.l3_plugin._get_agent_gw_ports_exist_for_network("},{"line_number":86,"context_line":"                self.context, \u0027network_id\u0027, \u0027host\u0027, \u0027agent_id\u0027))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_csnat_ports_are_created_and_deleted_based_on_router_subnet(self):"},{"line_number":89,"context_line":"        kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"},{"line_number":90,"context_line":"                  external_net.EXTERNAL: True}"},{"line_number":91,"context_line":"        net1 \u003d self._make_network(self.fmt, \u0027net1\u0027, True)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_116cb606","line":88,"updated":"2017-08-18 22:30:46.000000000","message":"If we really want to test this fix, shouldn\u0027t we test when an exception occurs while adding the RouterPort object to the DB?","commit_id":"bb652c6798f2c0788726693f3ff2784c2e5a9805"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"1d055a7a2369c8df99b3a15a27ca896dca5ae380","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            self.l3_plugin._get_agent_gw_ports_exist_for_network("},{"line_number":86,"context_line":"                self.context, \u0027network_id\u0027, \u0027host\u0027, \u0027agent_id\u0027))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_csnat_ports_are_created_and_deleted_based_on_router_subnet(self):"},{"line_number":89,"context_line":"        kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"},{"line_number":90,"context_line":"                  external_net.EXTERNAL: True}"},{"line_number":91,"context_line":"        net1 \u003d self._make_network(self.fmt, \u0027net1\u0027, True)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_ecedd98b","line":88,"in_reply_to":"9f436f4f_116cb606","updated":"2017-08-18 23:20:28.000000000","message":"Yes I agree. But there was no existing test for testing the csnat port count that\u0027s the reason I added one.\n\nBut I need to figure out how I can raise an exception on the RouterPort.create() function.\nLet me add a test case for it.","commit_id":"bb652c6798f2c0788726693f3ff2784c2e5a9805"}]}
