)]}'
{"neutron/agent/l3/dvr_fip_ns.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e938bd03daad739dc5250614c9e47dd87d70e252","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            except Exception:"},{"line_number":113,"context_line":"                msg \u003d _(\u0027DVR: Gateway config in FIP namespace failed\u0027)"},{"line_number":114,"context_line":"                LOG.exception(msg)"},{"line_number":115,"context_line":"                raise n_exc.FloatingIpSetupException(msg)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _create_gateway_port(self, ex_gw_port, interface_name):"},{"line_number":118,"context_line":"        \"\"\"Add Floating IP gateway port.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_9e3cf6e3","line":115,"updated":"2016-10-12 21:07:15.000000000","message":"Should maybe just re-raise here","commit_id":"957ee4cf34152046c6cb8b5fb4c64f6fe87df084"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e938bd03daad739dc5250614c9e47dd87d70e252","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":259,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":260,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":261,"context_line":"        if ipd.exists():"},{"line_number":262,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"},{"line_number":263,"context_line":"                ip_lib.send_ip_addr_adv_notif(ns_name,"},{"line_number":264,"context_line":"                                              interface_name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_1e838699","line":261,"updated":"2016-10-12 21:07:15.000000000","message":"I wonder if this can still happen with the lock?","commit_id":"957ee4cf34152046c6cb8b5fb4c64f6fe87df084"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"234252e5ed137411e2f6c8459988df734aefda67","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":259,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":260,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":261,"context_line":"        if ipd.exists():"},{"line_number":262,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"},{"line_number":263,"context_line":"                ip_lib.send_ip_addr_adv_notif(ns_name,"},{"line_number":264,"context_line":"                                              interface_name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_bf242a60","line":261,"in_reply_to":"fa6399be_1e838699","updated":"2016-10-13 16:17:02.000000000","message":"Is this lock specific for the \u0027fg-\u0027 port here?","commit_id":"957ee4cf34152046c6cb8b5fb4c64f6fe87df084"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"613b20b29aaaa899de59bca9284189460518e565","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":259,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":260,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":261,"context_line":"        if ipd.exists():"},{"line_number":262,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"},{"line_number":263,"context_line":"                ip_lib.send_ip_addr_adv_notif(ns_name,"},{"line_number":264,"context_line":"                                              interface_name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_e27fe563","line":261,"in_reply_to":"fa6399be_bf242a60","updated":"2016-10-13 16:31:48.000000000","message":"No, the lock is per-namespace, but it could be changed to be per-fg by just changing the lock name to include it.","commit_id":"957ee4cf34152046c6cb8b5fb4c64f6fe87df084"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"71fac309cd7ce386f21cf9e4b12711e7711abf0f","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":261,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":262,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":263,"context_line":"        if ipd.exists():"},{"line_number":264,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"},{"line_number":265,"context_line":"                ip_lib.send_ip_addr_adv_notif(ns_name,"},{"line_number":266,"context_line":"                                              interface_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa6399be_53ba250b","line":263,"updated":"2016-10-13 17:41:54.000000000","message":"If the device does not have an IP address, this conditional check does not validate it and will not raise the Exception. \nSo probably we need to addin the checkin for the ip address similar to the one shown in the my patch.\n\nis_device_with_ip \u003d self._check_if_device_has_a_valid_ip(\n            agent_gateway_port, interface_name, ipd)\n        # Configure the default route only when the \u0027fg-\u0027 device exists\n        # and if the device has already associated IP address in the namespace.\n        # ipd.exists will check for the link.address, and the rest will\n        # check to see if it has IP address assigned.\n        if ipd.exists() and is_device_with_ip:","commit_id":"d25dd18faa3e1404ca63f1d6f8a629dd7f0b843a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b92f76cc7c3d03aa5f355c512802af1e81312ac4","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":261,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":262,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":263,"context_line":"        if ipd.exists():"},{"line_number":264,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"},{"line_number":265,"context_line":"                ip_lib.send_ip_addr_adv_notif(ns_name,"},{"line_number":266,"context_line":"                                              interface_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa6399be_daa721bb","line":263,"in_reply_to":"fa6399be_4cda7fe9","updated":"2016-10-13 21:25:02.000000000","message":"Yes, I have an update that broadens what exceptions it catches so anything will trigger a cleanup.  In that case we might not need this exists check at all.  Let me send that update out.","commit_id":"d25dd18faa3e1404ca63f1d6f8a629dd7f0b843a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7db08df758e97966d11b97f38cab9d38ebda9542","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":261,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":262,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":263,"context_line":"        if ipd.exists():"},{"line_number":264,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"},{"line_number":265,"context_line":"                ip_lib.send_ip_addr_adv_notif(ns_name,"},{"line_number":266,"context_line":"                                              interface_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa6399be_8cbf37a9","line":263,"in_reply_to":"fa6399be_53ba250b","updated":"2016-10-13 20:23:50.000000000","message":"I\u0027m not sure we need the check at all.  If create_gateway_port it will have either created the device w/IP or deleted everything, right?","commit_id":"d25dd18faa3e1404ca63f1d6f8a629dd7f0b843a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"60bc99efbdef18edce7039199163d2ce174679b9","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":261,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":262,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":263,"context_line":"        if ipd.exists():"},{"line_number":264,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"},{"line_number":265,"context_line":"                ip_lib.send_ip_addr_adv_notif(ns_name,"},{"line_number":266,"context_line":"                                              interface_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa6399be_4cda7fe9","line":263,"in_reply_to":"fa6399be_8cbf37a9","updated":"2016-10-13 20:32:09.000000000","message":"create_gateway_port will only delete everything if the \u0027update_gateway_port\u0027 raises an exception.\nIn this case it only checks for the device link address but not the ip address. So it might not raise an exception if the port does not have an IP.","commit_id":"d25dd18faa3e1404ca63f1d6f8a629dd7f0b843a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"85f41ba70bdc2b5f1764020b086be89facd45aed","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":258,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":259,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":260,"context_line":"        if not ipd.exists():"},{"line_number":261,"context_line":"            LOG.warning(_LW(\u0027FIP gateway port with interface name: %(device)s \u0027"},{"line_number":262,"context_line":"                            \u0027does not exist in the given \u0027"},{"line_number":263,"context_line":"                            \u0027namespace: %(ns)s\u0027), {\u0027device\u0027: interface_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_55ae82e6","line":260,"range":{"start_line":260,"start_character":25,"end_line":260,"end_character":28},"updated":"2016-10-13 21:41:08.000000000","message":"Is it ok, just to check for the device link address. Do you think we don\u0027t need to check for the IP Address at this point for the ipd?\n\nI understand your codepath that handles broader exception will capture any errors either the \u0027Cannot find device\u0027 or the \u0027RTNETLINK error\u0027.\n\nIf the lock that you have added completely blocks the calls to the update_gateway_port while the first update is handling then it should work.","commit_id":"5cdfd43e211fec77226734542d556e2af04aca86"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"55bbfdaefa2d54e259c861eba0f421b46b7e176f","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":258,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":259,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":260,"context_line":"        if not ipd.exists():"},{"line_number":261,"context_line":"            LOG.warning(_LW(\u0027FIP gateway port with interface name: %(device)s \u0027"},{"line_number":262,"context_line":"                            \u0027does not exist in the given \u0027"},{"line_number":263,"context_line":"                            \u0027namespace: %(ns)s\u0027), {\u0027device\u0027: interface_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_e30b5922","line":260,"range":{"start_line":260,"start_character":25,"end_line":260,"end_character":28},"in_reply_to":"fa6399be_55ae82e6","updated":"2016-10-14 00:38:08.000000000","message":"I almost think we don\u0027t need to even check this, since a failure would just throw an exception which on create we\u0027d cleanup, and on update we\u0027d reschedule.  Right?\n\nMoving the assignment of self.agent_gateway_port is helpful in making sure any future update will do something instead of returning early.\n\nI\u0027ll push another version that fixes the test issues.","commit_id":"5cdfd43e211fec77226734542d556e2af04aca86"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4ecee5eae24fa8972d23e378e382b9ec2d00a578","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            if is_first:"},{"line_number":126,"context_line":"                self.create_gateway_port(agent_gateway_port, iface_name)"},{"line_number":127,"context_line":"            else:"},{"line_number":128,"context_line":"                self.update_gateway_port(agent_gateway_port, iface_name)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def create_gateway_port(self, agent_gateway_port, iface_name):"},{"line_number":131,"context_line":"        \"\"\"Create Floating IP gateway port.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5da102_cab6053d","line":128,"updated":"2016-10-26 15:34:14.000000000","message":"So we are seeing cases while testing internally where the first time through here we\u0027re calling the update method instead of create, and we\u0027re failing miserably :(\n\nI don\u0027t know if it\u0027s just a back backport, but I\u0027m going to add an unsubscribe down on L264 to make sure that if we tried to update and the device didn\u0027t exist, that we\u0027d clear the external network from the set to the next try we do the right thing.","commit_id":"0ecd3dbe793b91ffc590d9249357cbdaee730c5f"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1baf2f417a7dbc846bf206451172c8349d53548e","unresolved":false,"context_lines":[{"line_number":254,"context_line":"            not self._check_for_gateway_ip_change(agent_gateway_port))"},{"line_number":255,"context_line":"        if gateway_ip_not_changed:"},{"line_number":256,"context_line":"            # Before we return let us cache the agent_gateway_port"},{"line_number":257,"context_line":"            self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":258,"context_line":"            return"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        ns_name \u003d self.get_name()"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba5da102_bb3bbdea","line":257,"range":{"start_line":257,"start_character":0,"end_line":257,"end_character":56},"updated":"2016-10-28 08:21:01.000000000","message":"Why is this here? The last the agent_gateway_port was changed, the cached value should have been changed. Therefor, if this code runs then obviously the gateway ip wasn\u0027t changed (and this code will re-cache the exact same value, therefor it\u0027s not really doing anything.","commit_id":"7070eea3d2bb2c33b4490196b5847d1fa109f388"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"62c7c92b263cfdb419376bbf06f2988496dc913e","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":263,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":264,"context_line":"        if not ipd.exists():"},{"line_number":265,"context_line":"            self.unsubscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":266,"context_line":"            LOG.warning(_LW(\u0027FIP gateway port with interface name: %(device)s \u0027"},{"line_number":267,"context_line":"                            \u0027does not exist in the given \u0027"},{"line_number":268,"context_line":"                            \u0027namespace: %(ns)s\u0027), {\u0027device\u0027: interface_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba5da102_4fa66ac2","line":265,"range":{"start_line":265,"start_character":59,"end_line":265,"end_character":62},"updated":"2016-10-27 16:04:05.000000000","message":"Brian may be we might not need this anymore.","commit_id":"7070eea3d2bb2c33b4490196b5847d1fa109f388"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9e51d518a05677962cfc4adc59c77279c0741bab","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":263,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":264,"context_line":"        if not ipd.exists():"},{"line_number":265,"context_line":"            self.unsubscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":266,"context_line":"            LOG.warning(_LW(\u0027FIP gateway port with interface name: %(device)s \u0027"},{"line_number":267,"context_line":"                            \u0027does not exist in the given \u0027"},{"line_number":268,"context_line":"                            \u0027namespace: %(ns)s\u0027), {\u0027device\u0027: interface_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba5da102_a9653f46","line":265,"range":{"start_line":265,"start_character":59,"end_line":265,"end_character":62},"in_reply_to":"ba5da102_0aef00e9","updated":"2016-10-27 21:27:23.000000000","message":"So there is one failure case this line does help.\n\n1) Associate a floating IP\n2) Delete the fg- port (using ovs-vsctl if OVS)\n3) Change the gateway IP\n\nWithout this line here, the l3-agent will just continue to spin until restarted, with it the fg- device will get re-created.\n\nThat\u0027s maybe different from the testing you did.","commit_id":"7070eea3d2bb2c33b4490196b5847d1fa109f388"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"43371a3ef375503335f8cf1a4317d9f959a6ae2e","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":263,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":264,"context_line":"        if not ipd.exists():"},{"line_number":265,"context_line":"            self.unsubscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":266,"context_line":"            LOG.warning(_LW(\u0027FIP gateway port with interface name: %(device)s \u0027"},{"line_number":267,"context_line":"                            \u0027does not exist in the given \u0027"},{"line_number":268,"context_line":"                            \u0027namespace: %(ns)s\u0027), {\u0027device\u0027: interface_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba5da102_0aef00e9","line":265,"range":{"start_line":265,"start_character":59,"end_line":265,"end_character":62},"in_reply_to":"ba5da102_0f4712bc","updated":"2016-10-27 16:26:56.000000000","message":"I am wondering this would create a loop. Say for example if creating a \u0027fg-\u0027 port takes longer than expected and we get back to back floatingips association on the same node, everytime we come here, we kind of unsubscibe and then go back again creating the \u0027fg-\u0027 port that get delayed.\nBut based on my testing with the delay the lock kind of prevents it and we recover from the failure without the unsubscibe here.","commit_id":"7070eea3d2bb2c33b4490196b5847d1fa109f388"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"0cd73c8e4d1b8a83d57ed0c5a3a0a505cf80bf57","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":263,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":264,"context_line":"        if not ipd.exists():"},{"line_number":265,"context_line":"            self.unsubscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":266,"context_line":"            LOG.warning(_LW(\u0027FIP gateway port with interface name: %(device)s \u0027"},{"line_number":267,"context_line":"                            \u0027does not exist in the given \u0027"},{"line_number":268,"context_line":"                            \u0027namespace: %(ns)s\u0027), {\u0027device\u0027: interface_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba5da102_0f4712bc","line":265,"range":{"start_line":265,"start_character":59,"end_line":265,"end_character":62},"in_reply_to":"ba5da102_4fa66ac2","updated":"2016-10-27 16:10:21.000000000","message":"I\u0027m a little on the fence, since if we get here and do nothing, the next update will get here too.  Doing the unsub will trigger a creation on the next call.\n\nThoughts?","commit_id":"7070eea3d2bb2c33b4490196b5847d1fa109f388"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5a14a844af796bc3e5ce416300b1e888c4205c90","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # Send advertisements and configure the default route only"},{"line_number":263,"context_line":"        # when the \u0027fg-\u0027 device exists in the namespace."},{"line_number":264,"context_line":"        if not ipd.exists():"},{"line_number":265,"context_line":"            self.unsubscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":266,"context_line":"            LOG.warning(_LW(\u0027FIP gateway port with interface name: %(device)s \u0027"},{"line_number":267,"context_line":"                            \u0027does not exist in the given \u0027"},{"line_number":268,"context_line":"                            \u0027namespace: %(ns)s\u0027), {\u0027device\u0027: interface_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba5da102_8cb6c9da","line":265,"range":{"start_line":265,"start_character":59,"end_line":265,"end_character":62},"in_reply_to":"ba5da102_a9653f46","updated":"2016-10-27 22:52:43.000000000","message":"True.","commit_id":"7070eea3d2bb2c33b4490196b5847d1fa109f388"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1baf2f417a7dbc846bf206451172c8349d53548e","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                            \u0027does not exist in the given \u0027"},{"line_number":268,"context_line":"                            \u0027namespace: %(ns)s\u0027), {\u0027device\u0027: interface_name,"},{"line_number":269,"context_line":"                                                   \u0027ns\u0027: ns_name})"},{"line_number":270,"context_line":"            msg \u003d _(\u0027L3 agent failed to setup fip gateway in the namespace\u0027)"},{"line_number":271,"context_line":"            raise n_exc.FloatingIpSetupException(msg)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba5da102_4d1bc872","line":270,"range":{"start_line":270,"start_character":12,"end_line":270,"end_character":15},"updated":"2016-10-28 08:21:01.000000000","message":"It\u0027s worth mentioning in the exception message that the entire logic might be retriggered (by a future loop iteration) and thus isn\u0027t necessarily an error.","commit_id":"7070eea3d2bb2c33b4490196b5847d1fa109f388"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a50caf8c6ffa38ea6f33a7975f534d74d70a9fc6","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":115,"context_line":"                    LOG.error(_LE(\u0027DVR: FIP namespace config failure \u0027"},{"line_number":116,"context_line":"                                  \u0027for interface %s\u0027), interface_name)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def create_or_update_gateway_port(self, agent_gateway_port):"},{"line_number":119,"context_line":"        interface_name \u003d self.get_ext_device_name(agent_gateway_port[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # The lock is used to make sure another thread doesn\u0027t call to"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_7958f88a","line":118,"range":{"start_line":117,"start_character":0,"end_line":118,"end_character":64},"updated":"2016-11-01 17:08:48.000000000","message":"Let us remove this function then.","commit_id":"11cd99216af3a8f9f9c166b83748b55a3166ec65"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f184b4ff49813f3794e846197d0aa2342e89e468","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":115,"context_line":"                    LOG.error(_LE(\u0027DVR: FIP namespace config failure \u0027"},{"line_number":116,"context_line":"                                  \u0027for interface %s\u0027), interface_name)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def create_or_update_gateway_port(self, agent_gateway_port):"},{"line_number":119,"context_line":"        interface_name \u003d self.get_ext_device_name(agent_gateway_port[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # The lock is used to make sure another thread doesn\u0027t call to"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_9401116d","line":118,"range":{"start_line":117,"start_character":0,"end_line":118,"end_character":64},"in_reply_to":"ba5da102_7958f88a","updated":"2016-11-01 17:28:10.000000000","message":"Ignore my comment above.\nI just thought that since you have moved the locks to the respective functions like _create_gateway_port_exc and _update_gateway_port you don\u0027t need the lock here anymore.\n\nDo you think we still need the lock here?\n\nIf not we can remove this function and revert back to the original check in the dvr_local_router for the subscription and call the respective create and update functions.\n\nLet me know your thoughts.","commit_id":"11cd99216af3a8f9f9c166b83748b55a3166ec65"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"da630315f0f4a918a586d5e7b655d82bbe90c150","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":115,"context_line":"                    LOG.error(_LE(\u0027DVR: FIP namespace config failure \u0027"},{"line_number":116,"context_line":"                                  \u0027for interface %s\u0027), interface_name)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def create_or_update_gateway_port(self, agent_gateway_port):"},{"line_number":119,"context_line":"        interface_name \u003d self.get_ext_device_name(agent_gateway_port[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # The lock is used to make sure another thread doesn\u0027t call to"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_ef67d3e6","line":118,"range":{"start_line":117,"start_character":0,"end_line":118,"end_character":64},"in_reply_to":"ba5da102_9401116d","updated":"2016-11-01 21:38:39.000000000","message":"I\u0027ll send out an update shortly, having just a single \"api\" here - create_or_update_gateway_port.  It will take the lock and call the correct code.  create_ and update_ will go away as they aren\u0027t called directly anyways.","commit_id":"11cd99216af3a8f9f9c166b83748b55a3166ec65"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fcee2c29e022634d961bfce5af832d04ea3e0cf0","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            else:"},{"line_number":128,"context_line":"                self._update_gateway_port(agent_gateway_port, interface_name)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def create_gateway_port(self, agent_gateway_port, interface_name):"},{"line_number":131,"context_line":"        with self._fip_port_lock(interface_name):"},{"line_number":132,"context_line":"            self._create_gateway_port(agent_gateway_port, interface_name)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_a2f7d4f3","line":130,"updated":"2016-11-01 01:18:26.000000000","message":"So I just tweaked this to make sure we took the lock if this was called, even though no in-tree callers use it.  So perhaps it\u0027s safe to just remove it and update_gateway_port ?\n\nMy other thought is to make create_or_update_gateway_port just update_gateway_port, and have it fork to the correct method based on subscribe, removing the create method completely.  I can\u0027t imagine anyone calling into this code besides the other DVR modules anyways.","commit_id":"11cd99216af3a8f9f9c166b83748b55a3166ec65"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a50caf8c6ffa38ea6f33a7975f534d74d70a9fc6","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            else:"},{"line_number":128,"context_line":"                self._update_gateway_port(agent_gateway_port, interface_name)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def create_gateway_port(self, agent_gateway_port, interface_name):"},{"line_number":131,"context_line":"        with self._fip_port_lock(interface_name):"},{"line_number":132,"context_line":"            self._create_gateway_port(agent_gateway_port, interface_name)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_b9d37003","line":130,"in_reply_to":"ba5da102_a2f7d4f3","updated":"2016-11-01 17:08:48.000000000","message":"Let us retain the two methods as create_gateway_port and update_gateway_port. Since they both have different functionalities.\nI am ok with the lock being moved to the individual functions here.","commit_id":"11cd99216af3a8f9f9c166b83748b55a3166ec65"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a50caf8c6ffa38ea6f33a7975f534d74d70a9fc6","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        with self._fip_port_lock(interface_name):"},{"line_number":132,"context_line":"            self._create_gateway_port(agent_gateway_port, interface_name)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _create_gateway_port(self, agent_gateway_port, interface_name):"},{"line_number":135,"context_line":"        \"\"\"Create Floating IP gateway port.\"\"\""},{"line_number":136,"context_line":"        self.create()"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_f9f08893","line":134,"range":{"start_line":134,"start_character":9,"end_line":134,"end_character":28},"updated":"2016-11-01 17:08:48.000000000","message":"May be change this to _create_gateway_port_and_namespace if it makes sense","commit_id":"11cd99216af3a8f9f9c166b83748b55a3166ec65"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a50caf8c6ffa38ea6f33a7975f534d74d70a9fc6","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        self.create()"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        try:"},{"line_number":139,"context_line":"            self._create_gateway_port_exc(agent_gateway_port, interface_name)"},{"line_number":140,"context_line":"        except Exception:"},{"line_number":141,"context_line":"            # If an exception occurs at this point, then it is"},{"line_number":142,"context_line":"            # good to clean up the namespace that has been created"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_392da0fe","line":139,"range":{"start_line":139,"start_character":17,"end_line":139,"end_character":41},"updated":"2016-11-01 17:08:48.000000000","message":"Change this function name to _create_gateway_port_and_initialize if it makes sense. \nLet us make sure that all our changes are backportable.","commit_id":"11cd99216af3a8f9f9c166b83748b55a3166ec65"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ac5bcefe5aa4da122646e030b2b1a8e433cfe9f9","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # The lock is used to make sure another thread doesn\u0027t call to"},{"line_number":122,"context_line":"        # update the gateway port before we are done initializing things."},{"line_number":123,"context_line":"        with self._fip_port_lock(interface_name):"},{"line_number":124,"context_line":"            is_first \u003d self.subscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":125,"context_line":"            if is_first:"},{"line_number":126,"context_line":"                self._create_gateway_port_and_ns(agent_gateway_port,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_cbdaf24a","line":123,"range":{"start_line":123,"start_character":18,"end_line":123,"end_character":32},"updated":"2016-11-02 11:22:58.000000000","message":"I\u0027m not sure I like this one, as it allows someone to directly call one of the create/update functions without getting the lock in the first place. This will introduce some hidden race somewhere down the line.\n\nHow about we use a decorator to automatically lock the interface_name resource before entry? Such a decorator can be aware of the parameters (accept interface_name as the first argument - requires a switch between the existing state of the code) and lock on it.","commit_id":"56217c0074586d75e02fd42f42c5887710556120"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"59dada4c77cd4cc127fc3cec0b50d2f540ad7ac4","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # The lock is used to make sure another thread doesn\u0027t call to"},{"line_number":122,"context_line":"        # update the gateway port before we are done initializing things."},{"line_number":123,"context_line":"        with self._fip_port_lock(interface_name):"},{"line_number":124,"context_line":"            is_first \u003d self.subscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":125,"context_line":"            if is_first:"},{"line_number":126,"context_line":"                self._create_gateway_port_and_ns(agent_gateway_port,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_40294d36","line":123,"range":{"start_line":123,"start_character":18,"end_line":123,"end_character":32},"in_reply_to":"ba5da102_cbdaf24a","updated":"2016-11-02 16:35:40.000000000","message":"Well, if someone calls _create_gateway_port() they do so at their own peril - having the underscore means private, right?\n\nThe reason I did it like this is until we know if we\u0027re the first, we don\u0027t know whether we need to create or update, and if we\u0027re not holding the lock when we check we can race.","commit_id":"56217c0074586d75e02fd42f42c5887710556120"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ac5bcefe5aa4da122646e030b2b1a8e433cfe9f9","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _create_gateway_port(self, ex_gw_port, interface_name):"},{"line_number":148,"context_line":"        \"\"\"Request port creation from Plugin then configure gateway port.\"\"\""},{"line_number":149,"context_line":"        LOG.debug(\"add gateway interface: %s\", interface_name)"},{"line_number":150,"context_line":"        ns_name \u003d self.get_name()"},{"line_number":151,"context_line":"        self.driver.plug(ex_gw_port[\u0027network_id\u0027],"},{"line_number":152,"context_line":"                         ex_gw_port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_2b536e6c","line":149,"range":{"start_line":149,"start_character":19,"end_line":149,"end_character":22},"updated":"2016-11-02 11:22:58.000000000","message":"super-nit: s/add/Adding/","commit_id":"56217c0074586d75e02fd42f42c5887710556120"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"59dada4c77cd4cc127fc3cec0b50d2f540ad7ac4","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _create_gateway_port(self, ex_gw_port, interface_name):"},{"line_number":148,"context_line":"        \"\"\"Request port creation from Plugin then configure gateway port.\"\"\""},{"line_number":149,"context_line":"        LOG.debug(\"add gateway interface: %s\", interface_name)"},{"line_number":150,"context_line":"        ns_name \u003d self.get_name()"},{"line_number":151,"context_line":"        self.driver.plug(ex_gw_port[\u0027network_id\u0027],"},{"line_number":152,"context_line":"                         ex_gw_port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_008f552a","line":149,"range":{"start_line":149,"start_character":19,"end_line":149,"end_character":22},"in_reply_to":"ba5da102_2b536e6c","updated":"2016-11-02 16:35:40.000000000","message":"Done","commit_id":"56217c0074586d75e02fd42f42c5887710556120"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ac5bcefe5aa4da122646e030b2b1a8e433cfe9f9","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def _update_gateway_port(self, agent_gateway_port, interface_name):"},{"line_number":254,"context_line":"        if self.agent_gateway_port:"},{"line_number":255,"context_line":"            gateway_ip_changed \u003d self._check_for_gateway_ip_change("},{"line_number":256,"context_line":"                agent_gateway_port)"},{"line_number":257,"context_line":"            if not gateway_ip_changed:"},{"line_number":258,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_abf4de5a","line":255,"range":{"start_line":255,"start_character":12,"end_line":255,"end_character":32},"updated":"2016-11-02 11:22:58.000000000","message":"No longer needed - can directly run \"if not self._check_for_gateway_ip_change(): return\".","commit_id":"56217c0074586d75e02fd42f42c5887710556120"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"59dada4c77cd4cc127fc3cec0b50d2f540ad7ac4","unresolved":false,"context_lines":[{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def _update_gateway_port(self, agent_gateway_port, interface_name):"},{"line_number":254,"context_line":"        if self.agent_gateway_port:"},{"line_number":255,"context_line":"            gateway_ip_changed \u003d self._check_for_gateway_ip_change("},{"line_number":256,"context_line":"                agent_gateway_port)"},{"line_number":257,"context_line":"            if not gateway_ip_changed:"},{"line_number":258,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_a0d94924","line":255,"range":{"start_line":255,"start_character":12,"end_line":255,"end_character":32},"in_reply_to":"ba5da102_abf4de5a","updated":"2016-11-02 16:35:40.000000000","message":"Done","commit_id":"56217c0074586d75e02fd42f42c5887710556120"}],"neutron/tests/functional/agent/l3/test_dvr_router.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"eb0f0f122c012ebb8e0e879df22229bb3dc68019","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.assertEqual(2, interface_rules_list_count)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_dvr_router_fips_no_gw_port(self):"},{"line_number":115,"context_line":"        self.agent.conf.agent_mode \u003d \u0027dvr\u0027"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # Create the router with external net"},{"line_number":118,"context_line":"        dvr_router_kwargs \u003d {\u0027ip_address\u0027: \u002719.4.4.3\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_4de3c8a3","line":115,"updated":"2016-10-28 08:33:09.000000000","message":"Lines 115-125 are a code duplication with lines 158-168 :\u003c","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"4163cf89899a94d7362c8f4727e417667654446c","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.assertEqual(2, interface_rules_list_count)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_dvr_router_fips_no_gw_port(self):"},{"line_number":115,"context_line":"        self.agent.conf.agent_mode \u003d \u0027dvr\u0027"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # Create the router with external net"},{"line_number":118,"context_line":"        dvr_router_kwargs \u003d {\u0027ip_address\u0027: \u002719.4.4.3\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_1d780c8f","line":115,"in_reply_to":"ba5da102_4de3c8a3","updated":"2016-10-28 18:07:57.000000000","message":"I will try to see how to reduce the duplicate code here.","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"eb0f0f122c012ebb8e0e879df22229bb3dc68019","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        router_info \u003d self.generate_dvr_router_info(**dvr_router_kwargs)"},{"line_number":123,"context_line":"        external_gw_port \u003d router_info[\u0027gw_port\u0027]"},{"line_number":124,"context_line":"        ext_net_id \u003d router_info[\u0027_floatingips\u0027][0][\u0027floating_network_id\u0027]"},{"line_number":125,"context_line":"        self.mock_plugin_api.get_external_network_id.return_value(ext_net_id)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        # Create the fip namespace up front"},{"line_number":128,"context_line":"        stale_fip_ns \u003d dvr_fip_ns.FipNamespace(ext_net_id,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_6d124cb6","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":65},"updated":"2016-10-28 08:33:09.000000000","message":"Is this the same as \"self.mock_...return_value \u003d ext_net_id\"? If so, please use this syntax instead as I don\u0027t think return_value() is used very much in the code (and is a bit weird tbh)","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"4163cf89899a94d7362c8f4727e417667654446c","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        router_info \u003d self.generate_dvr_router_info(**dvr_router_kwargs)"},{"line_number":123,"context_line":"        external_gw_port \u003d router_info[\u0027gw_port\u0027]"},{"line_number":124,"context_line":"        ext_net_id \u003d router_info[\u0027_floatingips\u0027][0][\u0027floating_network_id\u0027]"},{"line_number":125,"context_line":"        self.mock_plugin_api.get_external_network_id.return_value(ext_net_id)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        # Create the fip namespace up front"},{"line_number":128,"context_line":"        stale_fip_ns \u003d dvr_fip_ns.FipNamespace(ext_net_id,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_3d6f90c6","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":65},"in_reply_to":"ba5da102_6d124cb6","updated":"2016-10-28 18:07:57.000000000","message":"will fix it.","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"eb0f0f122c012ebb8e0e879df22229bb3dc68019","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                                               self.agent.conf,"},{"line_number":130,"context_line":"                                               self.agent.driver,"},{"line_number":131,"context_line":"                                               self.agent.use_ipv6)"},{"line_number":132,"context_line":"        stale_fip_ns.create()"},{"line_number":133,"context_line":"        # Create the router with the fip, this shouldn\u0027t allow the"},{"line_number":134,"context_line":"        # update_gateway_port to be called without the fg- port"},{"line_number":135,"context_line":"        fip_ns \u003d self.agent.get_fip_ns(ext_net_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_0da1d094","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":20},"updated":"2016-10-28 08:33:09.000000000","message":"nit: \u0027stale_fip_ns\u0027 isn\u0027t used, can do \"FipNamespace(...).create() instead.","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"4163cf89899a94d7362c8f4727e417667654446c","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                                               self.agent.conf,"},{"line_number":130,"context_line":"                                               self.agent.driver,"},{"line_number":131,"context_line":"                                               self.agent.use_ipv6)"},{"line_number":132,"context_line":"        stale_fip_ns.create()"},{"line_number":133,"context_line":"        # Create the router with the fip, this shouldn\u0027t allow the"},{"line_number":134,"context_line":"        # update_gateway_port to be called without the fg- port"},{"line_number":135,"context_line":"        fip_ns \u003d self.agent.get_fip_ns(ext_net_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_5d7284ae","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":20},"in_reply_to":"ba5da102_0da1d094","updated":"2016-10-28 18:07:57.000000000","message":"Yes good suggestion.","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"eb0f0f122c012ebb8e0e879df22229bb3dc68019","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        # Create the router with the fip, this shouldn\u0027t allow the"},{"line_number":134,"context_line":"        # update_gateway_port to be called without the fg- port"},{"line_number":135,"context_line":"        fip_ns \u003d self.agent.get_fip_ns(ext_net_id)"},{"line_number":136,"context_line":"        fip_ns.subscribe \u003d mock.Mock(return_value\u003dFalse)"},{"line_number":137,"context_line":"        # This will raise the exception and will also clear"},{"line_number":138,"context_line":"        # subscription for the ext_net_id"},{"line_number":139,"context_line":"        self.assertRaises(n_exc.FloatingIpSetupException,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_0d7550ca","line":136,"range":{"start_line":136,"start_character":8,"end_line":136,"end_character":24},"updated":"2016-10-28 08:33:09.000000000","message":"Please use some kind of a \u0027with\u0027 (or decorator) to make sure that this is cleaned up after this function is done. Same for line 143.","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"4163cf89899a94d7362c8f4727e417667654446c","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        # Create the router with the fip, this shouldn\u0027t allow the"},{"line_number":134,"context_line":"        # update_gateway_port to be called without the fg- port"},{"line_number":135,"context_line":"        fip_ns \u003d self.agent.get_fip_ns(ext_net_id)"},{"line_number":136,"context_line":"        fip_ns.subscribe \u003d mock.Mock(return_value\u003dFalse)"},{"line_number":137,"context_line":"        # This will raise the exception and will also clear"},{"line_number":138,"context_line":"        # subscription for the ext_net_id"},{"line_number":139,"context_line":"        self.assertRaises(n_exc.FloatingIpSetupException,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_9d641ce6","line":136,"range":{"start_line":136,"start_character":8,"end_line":136,"end_character":24},"in_reply_to":"ba5da102_0d7550ca","updated":"2016-10-28 18:07:57.000000000","message":"Will use the decorator.","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"}],"neutron/tests/unit/agent/l3/test_dvr_fip_ns.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"aae6c633fda4f99dc7838e927fead2e0037ad28f","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.fip_ns._check_for_gateway_ip_change \u003d mock.Mock(return_value\u003dTrue)"},{"line_number":161,"context_line":"        self.fip_ns.agent_gateway_port \u003d None"},{"line_number":162,"context_line":"        agent_gw_port \u003d self._get_agent_gw_port()"},{"line_number":163,"context_line":"        ip_lib.IPDevice.exists \u003d mock.Mock(return_value\u003dFalse)"},{"line_number":164,"context_line":"        self.assertRaises(n_exc.FloatingIpSetupException,"},{"line_number":165,"context_line":"                          self.fip_ns.update_gateway_port,"},{"line_number":166,"context_line":"                          agent_gw_port)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_c5cdbdb8","line":163,"updated":"2016-10-19 14:44:15.000000000","message":"This is the cause of the device_exists() failures, needs to be mocked properly","commit_id":"f0f5dfe0316d15f46abeff358b8c984e15ae470a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"de8d61183fe2c129ed0746912887dce583448a5d","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.fip_ns._check_for_gateway_ip_change \u003d mock.Mock(return_value\u003dTrue)"},{"line_number":161,"context_line":"        self.fip_ns.agent_gateway_port \u003d None"},{"line_number":162,"context_line":"        agent_gw_port \u003d self._get_agent_gw_port()"},{"line_number":163,"context_line":"        ip_lib.IPDevice.exists \u003d mock.Mock(return_value\u003dFalse)"},{"line_number":164,"context_line":"        self.assertRaises(n_exc.FloatingIpSetupException,"},{"line_number":165,"context_line":"                          self.fip_ns.update_gateway_port,"},{"line_number":166,"context_line":"                          agent_gw_port)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_54eebdb4","line":163,"in_reply_to":"fa6399be_c5cdbdb8","updated":"2016-10-19 16:24:31.000000000","message":"Yes I suspected it.","commit_id":"f0f5dfe0316d15f46abeff358b8c984e15ae470a"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"eb0f0f122c012ebb8e0e879df22229bb3dc68019","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        interface_name \u003d self.fip_ns.get_ext_device_name(agent_gw_port[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        device_exists.return_value \u003d False"},{"line_number":122,"context_line":"        msg \u003d \u0027L3 agent failed to setup fip gateway in the namespace\u0027"},{"line_number":123,"context_line":"        self.fip_ns.update_gateway_port \u003d mock.Mock("},{"line_number":124,"context_line":"            side_effect\u003dn_exc.FloatingIpSetupException(msg))"},{"line_number":125,"context_line":"        self.assertRaises(n_exc.FloatingIpSetupException,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_0d93905c","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":69},"updated":"2016-10-28 08:33:09.000000000","message":"This isn\u0027t needed - the string isn\u0027t used anywhere but when creating the error and checking for the msg is irrelevant anyway (it\u0027s the exception that counts)","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"4163cf89899a94d7362c8f4727e417667654446c","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        interface_name \u003d self.fip_ns.get_ext_device_name(agent_gw_port[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        device_exists.return_value \u003d False"},{"line_number":122,"context_line":"        msg \u003d \u0027L3 agent failed to setup fip gateway in the namespace\u0027"},{"line_number":123,"context_line":"        self.fip_ns.update_gateway_port \u003d mock.Mock("},{"line_number":124,"context_line":"            side_effect\u003dn_exc.FloatingIpSetupException(msg))"},{"line_number":125,"context_line":"        self.assertRaises(n_exc.FloatingIpSetupException,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_6fdeb56e","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":69},"in_reply_to":"ba5da102_0d93905c","updated":"2016-10-28 18:07:57.000000000","message":"It errors out without the msg. So for now I will live it as such since it does not harm the functionality.","commit_id":"1368c29ff38170aed4b174d9bbde0a02939a1105"}]}
