)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"f425c448922ec49a771a7b4412b592567a8f895c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"(WIP)DVR: Fix race condition in default route update for fip gateway"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Under large scale environment we have seen, when"},{"line_number":10,"context_line":"a router update is happening to create the fip namespace"},{"line_number":11,"context_line":"and if there is another router update for the same router"},{"line_number":12,"context_line":"that is coming before the first router update completes,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a95cdbc_8a0b8029","line":9,"updated":"2016-10-07 21:35:13.000000000","message":"Keep in mind that the L3 agent is designed so that updates for the same router is serialized. Is this not happening? Do you see operations on the same router interleaved in log files? We\u0027re not supposed to see races between two router updates for the same router, which makes me think we might not want to approach the bug like you did in this patch.","commit_id":"a51bb8bec72186ce697505227df96a9a9c467c2a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fe7da93a6960b8b6e24e72cabba65dc773bf57dc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"(WIP)DVR: Fix race condition in default route update for fip gateway"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Under large scale environment we have seen, when"},{"line_number":10,"context_line":"a router update is happening to create the fip namespace"},{"line_number":11,"context_line":"and if there is another router update for the same router"},{"line_number":12,"context_line":"that is coming before the first router update completes,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a95cdbc_6d972e48","line":9,"in_reply_to":"1a95cdbc_8a0b8029","updated":"2016-10-07 21:52:40.000000000","message":"We have not found out the root cause yet on why we are seeing non serialized updates for the same router.","commit_id":"a51bb8bec72186ce697505227df96a9a9c467c2a"}],"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":"3473edc8f28d9093dcc47cd55da0206683804afc","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            ip_cidrs \u003d common_utils.fixed_ip_cidrs(ex_gw_port[\u0027fixed_ips\u0027])"},{"line_number":129,"context_line":"            self.driver.init_l3(interface_name, ip_cidrs, namespace\u003dns_name,"},{"line_number":130,"context_line":"                                clean_connections\u003dTrue)"},{"line_number":131,"context_line":"            self.update_gateway_port(ex_gw_port)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":134,"context_line":"                   \u0027net.ipv4.conf.%s.proxy_arp\u003d1\u0027 % interface_name]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_ba177443","line":131,"updated":"2016-10-10 14:55:02.000000000","message":"I don\u0027t think this call will throw an exception any more, see comment below.","commit_id":"b224c6aedb6dee252e02b71c9571e83dfa27254f"},{"author":{"_account_id":10652,"name":"Erik Colnick","email":"erikcolnick@gmail.com","username":"ecolnick"},"change_message_id":"42c617473f264ab68eca1b424364d51530498420","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            ip_cidrs \u003d common_utils.fixed_ip_cidrs(ex_gw_port[\u0027fixed_ips\u0027])"},{"line_number":129,"context_line":"            self.driver.init_l3(interface_name, ip_cidrs, namespace\u003dns_name,"},{"line_number":130,"context_line":"                                clean_connections\u003dTrue)"},{"line_number":131,"context_line":"            self.update_gateway_port(ex_gw_port)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":134,"context_line":"                   \u0027net.ipv4.conf.%s.proxy_arp\u003d1\u0027 % interface_name]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_5a16704c","line":131,"updated":"2016-10-10 14:52:44.000000000","message":"The \u0027update_gateway_port\u0027 method won\u0027t throw an exception now if the fg- device isn\u0027t ready, so it is still the case that default route won\u0027t be set inside the namespace.  What is the mechanism by which you are insuring that the router will be processed again so that the update_gateway_port will be processed and the default route added to the namespace?","commit_id":"b224c6aedb6dee252e02b71c9571e83dfa27254f"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6c5756ef5b049dee56ac084cbd82c28a5ad2a174","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            ip_cidrs \u003d common_utils.fixed_ip_cidrs(ex_gw_port[\u0027fixed_ips\u0027])"},{"line_number":129,"context_line":"            self.driver.init_l3(interface_name, ip_cidrs, namespace\u003dns_name,"},{"line_number":130,"context_line":"                                clean_connections\u003dTrue)"},{"line_number":131,"context_line":"            self.update_gateway_port(ex_gw_port)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":134,"context_line":"                   \u0027net.ipv4.conf.%s.proxy_arp\u003d1\u0027 % interface_name]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_cd300759","line":131,"in_reply_to":"1a95cdbc_5a16704c","updated":"2016-10-10 17:18:19.000000000","message":"So let me go back and raise the exception in the update_gateway_port and that would handle this case then.","commit_id":"b224c6aedb6dee252e02b71c9571e83dfa27254f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3473edc8f28d9093dcc47cd55da0206683804afc","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":134,"context_line":"                   \u0027net.ipv4.conf.%s.proxy_arp\u003d1\u0027 % interface_name]"},{"line_number":135,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":136,"context_line":"        except Exception:"},{"line_number":137,"context_line":"            # If any failure occurs in gateway port plug or assigning"},{"line_number":138,"context_line":"            # IP address to the fg port, cleanup the namespace, delete"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_da4fe068","line":135,"updated":"2016-10-10 14:55:02.000000000","message":"I\u0027m also pretty sure this won\u0027t throw an exception either, since none of the above calls would have succeeded.  I\u0027m just trying to make sure we don\u0027t put too much under the try/except that doesn\u0027t need to be here.","commit_id":"b224c6aedb6dee252e02b71c9571e83dfa27254f"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6c5756ef5b049dee56ac084cbd82c28a5ad2a174","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":134,"context_line":"                   \u0027net.ipv4.conf.%s.proxy_arp\u003d1\u0027 % interface_name]"},{"line_number":135,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":136,"context_line":"        except Exception:"},{"line_number":137,"context_line":"            # If any failure occurs in gateway port plug or assigning"},{"line_number":138,"context_line":"            # IP address to the fg port, cleanup the namespace, delete"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_6d48d3cc","line":135,"in_reply_to":"1a95cdbc_da4fe068","updated":"2016-10-10 17:18:19.000000000","message":"Ok, as I mentioned above I will raise the exception in the update_gateway_port and that should handle the case here.","commit_id":"b224c6aedb6dee252e02b71c9571e83dfa27254f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3473edc8f28d9093dcc47cd55da0206683804afc","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":232,"context_line":"        # Configure the default route only when the \u0027fg-\u0027 device exists"},{"line_number":233,"context_line":"        # in the namespace."},{"line_number":234,"context_line":"        if ipd.exists():"},{"line_number":235,"context_line":"            gateway_ip_not_changed \u003d self.agent_gateway_port and ("},{"line_number":236,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port))"},{"line_number":237,"context_line":"            # Cache the agent gateway port"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_5f7ae2bd","line":234,"updated":"2016-10-10 14:55:02.000000000","message":"So if called from above this can\u0027t happen, since plug() is done right before.  Is is the call from create_dvr_fip_interfaces() that might not have an interface?\n\nAlso, this is essentially fixing this code so it doesn\u0027t throw an exception adding the route","commit_id":"b224c6aedb6dee252e02b71c9571e83dfa27254f"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6c5756ef5b049dee56ac084cbd82c28a5ad2a174","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        ipd \u003d ip_lib.IPDevice(interface_name, namespace\u003dns_name)"},{"line_number":232,"context_line":"        # Configure the default route only when the \u0027fg-\u0027 device exists"},{"line_number":233,"context_line":"        # in the namespace."},{"line_number":234,"context_line":"        if ipd.exists():"},{"line_number":235,"context_line":"            gateway_ip_not_changed \u003d self.agent_gateway_port and ("},{"line_number":236,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port))"},{"line_number":237,"context_line":"            # Cache the agent gateway port"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a95cdbc_ed0a2378","line":234,"in_reply_to":"1a95cdbc_5f7ae2bd","updated":"2016-10-10 17:18:19.000000000","message":"Will add the raise exception here.","commit_id":"b224c6aedb6dee252e02b71c9571e83dfa27254f"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"806491c3749e08431564a36d71bf87921f5823ce","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            # If an exception occurs at this point, then it is"},{"line_number":138,"context_line":"            # good to clean up the namespace that has been created"},{"line_number":139,"context_line":"            self.unsubscribe(ex_gw_port[\u0027network_id\u0027])"},{"line_number":140,"context_line":"            self.delete()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def create(self):"},{"line_number":143,"context_line":"        LOG.debug(\"DVR: add fip namespace: %s\", self.name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_6880c18b","line":140,"updated":"2016-10-10 17:57:27.000000000","message":"I don\u0027t think we need to reraise it here, since, the next router sync or update should handle it.","commit_id":"39e75c88d8b8d97b2fb4a27014cdc280d5b66cd3"},{"author":{"_account_id":10652,"name":"Erik Colnick","email":"erikcolnick@gmail.com","username":"ecolnick"},"change_message_id":"4b646b18e0e412d6164524c5809592e54b7877a0","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            # If an exception occurs at this point, then it is"},{"line_number":138,"context_line":"            # good to clean up the namespace that has been created"},{"line_number":139,"context_line":"            self.unsubscribe(ex_gw_port[\u0027network_id\u0027])"},{"line_number":140,"context_line":"            self.delete()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def create(self):"},{"line_number":143,"context_line":"        LOG.debug(\"DVR: add fip namespace: %s\", self.name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_738fd274","line":140,"in_reply_to":"1a95cdbc_6880c18b","updated":"2016-10-10 18:08:19.000000000","message":"So long as we are sure that the next router sync or update will happen in a relatively small period of time, since if it doesn\u0027t, guest vms won\u0027t be able to be contacted over their associated floating ips until the next sync or update of the router.","commit_id":"39e75c88d8b8d97b2fb4a27014cdc280d5b66cd3"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"26ee4d35d3a5fe3721a3c43863b992b69bf647f7","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                             bridge\u003dself.agent_conf.external_network_bridge,"},{"line_number":125,"context_line":"                             namespace\u003dns_name,"},{"line_number":126,"context_line":"                             prefix\u003dFIP_EXT_DEV_PREFIX,"},{"line_number":127,"context_line":"                             mtu\u003dex_gw_port.get(\u0027mtu\u0027))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            ip_cidrs \u003d common_utils.fixed_ip_cidrs(ex_gw_port[\u0027fixed_ips\u0027])"},{"line_number":130,"context_line":"            self.driver.init_l3(interface_name, ip_cidrs, namespace\u003dns_name,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_6cd178cd","line":127,"updated":"2016-10-11 16:42:46.000000000","message":"The first thing plug() does is:\n\n    if not ip_lib.device_exists(device_name,\n                                namespace\u003dnamespace):\n        self.plug_new(...)\n\nSo coming through this code path, the device should have existed before L132 below.  How can it throw an exception on the device not existing then?\n\nIs it the update_gateway_port() call in create_dvr_fip_interfaces() triggering it?","commit_id":"8bcacbfe2dd1dd1d0e6a3aed5374496221fa8e34"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"26ee4d35d3a5fe3721a3c43863b992b69bf647f7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            ip_cidrs \u003d common_utils.fixed_ip_cidrs(ex_gw_port[\u0027fixed_ips\u0027])"},{"line_number":130,"context_line":"            self.driver.init_l3(interface_name, ip_cidrs, namespace\u003dns_name,"},{"line_number":131,"context_line":"                                clean_connections\u003dTrue)"},{"line_number":132,"context_line":"            self.update_gateway_port(ex_gw_port)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":135,"context_line":"                   \u0027net.ipv4.conf.%s.proxy_arp\u003d1\u0027 % interface_name]"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_0cc63c67","line":132,"updated":"2016-10-11 16:42:46.000000000","message":"Is this the only call that can generate a FloatingIpSetupException?  If so then the rest doesn\u0027t need to be under the try/except because any exception they throw won\u0027t get caught here.","commit_id":"8bcacbfe2dd1dd1d0e6a3aed5374496221fa8e34"},{"author":{"_account_id":10652,"name":"Erik Colnick","email":"erikcolnick@gmail.com","username":"ecolnick"},"change_message_id":"247554a0fc948eaa850872381b15df0efb2a315f","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            gateway_ip_not_changed \u003d self.agent_gateway_port and ("},{"line_number":235,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port))"},{"line_number":236,"context_line":"            # Cache the agent gateway port"},{"line_number":237,"context_line":"            self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":238,"context_line":"            if gateway_ip_not_changed:"},{"line_number":239,"context_line":"                return"},{"line_number":240,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa6399be_c7e89a7f","line":237,"updated":"2016-10-11 18:08:51.000000000","message":"It occurs to me that if the gateway port gets cached here and an exception is thrown from L253 as we have seen, then if the update_gateway_port method is called again on the same agent_gateway_port, the code will think it has nothing to do.  Perhaps it is a better idea to cache the agent gateway port as the last thing in this method after all calls which could throw an exception have been made.","commit_id":"2563a2d6345f76bb805a29ae9dfd5570af7505bd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"16b629e63cec95fb469fc02dd4b496a77a872d98","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            gateway_ip_not_changed \u003d self.agent_gateway_port and ("},{"line_number":235,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port))"},{"line_number":236,"context_line":"            # Cache the agent gateway port"},{"line_number":237,"context_line":"            self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":238,"context_line":"            if gateway_ip_not_changed:"},{"line_number":239,"context_line":"                return"},{"line_number":240,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa6399be_0acff97f","line":237,"in_reply_to":"fa6399be_47300a02","updated":"2016-10-11 18:24:09.000000000","message":"But I will move it to #L260 as per your suggestion.","commit_id":"2563a2d6345f76bb805a29ae9dfd5570af7505bd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5bf5ca88d2332277f0a67ded3cce0128171c5053","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            gateway_ip_not_changed \u003d self.agent_gateway_port and ("},{"line_number":235,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port))"},{"line_number":236,"context_line":"            # Cache the agent gateway port"},{"line_number":237,"context_line":"            self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":238,"context_line":"            if gateway_ip_not_changed:"},{"line_number":239,"context_line":"                return"},{"line_number":240,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa6399be_47300a02","line":237,"in_reply_to":"fa6399be_c7e89a7f","updated":"2016-10-11 18:12:13.000000000","message":"That\u0027s the reason that we are checking for the \u0027fg\u0027 device before we proceed, so if the fg device exists and also if it has IP address, we should not fail at #L253.\n\nThe ipd.exists checks to see if it has IP address as well.\n\nLet me know your thoughts here.","commit_id":"2563a2d6345f76bb805a29ae9dfd5570af7505bd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5b2f5d46848a93bbde22401162ef578becb1cd06","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            gateway_ip_not_changed \u003d self.agent_gateway_port and ("},{"line_number":235,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port))"},{"line_number":236,"context_line":"            # Cache the agent gateway port"},{"line_number":237,"context_line":"            self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":238,"context_line":"            if gateway_ip_not_changed:"},{"line_number":239,"context_line":"                return"},{"line_number":240,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa6399be_5eab7374","line":237,"updated":"2016-10-11 20:07:41.000000000","message":"Since we would be exiting at #L239, it would not be a good idea to move #L237 to #L260.\n\nSince we are handling it after the device check, it should not be a problem in configuring the routes, to your concern.","commit_id":"6e74239395035a17186e71ebe4be4113ed0bfae7"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0162a9b6d3a9fcbd4eca3fec6ed232a5811b580f","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            gateway_ip_not_changed \u003d self.agent_gateway_port and ("},{"line_number":235,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port))"},{"line_number":236,"context_line":"            # Cache the agent gateway port"},{"line_number":237,"context_line":"            self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":238,"context_line":"            if gateway_ip_not_changed:"},{"line_number":239,"context_line":"                return"},{"line_number":240,"context_line":"            for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa6399be_debb0371","line":237,"in_reply_to":"fa6399be_5eab7374","updated":"2016-10-11 20:17:17.000000000","message":"May be I can cache before the return for gateway change case and cache it later for all other regular gateway configuration.","commit_id":"6e74239395035a17186e71ebe4be4113ed0bfae7"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"954e7d5c55ccb353728e90e7ba07f1e580174031","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self.driver.init_l3(interface_name, ip_cidrs, namespace\u003dns_name,"},{"line_number":130,"context_line":"                            clean_connections\u003dTrue)"},{"line_number":131,"context_line":"        try:"},{"line_number":132,"context_line":"            self.update_gateway_port(ex_gw_port)"},{"line_number":133,"context_line":"        except n_exc.FloatingIpSetupException:"},{"line_number":134,"context_line":"            # If an exception occurs at this point, then it is"},{"line_number":135,"context_line":"            # good to clean up the namespace that has been created"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa6399be_21077b1d","line":132,"updated":"2016-10-11 22:36:37.000000000","message":"I still don\u0027t see how this can throw an exception as the namespace and device will exist from the plug(), plus the bug actually shows the exception coming from create_dvr_fip_interfaces().\n\nThis code path is technically \"add_gateway_port\" since it\u0027s called from create_gateway_port(), so self.agent_gateway_port should be None.  I think we could just tweak a few things to detect that and initialize things correctly, but have the other callers of update_gateway_port() fail if self.agent_gateway_port\u003dNone.  I think throwing an exception in that case should get us back to _process_router_if_compatible(), and then we\u0027d reschedule the sync and it would work the second time.\n\nUnless I\u0027m completely missing something?\n\nI\u0027ll change the code based on that and see what happens locally.","commit_id":"9ce33266c26fb29b828654684feef161fe2a4a43"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"cc0fa351d1d55a5195117c9985d8f1ec2dc36987","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self.driver.init_l3(interface_name, ip_cidrs, namespace\u003dns_name,"},{"line_number":130,"context_line":"                            clean_connections\u003dTrue)"},{"line_number":131,"context_line":"        try:"},{"line_number":132,"context_line":"            self.update_gateway_port(ex_gw_port)"},{"line_number":133,"context_line":"        except n_exc.FloatingIpSetupException:"},{"line_number":134,"context_line":"            # If an exception occurs at this point, then it is"},{"line_number":135,"context_line":"            # good to clean up the namespace that has been created"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa6399be_e4a3d19c","line":132,"in_reply_to":"fa6399be_21077b1d","updated":"2016-10-11 22:59:34.000000000","message":"Let me see if I can explain here.\n\nYes you are right the bug that we are hitting is from \u0027create_dvr_fip_interfaces\u0027 calling \u0027update_gateway_port\u0027 assuming that everything went fine with create_gateway_port.\n\nOr pre-maturely a router-update is called twice not sequentually but parallely that we end up in this situation.\n\nI knew that when \u0027plug\u0027 is called it checks for the device and then plugs the port. But for any reason say if the port did not get an IP or gets an IP with a delay and meanwhile if the update_gateway_port is called from with in the \u0027_gateway_added\u0027 function then it would capture the exception.\n\nAlso when the simultaneous \u0027update_gateway_port\u0027 is called from the \u0027create_dvr_fip_interfaces\u0027 before the gateway port is plumbed is called, we would first check the device and then  if not found raise an exception, so the router_update will be re-synced. ( We hope by this time, even if there is any timing issue the fg port would have been successfully plugged in).","commit_id":"9ce33266c26fb29b828654684feef161fe2a4a43"}]}
