)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a01dd52763e25e49c4fdc3cf2747ce2d7b1455da","unresolved":false,"context_lines":[{"line_number":7,"context_line":"L3 Agent changes to support manual snat add/remove"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch contains the l3-agent changes required to"},{"line_number":10,"context_line":"support manual add/remove snat router for dvr_snat agent"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I1782d49b2bfe909654d5e6a1069f449524532479"},{"line_number":13,"context_line":"Closes-bug: #1369721"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da9df570_48f5cdc9","line":10,"updated":"2014-09-24 23:34:25.000000000","message":"It\u0027s clear where these changes are; it would be a lot clearer if the message said why they were required, as in what error the absence of this change would lead to, and hence what this fix is about.","commit_id":"3a327760655c75200089d85eb6fb84b81ed84d76"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"4fe8713122a92ce290418dcbe474e9ac85aa1f0e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"L3 Agent changes to support manual snat add/remove"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch contains the l3-agent changes required to"},{"line_number":10,"context_line":"support manual add/remove snat router for dvr_snat agent"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I1782d49b2bfe909654d5e6a1069f449524532479"},{"line_number":13,"context_line":"Closes-bug: #1369721"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da9df570_2855e94f","line":10,"in_reply_to":"da9df570_48f5cdc9","updated":"2014-09-25 20:03:13.000000000","message":"I\u0027ll add more detail","commit_id":"3a327760655c75200089d85eb6fb84b81ed84d76"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2eb580885e94b81d2ddad9386bf35ecb8358f6fa","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Michael Smith \u003cmichael.smith6@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-09-26 15:28:00 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"L3 Agent changes to support manual snat add/remove"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch handles a corner case when the snat"},{"line_number":10,"context_line":"agent is moved from one host to another. The issue"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_556533b3","line":7,"updated":"2014-09-26 15:44:45.000000000","message":"If this is a DVR only issue, this should be mentioned in the headline.","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c010729893b33b27e14796354e7632f315db503f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Michael Smith \u003cmichael.smith6@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-09-26 15:28:00 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"L3 Agent changes to support manual snat add/remove"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch handles a corner case when the snat"},{"line_number":10,"context_line":"agent is moved from one host to another. The issue"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_cbd980f4","line":7,"in_reply_to":"da9df570_556533b3","updated":"2014-09-26 22:15:22.000000000","message":"ok","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2eb580885e94b81d2ddad9386bf35ecb8358f6fa","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"L3 Agent changes to support manual snat add/remove"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch handles a corner case when the snat"},{"line_number":10,"context_line":"agent is moved from one host to another. The issue"},{"line_number":11,"context_line":"is the new agent will have the ex_gw_port info"},{"line_number":12,"context_line":"in its cache, but the interface is not plugged since"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_15672bb8","line":9,"updated":"2014-09-26 15:44:45.000000000","message":"We move routers rather than agents, no?","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c010729893b33b27e14796354e7632f315db503f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"L3 Agent changes to support manual snat add/remove"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch handles a corner case when the snat"},{"line_number":10,"context_line":"agent is moved from one host to another. The issue"},{"line_number":11,"context_line":"is the new agent will have the ex_gw_port info"},{"line_number":12,"context_line":"in its cache, but the interface is not plugged since"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_8bd4d8bd","line":9,"in_reply_to":"da9df570_15672bb8","updated":"2014-09-26 22:15:22.000000000","message":"I\u0027ll re-word","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2eb580885e94b81d2ddad9386bf35ecb8358f6fa","unresolved":false,"context_lines":[{"line_number":10,"context_line":"agent is moved from one host to another. The issue"},{"line_number":11,"context_line":"is the new agent will have the ex_gw_port info"},{"line_number":12,"context_line":"in its cache, but the interface is not plugged since"},{"line_number":13,"context_line":"it wasn\u0027t previously hosting the snat functionality."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"So when the snat is moved to this new agent, a check"},{"line_number":16,"context_line":"needs to be made to see if the interface exists already."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_95123b07","line":13,"updated":"2014-09-26 15:44:45.000000000","message":"wouldn\u0027t the same problem occur for centralized routers too?","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c010729893b33b27e14796354e7632f315db503f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"agent is moved from one host to another. The issue"},{"line_number":11,"context_line":"is the new agent will have the ex_gw_port info"},{"line_number":12,"context_line":"in its cache, but the interface is not plugged since"},{"line_number":13,"context_line":"it wasn\u0027t previously hosting the snat functionality."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"So when the snat is moved to this new agent, a check"},{"line_number":16,"context_line":"needs to be made to see if the interface exists already."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_8b5db87b","line":13,"in_reply_to":"da9df570_95123b07","updated":"2014-09-26 22:15:22.000000000","message":"In the centralized case the router is only ever hosted on one agent/host at any given time.  So in the process of a move, the router is first removed from the \u0027old\u0027 agent/host, then added to the \u0027new\u0027 agent/host.  The \u0027new\u0027 host will not have any remnant data of the router when the add happens.","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2eb580885e94b81d2ddad9386bf35ecb8358f6fa","unresolved":false,"context_lines":[{"line_number":13,"context_line":"it wasn\u0027t previously hosting the snat functionality."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"So when the snat is moved to this new agent, a check"},{"line_number":16,"context_line":"needs to be made to see if the interface exists already."},{"line_number":17,"context_line":"If not, the normal external_gateway_added path will be"},{"line_number":18,"context_line":"taken and the interface will be plugged."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_35bc2fdc","line":16,"updated":"2014-09-26 15:44:45.000000000","message":"Under which circumstances would the interface exist when the agent was not hosting the router?","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c010729893b33b27e14796354e7632f315db503f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"it wasn\u0027t previously hosting the snat functionality."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"So when the snat is moved to this new agent, a check"},{"line_number":16,"context_line":"needs to be made to see if the interface exists already."},{"line_number":17,"context_line":"If not, the normal external_gateway_added path will be"},{"line_number":18,"context_line":"taken and the interface will be plugged."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_cb526066","line":16,"in_reply_to":"da9df570_35bc2fdc","updated":"2014-09-26 22:15:22.000000000","message":"In the distributed case there is a corner case when the snat router is moved to a agent/host that already is hosting the router (just not for snat functionality).  Keep in mind, this move operation should only be done for snat - it doesn\u0027t make sense to move the basic router functionality around.  There is a separate patch that is supposed to limit what nodes the move can be done.","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2eb580885e94b81d2ddad9386bf35ecb8358f6fa","unresolved":false,"context_lines":[{"line_number":18,"context_line":"taken and the interface will be plugged."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I1782d49b2bfe909654d5e6a1069f449524532479"},{"line_number":21,"context_line":"Closes-bug: #1369721"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_55961340","line":21,"updated":"2014-09-26 15:44:45.000000000","message":"this should be a partial-bug.","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c010729893b33b27e14796354e7632f315db503f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"taken and the interface will be plugged."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I1782d49b2bfe909654d5e6a1069f449524532479"},{"line_number":21,"context_line":"Closes-bug: #1369721"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_2bc92c26","line":21,"in_reply_to":"da9df570_55961340","updated":"2014-09-26 22:15:22.000000000","message":"agreed","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"28eb33c944883c51eb0e7c5eaa2c11cfc04f10b9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"it wasn\u0027t previously hosting the snat functionality."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"So when the snat is moved to this new agent, a check"},{"line_number":16,"context_line":"needs to be made to see if the interface exists already."},{"line_number":17,"context_line":"If not, the normal external_gateway_added path will be"},{"line_number":18,"context_line":"taken and the interface will be plugged."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"baa201ad_de453fb4","line":16,"updated":"2014-10-10 21:11:52.000000000","message":"If it exists already, that indicates that it hasn\u0027t been moved, right?  I think I might suggest rewording this commit message even more.  Something along these lines:\n\n \"This patch handles a corner case when the snat router is moved from one host to another.  This issue is the new agent will have the ex_gw_port info already in its cache.  This will cause the agent to skip plugging it on the new host.\n\n \"In dvr routers, the check for ex_gw_port in the cache needs to be ignored.  We\u0027ll go straight to the system to see if the interface is actually there to determine if it needs to be plugged or not.\"","commit_id":"d3688e35bfd1dce9b71aa7d4c54f02b28515b94c"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1e7ef48db410d619c8fee199e92f86aac5859991","unresolved":false,"context_lines":[{"line_number":13,"context_line":"it wasn\u0027t previously hosting the snat functionality."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"So when the snat is moved to this new agent, a check"},{"line_number":16,"context_line":"needs to be made to see if the interface exists already."},{"line_number":17,"context_line":"If not, the normal external_gateway_added path will be"},{"line_number":18,"context_line":"taken and the interface will be plugged."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9aa7fdbe_3f5e5346","line":16,"in_reply_to":"baa201ad_de453fb4","updated":"2014-10-20 17:46:36.000000000","message":"Fair enough - I\u0027ll update the comment.","commit_id":"d3688e35bfd1dce9b71aa7d4c54f02b28515b94c"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"193afe208a7f64969387adc90060df2bfe145274","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"L3 Agent support of manual dvr snat add/remove"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch handles a corner case when the snat"},{"line_number":10,"context_line":"router is moved from one host to another. The issue"},{"line_number":11,"context_line":"is the new agent will have the ex_gw_port info"},{"line_number":12,"context_line":"in its cache.  This will cause the agent to skip"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"3acd31a7_2202200c","line":9,"updated":"2015-05-01 19:15:23.000000000","message":"I am not sure i understand how the patch fits into this description, from what i understood you deal with the case of the removal (you ensure the namespace is removed in the old agent)\n\nBut i don\u0027t see how you ignore the \"check for ex_gw_port in the cache\" can you please explain?\n\n(Just trying to learn something new here..)\n\nThanks!","commit_id":"8e9b520a618865082b43049e8e2ba47ff2b531c3"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f52721b1a3c25ade3aba9190f2ee324b82ecd87d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch handles a corner case when the snat"},{"line_number":10,"context_line":"router is moved from one host to another. The issue"},{"line_number":11,"context_line":"is the new agent will have the ex_gw_port info"},{"line_number":12,"context_line":"in its cache.  This will cause the agent to skip"},{"line_number":13,"context_line":"plugging it in on the new host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"In dvr routers, the check for ex_gw_port in the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":37,"id":"ba3cc151_e4893d70","line":12,"updated":"2015-07-09 12:32:14.000000000","message":"cached ex_gw_port will have different binding:host_id which should trigger snat creation/deletion by the agent depending on it\u0027s host","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f52721b1a3c25ade3aba9190f2ee324b82ecd87d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"plugging it in on the new host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"In dvr routers, the check for ex_gw_port in the"},{"line_number":16,"context_line":"cache needs to be ignored.  We\u0027ll go straight to"},{"line_number":17,"context_line":"the system to see if the interface is actually"},{"line_number":18,"context_line":"there to determine if it needs to be plugged or"},{"line_number":19,"context_line":"not."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":37,"id":"ba3cc151_e4b7fd1e","line":16,"updated":"2015-07-09 12:32:14.000000000","message":"it should not be ignored, see comment above","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9fa573b3fca91249df943b3c0333a4d284c1ae0f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"is the cached ex_gw_port will have a different"},{"line_number":12,"context_line":"binding:host_id which should trigger snat"},{"line_number":13,"context_line":"creation/deletion by the agent depending on its"},{"line_number":14,"context_line":"host. Make it so"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I1782d49b2bfe909654d5e6a1069f449524532479"},{"line_number":17,"context_line":"Partial-bug: #1369721"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":39,"id":"1a4dcd0f_23e9a0e6","line":14,"updated":"2015-08-11 18:22:51.000000000","message":"Sentence fragment. Did you mean to include more here?","commit_id":"cd2696262668c60849ee7e177ec1d6dce4d1ac79"}],"neutron/agent/l3/agent.py":[{"author":{"_account_id":14440,"name":"weibo","email":"weibohome@163.com","username":"weibo"},"change_message_id":"908abe0bad44e2594b881589564cd67335180ff4","unresolved":false,"context_lines":[{"line_number":638,"context_line":"        if ex_gw_port_id:"},{"line_number":639,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":640,"context_line":"        ext_port_exists \u003d self._check_external_port_exists("},{"line_number":641,"context_line":"            ri.router_id, ex_gw_port_id)"},{"line_number":642,"context_line":"        if ex_gw_port:"},{"line_number":643,"context_line":"            def _gateway_ports_equal(port1, port2):"},{"line_number":644,"context_line":"                def _get_filtered_dict(d, ignore):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_e4929057","line":641,"updated":"2014-12-26 09:39:08.000000000","message":"if ex_gw_port_id is None, _check_external_port_exists will throw error,i suggest this code relocate in if .","commit_id":"2f79bb9d316017276b5f67665890d772be675b9e"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"924c845abc32f37dd09691ad080dfb5793e509be","unresolved":false,"context_lines":[{"line_number":638,"context_line":"        if ex_gw_port_id:"},{"line_number":639,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":640,"context_line":"        ext_port_exists \u003d self._check_external_port_exists("},{"line_number":641,"context_line":"            ri.router_id, ex_gw_port_id)"},{"line_number":642,"context_line":"        if ex_gw_port:"},{"line_number":643,"context_line":"            def _gateway_ports_equal(port1, port2):"},{"line_number":644,"context_line":"                def _get_filtered_dict(d, ignore):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_18a138a9","line":641,"in_reply_to":"3a961159_e4929057","updated":"2015-01-15 01:48:55.000000000","message":"would it return error or just false?  if ex_gw_port_id is None or 0, port_id in _check_external_port_exists() will get a bogus interface name which should just result in ip_lib.device_exists returning False I believe.","commit_id":"2f79bb9d316017276b5f67665890d772be675b9e"},{"author":{"_account_id":14440,"name":"weibo","email":"weibohome@163.com","username":"weibo"},"change_message_id":"ef5d4d7c61b2df4ff085837b1b0d91ea6452223b","unresolved":false,"context_lines":[{"line_number":457,"context_line":"        interface_name \u003d None"},{"line_number":458,"context_line":"        if ex_gw_port_id:"},{"line_number":459,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":460,"context_line":"        ext_port_exists \u003d self._check_external_port_exists("},{"line_number":461,"context_line":"            ri.router_id, ex_gw_port_id)"},{"line_number":462,"context_line":"        if ex_gw_port:"},{"line_number":463,"context_line":"            def _gateway_ports_equal(port1, port2):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_a090b74e","line":460,"updated":"2015-01-16 09:03:19.000000000","message":"in my environment,i run next cli:\n\nneutron router-interface-delete dvr vxlan-subnet1\nneutron router-gateway-clear dvr net-ex-01\nneutron router-delete dvr\n\ni find next error,so i suggest this code relocate in (if ex_gw_port_id:):\n\n2015-01-16T09:04:18+00:00 localhost neutron-l3-agent ERROR [pid:2228] [MainThread] [utils.py:344 call] cannot concatenate \u0027str\u0027 and \u0027NoneType\u0027 objects Traceback (most recent call last):   File \"/usr/lib64/python2.6/site-packages/neutron/common/utils.py\", line 341, in call     return func(*args, **kwargs)   File \"/usr/lib64/python2.6/site-packages/neutron/agent/l3_agent.py\", line 936, in process_router     ri.router_id, ex_gw_port_id)   File \"/usr/lib64/python2.6/site-packages/neutron/agent/l3_agent.py\", line 1265, in _check_external_port_exists     self.get_external_device_name(port_id),   File \"/usr/lib64/python2.6/site-packages/neutron/agent/l3_agent.py\", line 1273, in get_external_device_name     return (EXTERNAL_DEV_PREFIX + port_id)[:self.driver.DEV_NAME_LEN] TypeError: cannot concatenate \u0027str\u0027 and \u0027NoneType\u0027 objects","commit_id":"efd2db8606fc8a71042a29a965b07b7cd003c989"}],"neutron/agent/l3/dvr_edge_router.py":[{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"4c4ce9be2b573468aebf60fe0d29d8e124df7b13","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            LOG.debug(\"not hosting snat for router: %s\", self.router[\u0027id\u0027])"},{"line_number":68,"context_line":"            return"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if self.snat_namespace is None:"},{"line_number":71,"context_line":"            self.snat_namespace \u003d dvr_snat_ns.SnatNamespace(self.router[\u0027id\u0027],"},{"line_number":72,"context_line":"                                                        self.agent_conf,"},{"line_number":73,"context_line":"                                                        self.driver,"}],"source_content_type":"text/x-python","patch_set":34,"id":"fa32b979_84c31f38","line":70,"updated":"2015-06-27 16:18:35.000000000","message":"its kinda strange that you do it, isn\u0027t the code that deleted the namespace in the first place also cleared this?\n\nAlso if the namespace is deleted doesnt it also automatically unplug it?, its very strange that the port still exists\n\nI personally think that this should be handled else where, but maybe there is no better place, what are your thoughts?","commit_id":"a56926b13a88a552236a45cd02793f87a3c42118"},{"author":{"_account_id":10076,"name":"Ila Palanisamy","email":"ilavajuthy.palanisamy@hp.com","username":"ilavajuthy_palanisamy"},"change_message_id":"0809d3b8d8f4439fcba84e78106794aee2fd9034","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            LOG.debug(\"not hosting snat for router: %s\", self.router[\u0027id\u0027])"},{"line_number":68,"context_line":"            return"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if self.snat_namespace is None:"},{"line_number":71,"context_line":"            self.snat_namespace \u003d dvr_snat_ns.SnatNamespace(self.router[\u0027id\u0027],"},{"line_number":72,"context_line":"                                                        self.agent_conf,"},{"line_number":73,"context_line":"                                                        self.driver,"}],"source_content_type":"text/x-python","patch_set":34,"id":"ba3cc151_86507133","line":70,"in_reply_to":"fa32b979_84c31f38","updated":"2015-07-03 00:07:41.000000000","message":"Hi Gal,\nI got the scenario when this snat_namespace object is becoming None and out of sync with actual system name space. When I restart the l3 agent this snat_name space is getting initialized to None during object creation. Now when i do router remove, exception is thrown because snat_namespace is None.\nI will follow the pattern that is used in router_info for initializing the snat_namespace, with this I will be able to remove the checks.\n\nIla.","commit_id":"a56926b13a88a552236a45cd02793f87a3c42118"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"9894062cc7464e7e78e89c9c14eda02f205440ae","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            LOG.debug(\"not hosting snat for router: %s\", self.router[\u0027id\u0027])"},{"line_number":68,"context_line":"            return"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if self.snat_namespace is None:"},{"line_number":71,"context_line":"            self.snat_namespace \u003d dvr_snat_ns.SnatNamespace(self.router[\u0027id\u0027],"},{"line_number":72,"context_line":"                                                        self.agent_conf,"},{"line_number":73,"context_line":"                                                        self.driver,"}],"source_content_type":"text/x-python","patch_set":34,"id":"ba3cc151_ac13e15b","line":70,"in_reply_to":"fa32b979_84c31f38","updated":"2015-06-29 13:13:14.000000000","message":"I\u0027m not as uncomfortable with this block, because I read it as \"defensive programming\" - yes it might be handled elsewhere, but if it isn\u0027t, it gets handled here.","commit_id":"a56926b13a88a552236a45cd02793f87a3c42118"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"4c4ce9be2b573468aebf60fe0d29d8e124df7b13","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        snat_interface \u003d self.get_snat_int_device_name(sn_port[\u0027id\u0027])"},{"line_number":130,"context_line":"        if self.snat_namespace is None:"},{"line_number":131,"context_line":"            self.snat_namespace \u003d dvr_snat_ns.SnatNamespace(self.router[\u0027id\u0027],"},{"line_number":132,"context_line":"                                                        self.agent_conf,"},{"line_number":133,"context_line":"                                                        self.driver,"}],"source_content_type":"text/x-python","patch_set":34,"id":"fa32b979_a4be63ac","line":130,"updated":"2015-06-27 16:18:35.000000000","message":"ditto","commit_id":"a56926b13a88a552236a45cd02793f87a3c42118"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f52721b1a3c25ade3aba9190f2ee324b82ecd87d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            self._check_external_port_exists(self.router_id, interface_name)):"},{"line_number":51,"context_line":"            self._external_dvr_gateway_removed(ex_gw_port, interface_name)"},{"line_number":52,"context_line":"            return"},{"line_number":53,"context_line":"        if not self._is_this_snat_host():"},{"line_number":54,"context_line":"            # no centralized SNAT gateway for this node/agent"},{"line_number":55,"context_line":"            LOG.debug(\"not hosting snat for router: %s\", self.router[\u0027id\u0027])"},{"line_number":56,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_c11e6bba","line":53,"updated":"2015-07-09 12:32:14.000000000","message":"Here we can check if it was actually \"this\"_snat_host before, by checking if self.snat_namespace is not None. If it\u0027s not then it has to be deleted.","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":10076,"name":"Ila Palanisamy","email":"ilavajuthy.palanisamy@hp.com","username":"ilavajuthy_palanisamy"},"change_message_id":"e0e2340ad26dd759f4519e53c3e6778fbb832734","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            self._check_external_port_exists(self.router_id, interface_name)):"},{"line_number":51,"context_line":"            self._external_dvr_gateway_removed(ex_gw_port, interface_name)"},{"line_number":52,"context_line":"            return"},{"line_number":53,"context_line":"        if not self._is_this_snat_host():"},{"line_number":54,"context_line":"            # no centralized SNAT gateway for this node/agent"},{"line_number":55,"context_line":"            LOG.debug(\"not hosting snat for router: %s\", self.router[\u0027id\u0027])"},{"line_number":56,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_a309c486","line":53,"in_reply_to":"ba3cc151_c11e6bba","updated":"2015-07-09 23:59:01.000000000","message":"I think we can merge with your patch 199514 to take care of this comment.","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f52721b1a3c25ade3aba9190f2ee324b82ecd87d","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            LOG.debug(\"not hosting snat for router: %s\", self.router[\u0027id\u0027])"},{"line_number":56,"context_line":"            return"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self._external_gateway_added(ex_gw_port,"},{"line_number":59,"context_line":"                                     interface_name,"},{"line_number":60,"context_line":"                                     self.snat_namespace.name,"},{"line_number":61,"context_line":"                                     preserve_ips\u003d[])"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_a1cc8735","line":58,"updated":"2015-07-09 12:32:14.000000000","message":"Here we should check if self.snat_namespace is not None because if it\u0027s None it means that snat was just scheduled to this agent so we should proceed with self.external_gateway_added()","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":10076,"name":"Ila Palanisamy","email":"ilavajuthy.palanisamy@hp.com","username":"ilavajuthy_palanisamy"},"change_message_id":"e0e2340ad26dd759f4519e53c3e6778fbb832734","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            LOG.debug(\"not hosting snat for router: %s\", self.router[\u0027id\u0027])"},{"line_number":56,"context_line":"            return"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self._external_gateway_added(ex_gw_port,"},{"line_number":59,"context_line":"                                     interface_name,"},{"line_number":60,"context_line":"                                     self.snat_namespace.name,"},{"line_number":61,"context_line":"                                     preserve_ips\u003d[])"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_c30e488c","line":58,"in_reply_to":"ba3cc151_a1cc8735","updated":"2015-07-09 23:59:01.000000000","message":"same as above","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f52721b1a3c25ade3aba9190f2ee324b82ecd87d","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.snat_namespace \u003d None"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def process_snat_namespace(self, ex_gw_port, interface_name):"},{"line_number":83,"context_line":"        #delete snat namespace, if the current gw_port_host is null"},{"line_number":84,"context_line":"        #and the previous gw_port_host is this agent"},{"line_number":85,"context_line":"        if (not self.router.get(\u0027gw_port_host\u0027) and"},{"line_number":86,"context_line":"            self.gw_port_host \u003d\u003d self.host):"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_21a15794","line":83,"updated":"2015-07-09 12:32:14.000000000","message":"what if current gw_port_host is not null but changed to another host?","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":10076,"name":"Ila Palanisamy","email":"ilavajuthy.palanisamy@hp.com","username":"ilavajuthy_palanisamy"},"change_message_id":"e0e2340ad26dd759f4519e53c3e6778fbb832734","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.snat_namespace \u003d None"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def process_snat_namespace(self, ex_gw_port, interface_name):"},{"line_number":83,"context_line":"        #delete snat namespace, if the current gw_port_host is null"},{"line_number":84,"context_line":"        #and the previous gw_port_host is this agent"},{"line_number":85,"context_line":"        if (not self.router.get(\u0027gw_port_host\u0027) and"},{"line_number":86,"context_line":"            self.gw_port_host \u003d\u003d self.host):"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_2375b4f9","line":83,"in_reply_to":"ba3cc151_21a15794","updated":"2015-07-09 23:59:01.000000000","message":"I think in this case it would have entered into external_gateway_updated method.","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"}],"neutron/agent/l3/dvr_local_router.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"62306697e8147a354141bebeca635a1491c9f534","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        super(DvrLocalRouter, self).process_external(agent)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def process_snat_namespace(self, ex_gw_port, interface_name):"},{"line_number":419,"context_line":"        pass"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"    def create_dvr_fip_interfaces(self, ex_gw_port):"},{"line_number":422,"context_line":"        floating_ips \u003d self.get_floating_ips()"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_9e8a2763","line":419,"updated":"2015-07-08 18:41:00.000000000","message":"nit: Can you add a Docstring in here that would tell the use of this function.","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9fa573b3fca91249df943b3c0333a4d284c1ae0f","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        super(DvrLocalRouter, self).process_external(agent)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def process_snat_namespace(self, ex_gw_port, interface_name):"},{"line_number":373,"context_line":"        \"\"\"attachment point for subclasses that need to do special"},{"line_number":374,"context_line":"           processing of the SNAT namespace"},{"line_number":375,"context_line":"        \"\"\""},{"line_number":376,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":39,"id":"1a4dcd0f_a32cd002","line":373,"updated":"2015-08-11 18:22:51.000000000","message":"nit: Multiline docstring should have one line summary, with period, and then blank line, and additional lines.","commit_id":"cd2696262668c60849ee7e177ec1d6dce4d1ac79"}],"neutron/agent/l3/dvr_router.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a539aea628782c0ac3d303029df6657f7ec6388","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        # and ns_name are the key differences."},{"line_number":419,"context_line":"        if self._check_external_port_exists("},{"line_number":420,"context_line":"            self.router_id, interface_name):"},{"line_number":421,"context_line":"            return"},{"line_number":422,"context_line":"        ip_wrapr \u003d ip_lib.IPWrapper(namespace\u003dself.ns_name)"},{"line_number":423,"context_line":"        ip_wrapr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":424,"context_line":"                               \u0027net.ipv4.conf.all.send_redirects\u003d0\u0027])"}],"source_content_type":"text/x-python","patch_set":30,"id":"3acd31a7_63beb3d5","line":421,"updated":"2015-05-04 18:53:39.000000000","message":"Is there any chance that we still might need to run the code below?  Could the arp entries be in need of update?  Snat redirects?","commit_id":"8e9b520a618865082b43049e8e2ba47ff2b531c3"},{"author":{"_account_id":10076,"name":"Ila Palanisamy","email":"ilavajuthy.palanisamy@hp.com","username":"ilavajuthy_palanisamy"},"change_message_id":"951c09519ab5cec3caa87f0eb41da54abf6e7a62","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        # and ns_name are the key differences."},{"line_number":419,"context_line":"        if self._check_external_port_exists("},{"line_number":420,"context_line":"            self.router_id, interface_name):"},{"line_number":421,"context_line":"            return"},{"line_number":422,"context_line":"        ip_wrapr \u003d ip_lib.IPWrapper(namespace\u003dself.ns_name)"},{"line_number":423,"context_line":"        ip_wrapr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":424,"context_line":"                               \u0027net.ipv4.conf.all.send_redirects\u003d0\u0027])"}],"source_content_type":"text/x-python","patch_set":30,"id":"1aca2d91_3858dd89","line":421,"in_reply_to":"1aca2d91_e5ce9959","updated":"2015-05-08 22:10:18.000000000","message":"I checked commenting below code. Without this code snat namespace is not getting created and arp entry for the sg port is not getting populated under qrouter namespace.\nThis code is getting called during router-gateway-set and l3-agent-router-add.","commit_id":"8e9b520a618865082b43049e8e2ba47ff2b531c3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"84538e7bcd4e9615f42b58c40ef2093efe11d776","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        # and ns_name are the key differences."},{"line_number":419,"context_line":"        if self._check_external_port_exists("},{"line_number":420,"context_line":"            self.router_id, interface_name):"},{"line_number":421,"context_line":"            return"},{"line_number":422,"context_line":"        ip_wrapr \u003d ip_lib.IPWrapper(namespace\u003dself.ns_name)"},{"line_number":423,"context_line":"        ip_wrapr.netns.execute([\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":424,"context_line":"                               \u0027net.ipv4.conf.all.send_redirects\u003d0\u0027])"}],"source_content_type":"text/x-python","patch_set":30,"id":"1aca2d91_e5ce9959","line":421,"in_reply_to":"3acd31a7_63beb3d5","updated":"2015-05-06 22:16:26.000000000","message":"Ila check if the code below between L422 and L440 is required in this context or not, that\u0027s what Carl has requested you to do.","commit_id":"8e9b520a618865082b43049e8e2ba47ff2b531c3"}],"neutron/agent/l3/router_info.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a539aea628782c0ac3d303029df6657f7ec6388","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        ex_gw_port_id \u003d (ex_gw_port and ex_gw_port[\u0027id\u0027] or"},{"line_number":489,"context_line":"                         self.ex_gw_port and self.ex_gw_port[\u0027id\u0027])"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        interface_name \u003d None"},{"line_number":492,"context_line":"        if ex_gw_port_id:"},{"line_number":493,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":494,"context_line":"        return interface_name"}],"source_content_type":"text/x-python","patch_set":30,"id":"3acd31a7_0804be47","line":491,"updated":"2015-05-04 18:53:39.000000000","message":"Style nit:  You can remove L491 and L494 and change L493 to this:  \n\n  return self.get_external_device_name(ex_gw_port_id)","commit_id":"8e9b520a618865082b43049e8e2ba47ff2b531c3"},{"author":{"_account_id":10076,"name":"Ila Palanisamy","email":"ilavajuthy.palanisamy@hp.com","username":"ilavajuthy_palanisamy"},"change_message_id":"f05058db23591b6adee03ddb207b5831e53d74ee","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        ex_gw_port_id \u003d (ex_gw_port and ex_gw_port[\u0027id\u0027] or"},{"line_number":489,"context_line":"                         self.ex_gw_port and self.ex_gw_port[\u0027id\u0027])"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        interface_name \u003d None"},{"line_number":492,"context_line":"        if ex_gw_port_id:"},{"line_number":493,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":494,"context_line":"        return interface_name"}],"source_content_type":"text/x-python","patch_set":30,"id":"1aca2d91_85e9251d","line":491,"in_reply_to":"3acd31a7_0804be47","updated":"2015-05-06 22:04:46.000000000","message":"Done","commit_id":"8e9b520a618865082b43049e8e2ba47ff2b531c3"},{"author":{"_account_id":10076,"name":"Ila Palanisamy","email":"ilavajuthy.palanisamy@hp.com","username":"ilavajuthy_palanisamy"},"change_message_id":"b8b626c6580b56905749eb448d39be55f5bc815e","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        ex_gw_port_id \u003d (ex_gw_port and ex_gw_port[\u0027id\u0027] or"},{"line_number":489,"context_line":"                         self.ex_gw_port and self.ex_gw_port[\u0027id\u0027])"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        interface_name \u003d None"},{"line_number":492,"context_line":"        if ex_gw_port_id:"},{"line_number":493,"context_line":"            interface_name \u003d self.get_external_device_name(ex_gw_port_id)"},{"line_number":494,"context_line":"        return interface_name"}],"source_content_type":"text/x-python","patch_set":30,"id":"1aca2d91_ec032bb7","line":491,"in_reply_to":"3acd31a7_0804be47","updated":"2015-05-06 21:21:54.000000000","message":"Will make change accordingly","commit_id":"8e9b520a618865082b43049e8e2ba47ff2b531c3"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5e9d045688124235373227f8f716019aeff727b1","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                           namespace\u003dself.ns_name,"},{"line_number":495,"context_line":"                           prefix\u003dEXTERNAL_DEV_PREFIX)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def _process_ext_gw_port(self, ex_gw_port):"},{"line_number":498,"context_line":"        # TODO(Carl) Refactor to clarify roles of ex_gw_port vs self.ex_gw_port"},{"line_number":499,"context_line":"        ex_gw_port_id \u003d (ex_gw_port and ex_gw_port[\u0027id\u0027] or"},{"line_number":500,"context_line":"                         self.ex_gw_port and self.ex_gw_port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":36,"id":"ba3cc151_ce8944cc","line":497,"updated":"2015-07-07 05:57:09.000000000","message":"For this method not do any other process, but get, shall we change its name?","commit_id":"d6ab60c5b95265fe31b533bcef79a09e668a1a8b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f52721b1a3c25ade3aba9190f2ee324b82ecd87d","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                           namespace\u003dself.ns_name,"},{"line_number":495,"context_line":"                           prefix\u003dEXTERNAL_DEV_PREFIX)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def _get_ext_gw_port_name(self, ex_gw_port):"},{"line_number":498,"context_line":"        # TODO(Carl) Refactor to clarify roles of ex_gw_port vs self.ex_gw_port"},{"line_number":499,"context_line":"        ex_gw_port_id \u003d (ex_gw_port and ex_gw_port[\u0027id\u0027] or"},{"line_number":500,"context_line":"                         self.ex_gw_port and self.ex_gw_port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_af28f397","line":497,"updated":"2015-07-09 12:32:14.000000000","message":"this name is confusing as it\u0027s actually returning device name if either new or cached ex_gw_port exists. _get_external_device_name would be more clear","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":10076,"name":"Ila Palanisamy","email":"ilavajuthy.palanisamy@hp.com","username":"ilavajuthy_palanisamy"},"change_message_id":"e0e2340ad26dd759f4519e53c3e6778fbb832734","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                           namespace\u003dself.ns_name,"},{"line_number":495,"context_line":"                           prefix\u003dEXTERNAL_DEV_PREFIX)"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    def _get_ext_gw_port_name(self, ex_gw_port):"},{"line_number":498,"context_line":"        # TODO(Carl) Refactor to clarify roles of ex_gw_port vs self.ex_gw_port"},{"line_number":499,"context_line":"        ex_gw_port_id \u003d (ex_gw_port and ex_gw_port[\u0027id\u0027] or"},{"line_number":500,"context_line":"                         self.ex_gw_port and self.ex_gw_port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_a3578459","line":497,"in_reply_to":"ba3cc151_af28f397","updated":"2015-07-09 23:59:01.000000000","message":"I will change it","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f52721b1a3c25ade3aba9190f2ee324b82ecd87d","unresolved":false,"context_lines":[{"line_number":510,"context_line":"                    return dict((k, v) for k, v in six.iteritems(d)"},{"line_number":511,"context_line":"                                if k not in ignore)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"                keys_to_ignore \u003d set([\u0027binding:host_id\u0027])"},{"line_number":514,"context_line":"                port1_filtered \u003d _get_filtered_dict(port1, keys_to_ignore)"},{"line_number":515,"context_line":"                port2_filtered \u003d _get_filtered_dict(port2, keys_to_ignore)"},{"line_number":516,"context_line":"                return port1_filtered \u003d\u003d port2_filtered"}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_01d1b322","line":513,"updated":"2015-07-09 12:32:14.000000000","message":"This was added duing HA routers development. However for dvr routers this is something that makes sence - chanded host of an external gateway means snat role was moved to another host. So here we can trigger external_gateway_updated at #521 and agent will create or delete (if existed) snat namespace depending on agent\u0027s host.","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f52721b1a3c25ade3aba9190f2ee324b82ecd87d","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        elif not ex_gw_port and self.ex_gw_port:"},{"line_number":523,"context_line":"            self.external_gateway_removed(self.ex_gw_port, interface_name)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        #Check whether snat namespace needs to be deleted"},{"line_number":526,"context_line":"        if self.ex_gw_port and self.router.get(\u0027distributed\u0027):"},{"line_number":527,"context_line":"            self.process_snat_namespace(self.ex_gw_port, interface_name)"},{"line_number":528,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_411edb5f","line":525,"updated":"2015-07-09 12:32:14.000000000","message":"router_info is supposed to be generic for all types of routers, now you\u0027re bringing dvr speifics to it which is not good","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"},{"author":{"_account_id":10076,"name":"Ila Palanisamy","email":"ilavajuthy.palanisamy@hp.com","username":"ilavajuthy_palanisamy"},"change_message_id":"e0e2340ad26dd759f4519e53c3e6778fbb832734","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        elif not ex_gw_port and self.ex_gw_port:"},{"line_number":523,"context_line":"            self.external_gateway_removed(self.ex_gw_port, interface_name)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        #Check whether snat namespace needs to be deleted"},{"line_number":526,"context_line":"        if self.ex_gw_port and self.router.get(\u0027distributed\u0027):"},{"line_number":527,"context_line":"            self.process_snat_namespace(self.ex_gw_port, interface_name)"},{"line_number":528,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"ba3cc151_03f1906a","line":525,"in_reply_to":"ba3cc151_411edb5f","updated":"2015-07-09 23:59:01.000000000","message":"what i noticed is, when the l3-agent-router-remove command is executed, it is not entering either updated or removed case, so the snat namespace is not getting deleted.","commit_id":"8f42efdabab6be933792f86f3a83cc544f92f886"}],"neutron/agent/l3_agent.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6cb173e3ee8d4431ed2b613910041a19e4d782ab","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"                self._snat_redirect_remove(ri, p, internal_interface)"},{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":1396,"context_line":"                ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1397,"context_line":"                ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"},{"line_number":1398,"context_line":"            else:"},{"line_number":1399,"context_line":"                # not hosting agent - no work to do"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_a8eab90c","line":1396,"updated":"2014-09-24 23:29:03.000000000","message":"why is this change both here and here:\n\nhttps://review.openstack.org/#/c/123795/2/neutron/agent/l3_agent.py\n\nMaybe you want to stack this one on top of https://review.openstack.org/#/c/123795 instead, and https://review.openstack.org/#/c/123795 on top of https://review.openstack.org/#/c/122024/\n\nBesides, you\u0027re definitely gonna incur into a unnecessary merge conflict if left like this.","commit_id":"3a327760655c75200089d85eb6fb84b81ed84d76"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"4fe8713122a92ce290418dcbe474e9ac85aa1f0e","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"                self._snat_redirect_remove(ri, p, internal_interface)"},{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":1396,"context_line":"                ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1397,"context_line":"                ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"},{"line_number":1398,"context_line":"            else:"},{"line_number":1399,"context_line":"                # not hosting agent - no work to do"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9df570_48c6ad4a","line":1396,"in_reply_to":"da9df570_a8eab90c","updated":"2014-09-25 20:03:13.000000000","message":"How about I just drop this line from this patch?  Patch 123795 has its own value and can stand on its own.","commit_id":"3a327760655c75200089d85eb6fb84b81ed84d76"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2eb580885e94b81d2ddad9386bf35ecb8358f6fa","unresolved":false,"context_lines":[{"line_number":919,"context_line":"            if not ri.ex_gw_port or (ri.router[\u0027distributed\u0027] and"},{"line_number":920,"context_line":"                    not self._check_external_port_exists(ri.router_id,"},{"line_number":921,"context_line":"                                                         ex_gw_port_id)):"},{"line_number":922,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":923,"context_line":"            elif not _gateway_ports_equal(ex_gw_port, ri.ex_gw_port):"},{"line_number":924,"context_line":"                self.external_gateway_updated(ri, ex_gw_port, interface_name)"},{"line_number":925,"context_line":"        elif not ex_gw_port and ri.ex_gw_port:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_558ff329","line":922,"updated":"2014-09-26 15:44:45.000000000","message":"so here we add the gw if the port does not exist, but then we check for the physical one, only in the dvr case. This is somewhat confusing.\n\nWouldn\u0027t the problem exist in the centralized case too? We\u0027re moving a router with an external gateway, but the external gateway is not set on the new agent where we\u0027re landing. Perhaps the gateway needs to be cleared before the migration?","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c010729893b33b27e14796354e7632f315db503f","unresolved":false,"context_lines":[{"line_number":919,"context_line":"            if not ri.ex_gw_port or (ri.router[\u0027distributed\u0027] and"},{"line_number":920,"context_line":"                    not self._check_external_port_exists(ri.router_id,"},{"line_number":921,"context_line":"                                                         ex_gw_port_id)):"},{"line_number":922,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":923,"context_line":"            elif not _gateway_ports_equal(ex_gw_port, ri.ex_gw_port):"},{"line_number":924,"context_line":"                self.external_gateway_updated(ri, ex_gw_port, interface_name)"},{"line_number":925,"context_line":"        elif not ex_gw_port and ri.ex_gw_port:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_cbcfc054","line":922,"in_reply_to":"da9df570_558ff329","updated":"2014-09-26 22:15:22.000000000","message":"Sorry it is confusing - dvr has complexities that are hard to avoid.  For example, the single node hosting of SNAT compared to the multinode hosting for E/W routing.\n\nIn the centralized case the router is only ever hosted on one agent/host at any given time.  So in the process of a move, the router is first removed from the \u0027old\u0027 agent/host, then added to the \u0027new\u0027 agent/host.  The \u0027new\u0027 host will not have any remnant data of the router when the add happens.\n\nIn the distributed case there is a corner case when the snat router is moved to a agent/host that already is hosting the router (just not for snat functionality).  Keep in mind, this move operation should only be done for snat - it doesn\u0027t make sense to move the basic router functionality around.  There is a separate patch that is supposed to limit what nodes the move can be done.\n\nYou have an interesting idea about clearing the external gateway.  I think this approach was pursued since it requires less commands from the user.  Coding wise I\u0027d have to investigate if it adds or reduces complexity.","commit_id":"fb13621f4511344a7986edafa4fd5dc0822a402f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"28eb33c944883c51eb0e7c5eaa2c11cfc04f10b9","unresolved":false,"context_lines":[{"line_number":921,"context_line":"            # SNAT data is routed to the remote SNAT host until the"},{"line_number":922,"context_line":"            # host is changed."},{"line_number":923,"context_line":"            if not ri.ex_gw_port or (ri.router[\u0027distributed\u0027] and"},{"line_number":924,"context_line":"                    not self._check_external_port_exists(ri.router_id,"},{"line_number":925,"context_line":"                                                         ex_gw_port_id)):"},{"line_number":926,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":927,"context_line":"            elif not _gateway_ports_equal(ex_gw_port, ri.ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_9e9f3750","line":924,"updated":"2014-10-10 21:11:52.000000000","message":"I almost wish we could get rid of keeping track of the state in \u0027ri\u0027 and always do it this way (i.e. if the interface should be there and is not then add it.)  The problem is that running these commands to check can be slow and so it is difficult to justify doing everywhere.  I\u0027m hoping that the new rootwrap daemon mode could make this perform well enough to use it everywhere.","commit_id":"d3688e35bfd1dce9b71aa7d4c54f02b28515b94c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b32fdcdb9c3eab4480a2cce1f49de21ff3612cb3","unresolved":false,"context_lines":[{"line_number":921,"context_line":"            # SNAT data is routed to the remote SNAT host until the"},{"line_number":922,"context_line":"            # host is changed."},{"line_number":923,"context_line":"            if not ri.ex_gw_port or (ri.router[\u0027distributed\u0027] and"},{"line_number":924,"context_line":"                    not self._check_external_port_exists(ri.router_id,"},{"line_number":925,"context_line":"                                                         ex_gw_port_id)):"},{"line_number":926,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":927,"context_line":"            elif not _gateway_ports_equal(ex_gw_port, ri.ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_66a5aa52","line":924,"in_reply_to":"9aa7fdbe_ff44cb75","updated":"2014-10-21 05:13:43.000000000","message":"No, it is fine.  No action is requested here.  I guess I was starting to request a change but talked myself out of it and didn\u0027t leave my comment in a very clear state.  Sorry about that.","commit_id":"d3688e35bfd1dce9b71aa7d4c54f02b28515b94c"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"1e7ef48db410d619c8fee199e92f86aac5859991","unresolved":false,"context_lines":[{"line_number":921,"context_line":"            # SNAT data is routed to the remote SNAT host until the"},{"line_number":922,"context_line":"            # host is changed."},{"line_number":923,"context_line":"            if not ri.ex_gw_port or (ri.router[\u0027distributed\u0027] and"},{"line_number":924,"context_line":"                    not self._check_external_port_exists(ri.router_id,"},{"line_number":925,"context_line":"                                                         ex_gw_port_id)):"},{"line_number":926,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":927,"context_line":"            elif not _gateway_ports_equal(ex_gw_port, ri.ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_ff44cb75","line":924,"in_reply_to":"baa201ad_9e9f3750","updated":"2014-10-20 17:46:36.000000000","message":"Are you requesting a change here or is the proposed operation too costly?  Is there any metrics/testing you want me to try to determine if this new code path is acceptable?  If we can\u0027t go to the system to check what is actually there we have to keep track via local variables/flags which then have to be properly managed across events/scenarios like agent restart and/or HA.","commit_id":"d3688e35bfd1dce9b71aa7d4c54f02b28515b94c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"399b9880aa3020524910b637daee3e4411231d26","unresolved":false,"context_lines":[{"line_number":1363,"context_line":"                ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1364,"context_line":"                ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"},{"line_number":1365,"context_line":"            elif ri.router[\u0027gw_port_host\u0027] is None and ("},{"line_number":1366,"context_line":"                ex_gw_port[\u0027binding:host_id\u0027] \u003d\u003d self.host):"},{"line_number":1367,"context_line":"                # snat move case, remove from this node"},{"line_number":1368,"context_line":"                self.external_gateway_removed(ri, ex_gw_port, interface_name)"},{"line_number":1369,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_b4d0aa54","line":1366,"updated":"2014-11-10 22:48:21.000000000","message":"This is new since I last reviewed and the commit message doesn\u0027t help me understand what is going on here.  I don\u0027t understand the logic here.\n\nThe new port is ex_gw_port right?  So, if it is bound to this host ID then why should it be removed?\n\nAlso, ri.router[\u0027gw_port_host\u0027] is None says that the port wasn\u0027t previously in the cache.","commit_id":"e5d70d1540f62af758b882a81a3c93d18827d862"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"c3a869500dfef70d202f3550863d7b7249aa1807","unresolved":false,"context_lines":[{"line_number":1363,"context_line":"                ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1364,"context_line":"                ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"},{"line_number":1365,"context_line":"            elif ri.router[\u0027gw_port_host\u0027] is None and ("},{"line_number":1366,"context_line":"                ex_gw_port[\u0027binding:host_id\u0027] \u003d\u003d self.host):"},{"line_number":1367,"context_line":"                # snat move case, remove from this node"},{"line_number":1368,"context_line":"                self.external_gateway_removed(ri, ex_gw_port, interface_name)"},{"line_number":1369,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_4f808d46","line":1366,"in_reply_to":"5a890539_b2c10c56","updated":"2014-11-20 21:45:32.000000000","message":"After our discussion, I changed L1366 to check the system, not the var","commit_id":"e5d70d1540f62af758b882a81a3c93d18827d862"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"cbb45183f24424176f853c2c962626c5e6b874f4","unresolved":false,"context_lines":[{"line_number":1363,"context_line":"                ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1364,"context_line":"                ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"},{"line_number":1365,"context_line":"            elif ri.router[\u0027gw_port_host\u0027] is None and ("},{"line_number":1366,"context_line":"                ex_gw_port[\u0027binding:host_id\u0027] \u003d\u003d self.host):"},{"line_number":1367,"context_line":"                # snat move case, remove from this node"},{"line_number":1368,"context_line":"                self.external_gateway_removed(ri, ex_gw_port, interface_name)"},{"line_number":1369,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_d7f37871","line":1366,"in_reply_to":"5a890539_b4d0aa54","updated":"2014-11-11 00:38:15.000000000","message":"This is a unique case of the manual move flow.  I added the comment below to try to help - would a commit message addition be better?\n\nEssentially, the binding has been removed (\u0027gw_port_host\u0027) but the ex_gw_port has not been cleared.  The snat needs to be removed from this node.  external_gateway_removed() is only called from process_router() when the ex_gw_port is completely removed/cleared from the router (L965-966).\n\nBoth the ex_gw_port and ri.router[\u0027gw_port_host\u0027] should be the non-cached version.  The ri.router version of data is the \"live\" data from RPC.\n\nThis external_gateway is not being removed from the router, just moved from one host to another.  This is quite different from centralized routers, but I am trying to not affect the qrouter at all, only the snat namespace. \n\nI was trying to use the existing APIs and therefore this case is hit when the l3-agent-router-remove command is run.  The gateway hasn\u0027t been cleared, the port itself hasn\u0027t been affected, that is why ex_gw_port[\u0027binding:host_id\u0027] hasn\u0027t changed, but the gw_port_host binding has been removed.  When l3-agent-router-add is run, the binding will be completely updated and the new host will add the gateway.\n\nHonestly, a new API command to do all the work in one command would be ideal but I believe there was a request to not add a new API for this functionality.","commit_id":"e5d70d1540f62af758b882a81a3c93d18827d862"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cdb2c759628d00f0e0197738dd6d47a8722b229d","unresolved":false,"context_lines":[{"line_number":1363,"context_line":"                ri.router[\u0027gw_port_host\u0027] \u003d\u003d self.host):"},{"line_number":1364,"context_line":"                ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"},{"line_number":1365,"context_line":"            elif ri.router[\u0027gw_port_host\u0027] is None and ("},{"line_number":1366,"context_line":"                ex_gw_port[\u0027binding:host_id\u0027] \u003d\u003d self.host):"},{"line_number":1367,"context_line":"                # snat move case, remove from this node"},{"line_number":1368,"context_line":"                self.external_gateway_removed(ri, ex_gw_port, interface_name)"},{"line_number":1369,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_b2c10c56","line":1366,"in_reply_to":"5a890539_d7f37871","updated":"2014-11-14 23:58:09.000000000","message":"I\u0027m pretty sure that ex_gw_port is the *new* port and ri.ex_gw_port is the old one[*].  So, if we\u0027ve got a new gateway port and the host binding is this host why would we remove it?\n\n[*] I hate that code and I intend to clean it all up but alas, I need my blueprint accepted.","commit_id":"e5d70d1540f62af758b882a81a3c93d18827d862"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ad04daf363d4d43ff24423a9a523494360fb4da3","unresolved":false,"context_lines":[{"line_number":944,"context_line":"            # SNAT data is routed to the remote SNAT host until the"},{"line_number":945,"context_line":"            # host is changed."},{"line_number":946,"context_line":"            if not ri.ex_gw_port or (ri.router[\u0027distributed\u0027] and"},{"line_number":947,"context_line":"                    not self._check_external_port_exists(ri.router_id,"},{"line_number":948,"context_line":"                                                         ex_gw_port_id)):"},{"line_number":949,"context_line":"                self.external_gateway_added(ri, ex_gw_port, interface_name)"},{"line_number":950,"context_line":"            elif not _gateway_ports_equal(ex_gw_port, ri.ex_gw_port):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_a6be73fd","line":947,"updated":"2014-11-21 04:51:32.000000000","message":"I think in the long run, I\u0027d like to get away from this cached ri.ex_gw_port but this is fine for now.","commit_id":"ab5e66ea61d6b6d29ffe2c535e0dba2909c5d151"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ad04daf363d4d43ff24423a9a523494360fb4da3","unresolved":false,"context_lines":[{"line_number":1230,"context_line":""},{"line_number":1231,"context_line":"    def _check_external_port_exists(self, router_id, port_id):"},{"line_number":1232,"context_line":"        \"\"\"Return True if external gateway port is present.\"\"\""},{"line_number":1233,"context_line":"        return (ip_lib.device_exists("},{"line_number":1234,"context_line":"                    self.get_external_device_name(port_id),"},{"line_number":1235,"context_line":"                    root_helper\u003dself.root_helper,"},{"line_number":1236,"context_line":"                    namespace\u003dself.get_snat_ns_name(router_id)))"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_2658c331","line":1233,"updated":"2014-11-21 04:51:32.000000000","message":"Nit: don\u0027t need the outer parenthesis.","commit_id":"ab5e66ea61d6b6d29ffe2c535e0dba2909c5d151"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ad04daf363d4d43ff24423a9a523494360fb4da3","unresolved":false,"context_lines":[{"line_number":1353,"context_line":"                self._check_external_port_exists(ri.router_id,"},{"line_number":1354,"context_line":"                                                 ex_gw_port[\u0027id\u0027])):"},{"line_number":1355,"context_line":"                # snat move case, remove from this node"},{"line_number":1356,"context_line":"                self.external_gateway_removed(ri, ex_gw_port, interface_name)"},{"line_number":1357,"context_line":"                return"},{"line_number":1358,"context_line":"            else:"},{"line_number":1359,"context_line":"                # no centralized SNAT gateway for this node/agent"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_a6c83375","line":1356,"updated":"2014-11-21 04:51:32.000000000","message":"This call here is going to call _check_external_port_exists again even though we just called it.  Can we design around that?","commit_id":"ab5e66ea61d6b6d29ffe2c535e0dba2909c5d151"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"8e9519841947ae1a4194db9ff59c454e827a2480","unresolved":false,"context_lines":[{"line_number":1353,"context_line":"                self._check_external_port_exists(ri.router_id,"},{"line_number":1354,"context_line":"                                                 ex_gw_port[\u0027id\u0027])):"},{"line_number":1355,"context_line":"                # snat move case, remove from this node"},{"line_number":1356,"context_line":"                self.external_gateway_removed(ri, ex_gw_port, interface_name)"},{"line_number":1357,"context_line":"                return"},{"line_number":1358,"context_line":"            else:"},{"line_number":1359,"context_line":"                # no centralized SNAT gateway for this node/agent"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_ec55a3c2","line":1356,"in_reply_to":"5a890539_a6c83375","updated":"2014-11-21 18:39:27.000000000","message":"Yeah, I didn\u0027t like that either.  I thought of passing a flag down - but that isn\u0027t pretty either.  I\u0027ll ponder on this a bit.","commit_id":"ab5e66ea61d6b6d29ffe2c535e0dba2909c5d151"}],"neutron/tests/unit/agent/l3/test_agent.py":[{"author":{"_account_id":8645,"name":"Trinath Somanchi","email":"trinath.somanchi@freescale.com","username":"trinaths"},"change_message_id":"182ad73a3607c5e55dd6581e0efd1a26f96d3ea6","unresolved":false,"context_lines":[{"line_number":1397,"context_line":"        ri.router[\u0027gw_port_host\u0027] \u003d HOSTNAME"},{"line_number":1398,"context_line":"        ri.dist_fip_count \u003d 0"},{"line_number":1399,"context_line":"        interface_name \u003d ri.get_external_device_name(ex_gw_port[\u0027id\u0027])"},{"line_number":1400,"context_line":"        #ri.external_gateway_added \u003d mock.Mock()"},{"line_number":1401,"context_line":"        ri._create_dvr_gateway \u003d mock.Mock()"},{"line_number":1402,"context_line":"        ri._is_this_snat_host \u003d mock.Mock(return_value\u003dTrue)"},{"line_number":1403,"context_line":"        ri._check_external_port_exists \u003d mock.Mock(return_value\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":32,"id":"9af37de9_75626eda","line":1400,"updated":"2015-05-11 10:18:49.000000000","message":"Really need the above commented code ??","commit_id":"fb32a8440e9c61581114e97f0de77d945f2c655c"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5e9d045688124235373227f8f716019aeff727b1","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"           plug the interface until the binding matches its host."},{"line_number":1065,"context_line":"        \"\"\""},{"line_number":1066,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":1067,"context_line":"        rtr \u003d l3_test_common.prepare_router_data(enable_snat\u003dFalse)"},{"line_number":1068,"context_line":"        ri \u003d dvr_router.DvrEdgeRouter("},{"line_number":1069,"context_line":"            agent, HOSTNAME, rtr[\u0027id\u0027], rtr, **self.ri_kwargs)"},{"line_number":1070,"context_line":"        ex_gw_port \u003d ri.get_ex_gw_port()"}],"source_content_type":"text/x-python","patch_set":36,"id":"ba3cc151_c9ca9e4f","line":1067,"updated":"2015-07-07 05:57:09.000000000","message":"enable_snat\u003dFalse, why not true? If a router set enable_snat to false, is there any necessary to move SNAT?","commit_id":"d6ab60c5b95265fe31b533bcef79a09e668a1a8b"}],"neutron/tests/unit/test_l3_agent.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5c297c94ded9c5b04c3d42cf48e4177508614568","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"        ri \u003d l3router.RouterInfo(router[\u0027id\u0027], self.conf.root_helper,"},{"line_number":1228,"context_line":"                                 router\u003drouter)"},{"line_number":1229,"context_line":"        agent.external_gateway_added \u003d mock.Mock()"},{"line_number":1230,"context_line":"        agent._check_external_port_exists \u003d mock.Mock(return_value\u003dTrue)"},{"line_number":1231,"context_line":"        agent.process_router(ri)"},{"line_number":1232,"context_line":"        orig_nat_rules \u003d ri.iptables_manager.ipv4[\u0027nat\u0027].rules[:]"},{"line_number":1233,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_81634540","line":1230,"updated":"2014-12-17 14:27:16.000000000","message":"Could this be moved to setup?","commit_id":"b7b6b6440a7c59e036774a3e1b1968afc08d2494"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"356bbd55904ee73389ec3fc11787eab6ce905da7","unresolved":false,"context_lines":[{"line_number":1133,"context_line":"    def test_process_router_snat_moved(self):"},{"line_number":1134,"context_line":"        \"\"\"Test DVR case where SNAT is moved."},{"line_number":1135,"context_line":""},{"line_number":1136,"context_line":"           SNAT host binding can be moved from one agent to another."},{"line_number":1137,"context_line":"           The new dvr_snat agent will have the snat data, but not"},{"line_number":1138,"context_line":"           plug the interface until the binding matches its host."},{"line_number":1139,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_c8997e6e","line":1136,"updated":"2015-01-15 20:07:45.000000000","message":"Nit: continuation of docstring lines should be lined up with first double quote. PEP257","commit_id":"efd2db8606fc8a71042a29a965b07b7cd003c989"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"47a501b3bcec559ae2f654259c0f20584528e7c2","unresolved":false,"context_lines":[{"line_number":1221,"context_line":"           The new dvr_snat agent will have the snat data, but not"},{"line_number":1222,"context_line":"           plug the interface until the binding matches its host."},{"line_number":1223,"context_line":"        \"\"\""},{"line_number":1224,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":1225,"context_line":"        rtr \u003d prepare_router_data(enable_snat\u003dFalse)"},{"line_number":1226,"context_line":"        ri \u003d l3router.RouterInfo(rtr[\u0027id\u0027], self.conf.root_helper,"},{"line_number":1227,"context_line":"                                router\u003drtr)"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a930d6b_23e67944","line":1224,"updated":"2015-01-27 17:18:36.000000000","message":"Many of the tests seem to create an agent, could it be moved to setup?","commit_id":"72c1f11682ba3d8271524fd7c784d4fb2a3ffd87"}]}
