)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ad4fd265b1418b398a099928fe5069ffbc4a2222","unresolved":false,"context_lines":[{"line_number":10,"context_line":"a bug where host name changes broke tunneling endpoint updates."},{"line_number":11,"context_line":"Tunneling endpoint updates changing roaming a hostname from IP"},{"line_number":12,"context_line":"to IP are a common method for active/passive HA with pacemaker"},{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_119b7d73","line":13,"updated":"2015-06-17 13:35:47.000000000","message":"Please clarify which API calls you mean.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":10,"context_line":"a bug where host name changes broke tunneling endpoint updates."},{"line_number":11,"context_line":"Tunneling endpoint updates changing roaming a hostname from IP"},{"line_number":12,"context_line":"to IP are a common method for active/passive HA with pacemaker"},{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_d1599236","line":13,"in_reply_to":"fa32b979_119b7d73","updated":"2015-06-17 13:45:43.000000000","message":"Romil was suggesting an approach to change host ids via\nAPI calls, I can\u0027t recall the URL of the review.\n\nRomil, could you post it?","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"0a5431aa36cdf4c02e93f11ce699dfb09cb11be4","unresolved":false,"context_lines":[{"line_number":10,"context_line":"a bug where host name changes broke tunneling endpoint updates."},{"line_number":11,"context_line":"Tunneling endpoint updates changing roaming a hostname from IP"},{"line_number":12,"context_line":"to IP are a common method for active/passive HA with pacemaker"},{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_f5aaa5d1","line":13,"in_reply_to":"fa32b979_54b9f013","updated":"2015-06-24 07:55:26.000000000","message":"Done","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"cec84427eb717b6b449ab361a1c16be38c2dad12","unresolved":false,"context_lines":[{"line_number":10,"context_line":"a bug where host name changes broke tunneling endpoint updates."},{"line_number":11,"context_line":"Tunneling endpoint updates changing roaming a hostname from IP"},{"line_number":12,"context_line":"to IP are a common method for active/passive HA with pacemaker"},{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_54b9f013","line":13,"in_reply_to":"fa32b979_d1599236","updated":"2015-06-17 13:53:28.000000000","message":"@Ajo: Is this you are referring to:\nhttps://bugs.launchpad.net/python-neutronclient/+bug/1381664","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ad4fd265b1418b398a099928fe5069ffbc4a2222","unresolved":false,"context_lines":[{"line_number":12,"context_line":"to IP are a common method for active/passive HA with pacemaker"},{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"1) we have hostA: ip1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_b1065184","line":15,"updated":"2015-06-17 13:35:47.000000000","message":"It\u0027s probably introduced to allow cleanup of endpoints that potentially belonged to the newly registered agent.\n\nRace condition discussion is something that may belong to later description of why some other solution (which?) is not applicable.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8167793c06ff5be2ceef3e435d64298c3aa5277d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"to IP are a common method for active/passive HA with pacemaker"},{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"1) we have hostA: ip1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_d4a74009","line":15,"in_reply_to":"fa32b979_1165bab3","updated":"2015-06-17 13:53:04.000000000","message":"That\u0027s me being pedant.\n\nI mean, the commit message suggests that the method is introduced so that we avoid a race condition. Instead, it should say that it\u0027s introduced to fix host roaming, and then expand on why that solution is chosen.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":12,"context_line":"to IP are a common method for active/passive HA with pacemaker"},{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"1) we have hostA: ip1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_1165bab3","line":15,"in_reply_to":"fa32b979_b1065184","updated":"2015-06-17 13:45:43.000000000","message":"What do you mean? :) I don\u0027t understand what you mean :)","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"cefeeae5c3548f2d979fb226b9b0ecb8a05a4e96","unresolved":false,"context_lines":[{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"1) we have hostA: ip1"},{"line_number":19,"context_line":"2) you register hostA: ip2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_6edf8369","line":16,"updated":"2015-06-17 13:24:02.000000000","message":"There is bug 1426427 on race conditions with tunnel_sync,  I am not sure it is good to solve it just for one specific use case, it should be generic for all conditions in tunnel_sync.\n\nhttps://review.openstack.org/#/c/189686/\n\nNeed suggestions/opinions.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"0a5431aa36cdf4c02e93f11ce699dfb09cb11be4","unresolved":false,"context_lines":[{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"1) we have hostA: ip1"},{"line_number":19,"context_line":"2) you register hostA: ip2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_d572017c","line":16,"in_reply_to":"fa32b979_140cc8eb","updated":"2015-06-24 07:55:26.000000000","message":"@romil, Probably an update mechanism is better than deletion if we can handle all the cases.\n\nFor the specific one I\u0027m doing here, we may need at least a delete. (for either the host or the ip entry), and then an update.\n\nCould you rebase your patch on top of this one?, I\u0027m sending a new patchset.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"1) we have hostA: ip1"},{"line_number":19,"context_line":"2) you register hostA: ip2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_f19616ef","line":16,"in_reply_to":"fa32b979_6edf8369","updated":"2015-06-17 13:45:43.000000000","message":"I will review that code again with this change in mind to see how can they work together, Probably we should not stop this change, as it solves the specific issue while we look at the broader which we could rebase on top of this (eventually undo some bits..)","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"849d552376e5faa04799da7c9750829668b7d55d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"1) we have hostA: ip1"},{"line_number":19,"context_line":"2) you register hostA: ip2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_45b7ead7","line":16,"in_reply_to":"fa32b979_d572017c","updated":"2015-06-24 11:41:53.000000000","message":"OK, will do it.\n@Kevin: Kindly review this patchset.\n\nShall we make https://review.openstack.org/#/c/189686/ dependent on this for avoiding race conditions.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"cec84427eb717b6b449ab361a1c16be38c2dad12","unresolved":false,"context_lines":[{"line_number":13,"context_line":"and should happen automatically without the need for API calls."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_endpoint_by_host_or_ip is introduced to avoid race"},{"line_number":16,"context_line":"conditions where:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"1) we have hostA: ip1"},{"line_number":19,"context_line":"2) you register hostA: ip2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_140cc8eb","line":16,"in_reply_to":"fa32b979_f19616ef","updated":"2015-06-17 13:53:28.000000000","message":"Sure, I am open for any kind of help/collaboration :)","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ad4fd265b1418b398a099928fe5069ffbc4a2222","unresolved":false,"context_lines":[{"line_number":18,"context_line":"1) we have hostA: ip1"},{"line_number":19,"context_line":"2) you register hostA: ip2"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"if we deleted by ip1, and ip2 before updating the new hostA:ip2,"},{"line_number":22,"context_line":"and another hostB registers with ip1 in the middle, the new hostB:ip1"},{"line_number":23,"context_line":"would be deleted."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_b1b891c9","line":21,"updated":"2015-06-17 13:35:47.000000000","message":"It does not parse with my English parser.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8167793c06ff5be2ceef3e435d64298c3aa5277d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"1) we have hostA: ip1"},{"line_number":19,"context_line":"2) you register hostA: ip2"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"if we deleted by ip1, and ip2 before updating the new hostA:ip2,"},{"line_number":22,"context_line":"and another hostB registers with ip1 in the middle, the new hostB:ip1"},{"line_number":23,"context_line":"would be deleted."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_74df5469","line":21,"in_reply_to":"fa32b979_71e9a6e5","updated":"2015-06-17 13:53:04.000000000","message":"but \u0027and ip2 before updating the new hostA:ip2\u0027 is not an English sub-sentence.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"0a5431aa36cdf4c02e93f11ce699dfb09cb11be4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"1) we have hostA: ip1"},{"line_number":19,"context_line":"2) you register hostA: ip2"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"if we deleted by ip1, and ip2 before updating the new hostA:ip2,"},{"line_number":22,"context_line":"and another hostB registers with ip1 in the middle, the new hostB:ip1"},{"line_number":23,"context_line":"would be deleted."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_155869f9","line":21,"in_reply_to":"fa32b979_74df5469","updated":"2015-06-24 07:55:26.000000000","message":"I have rewritten the whole thing, I hope it looks better now.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":18,"context_line":"1) we have hostA: ip1"},{"line_number":19,"context_line":"2) you register hostA: ip2"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"if we deleted by ip1, and ip2 before updating the new hostA:ip2,"},{"line_number":22,"context_line":"and another hostB registers with ip1 in the middle, the new hostB:ip1"},{"line_number":23,"context_line":"would be deleted."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_71e9a6e5","line":21,"in_reply_to":"fa32b979_b1b891c9","updated":"2015-06-17 13:45:43.000000000","message":"Probably I was using too much context on my \"english\".\n\nIf we deleted DB entries by ip1, and ip2 ....","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":19,"context_line":"2) you register hostA: ip2"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"if we deleted by ip1, and ip2 before updating the new hostA:ip2,"},{"line_number":22,"context_line":"and another hostB registers with ip1 in the middle, the new hostB:ip1"},{"line_number":23,"context_line":"would be deleted."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I04d08d5b82ce9911f3af555b5776fc9823e0e5b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_11c13a54","line":22,"updated":"2015-06-17 13:45:43.000000000","message":"registers \u003d registered..","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"577f2a02d9bc1cdaad9d918c4fc38b055fe3391c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change I75c6581fcc9f47a68bde29cbefcaa1a2a082344e introduced"},{"line_number":10,"context_line":"a bug where host name changes broke tunneling endpoint updates."},{"line_number":11,"context_line":"Tunneling endpoint updates changing roaming a hostname from IP"},{"line_number":12,"context_line":"to IP are a common method for active/passive HA with pacemaker"},{"line_number":13,"context_line":"and should happen automatically without the need for API/CLI"},{"line_number":14,"context_line":"calls [1]."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"ba15a1d1_d3b138e1","line":11,"updated":"2015-09-18 16:19:50.000000000","message":"I guess the word \u0027changing\u0027 can be removed?","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9b0cb40badfeb235ac3aac83f2a509724beb4455","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change I75c6581fcc9f47a68bde29cbefcaa1a2a082344e introduced"},{"line_number":10,"context_line":"a bug where host name changes broke tunneling endpoint updates."},{"line_number":11,"context_line":"Tunneling endpoint updates changing roaming a hostname from IP"},{"line_number":12,"context_line":"to IP are a common method for active/passive HA with pacemaker"},{"line_number":13,"context_line":"and should happen automatically without the need for API/CLI"},{"line_number":14,"context_line":"calls [1]."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"ba15a1d1_1448d02c","line":11,"in_reply_to":"ba15a1d1_d3b138e1","updated":"2015-09-21 21:30:39.000000000","message":"Done","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"}],"neutron/plugins/ml2/drivers/type_tunnel.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d20371c24b205850fed78f29ebd8b50aa60d478a","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            #    it is an upgrade case."},{"line_number":274,"context_line":"            # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":275,"context_line":"            #    found, delete the endpoint belonging to that host and"},{"line_number":276,"context_line":"            #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":277,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":278,"context_line":"            if host:"},{"line_number":279,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_3b829d53","line":276,"updated":"2015-06-12 09:08:55.000000000","message":"imo, the first step is to decide/explain how we ensure that the endpoint chosen by an agent will not be used updated/reused by an other agent ... currently it\u0027s unclear and i don\u0027t know how we can ensure to avoid race conditions without the first step.","commit_id":"1518c10b91f666885e274635a2fc5ed31dec9103"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4eab56b64c6b61fcbb99dde16d8ecd5b53fd16b","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            #    it is an upgrade case."},{"line_number":274,"context_line":"            # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":275,"context_line":"            #    found, delete the endpoint belonging to that host and"},{"line_number":276,"context_line":"            #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":277,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":278,"context_line":"            if host:"},{"line_number":279,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_499c7369","line":276,"in_reply_to":"1af86dd1_3b829d53","updated":"2015-06-12 10:17:23.000000000","message":"I think what we want to do is just to track relationships between host and endpoint IP, and we are not trying to guard some change in endpoint IP or hostname.\n\nThe original problem is that we would like to clean up unused tunnel endpoint IP addresses to avoid unnecessary tunnel connections. In my understanding, the intention of the original patch is to allow operators to remove tunnel endpoint IP address (by a handy way like agent-delete \u003chost\u003e) without touching DB table directly.","commit_id":"1518c10b91f666885e274635a2fc5ed31dec9103"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"07d9617ba131aff45916b3e182d05652cdb9483b","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            #    it is an upgrade case."},{"line_number":274,"context_line":"            # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":275,"context_line":"            #    found, delete the endpoint belonging to that host and"},{"line_number":276,"context_line":"            #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":277,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":278,"context_line":"            if host:"},{"line_number":279,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_4917d3ed","line":276,"in_reply_to":"1af86dd1_3b829d53","updated":"2015-06-12 10:11:09.000000000","message":"I\u0027d avoid that by checking local_ip on the agent itself.\n\nStill, the admin could create IP collisions on it\u0027s net, and that would make it fail regardless of this check.","commit_id":"1518c10b91f666885e274635a2fc5ed31dec9103"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4eab56b64c6b61fcbb99dde16d8ecd5b53fd16b","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":275,"context_line":"            #    found, delete the endpoint belonging to that host and"},{"line_number":276,"context_line":"            #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":277,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":278,"context_line":"            if host:"},{"line_number":279,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":280,"context_line":"                ip_endpoint \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_29ddb714","line":277,"updated":"2015-06-12 10:17:23.000000000","message":"According to the discussion here, this case also happens when\nlocal_ip is migrated to another host (in HA case).","commit_id":"1518c10b91f666885e274635a2fc5ed31dec9103"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"0ea77b455fa6aac4902f521b7adb62a55364a9bb","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                        _LW(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":288,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"},{"line_number":289,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":290,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":291,"context_line":"                elif (host_endpoint and host_endpoint.ip_address !\u003d tunnel_ip):"},{"line_number":292,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":293,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_328ad764","line":290,"updated":"2015-06-11 11:46:11.000000000","message":"It is not correct, it\u0027s a corner case. How could we reuse the tunnel_ip used by some XYZ host or ensure it\u0027s a valid host coming with different name using the used IP :)\n\nRefer this:\nhttps://bugs.launchpad.net/python-neutronclient/+bug/1381664","commit_id":"1518c10b91f666885e274635a2fc5ed31dec9103"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e4eab56b64c6b61fcbb99dde16d8ecd5b53fd16b","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                        _LW(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":288,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"},{"line_number":289,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":290,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":291,"context_line":"                elif (host_endpoint and host_endpoint.ip_address !\u003d tunnel_ip):"},{"line_number":292,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":293,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_fefd136f","line":290,"in_reply_to":"3afb71cf_0b9afec5","updated":"2015-06-12 10:17:23.000000000","message":"I agree with Miguel.\n\nWe need to allow various use cases (like HA cases which Miguel says). I think warning logs helps us (we have a lots of noisy logs now, but it is a different topic).\nToo strict checking can break existing deployments without any reasonable reason and we need to consider a balance carefully.\n\nIn addition, this kind of mistake should be prevented via another layer, for example, CMDB or similar inventory system.","commit_id":"1518c10b91f666885e274635a2fc5ed31dec9103"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"a3ae91d4b393773821959ec5e8538d63a6ca537d","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                        _LW(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":288,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"},{"line_number":289,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":290,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":291,"context_line":"                elif (host_endpoint and host_endpoint.ip_address !\u003d tunnel_ip):"},{"line_number":292,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":293,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_c4505e0d","line":290,"in_reply_to":"3afb71cf_328ad764","updated":"2015-06-11 13:37:53.000000000","message":"host doesn\u0027t need to be a valid hostname by any mean.\n\nIt\u0027s generally used in HA deployments to specify a virtual hostname able to roam across hosts via the [DEFAULT] host\u003d parameter of neutron.con\n\nThis breaks known HA use cases, and updates need to happen automatically, IMHO a simple log entry should be enough in such case.\n\nWhat kind of corner case are you trying to prevent? May be we need to look as such corner case and prevent properly without breaking A/P HA.","commit_id":"1518c10b91f666885e274635a2fc5ed31dec9103"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e636b695c1da67e589cb9fc58fff77ea6c07a6c0","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                        _LW(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":288,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"},{"line_number":289,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":290,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":291,"context_line":"                elif (host_endpoint and host_endpoint.ip_address !\u003d tunnel_ip):"},{"line_number":292,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":293,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_0b9afec5","line":290,"in_reply_to":"3afb71cf_ad978539","updated":"2015-06-11 19:57:50.000000000","message":"So, what you try to prevent is admin mistake when setting local_ip to a wrong IP address.\n\nShouldn\u0027t that check belong more into the agent making sure that \"local_ip\" is really available in the machine before sending the tunnel update or otherwise waiting until that happens?\n\nWe need to find a compromise that doesn\u0027t break the host name roaming for HA, and I understand your concern.\n\nDoes my suggestion make sense?\n\nWe cannot break existing use cases/functionalities to protect from admin mistakes. In the end, admin has LOTs of ways of shooting himself on the feet :)","commit_id":"1518c10b91f666885e274635a2fc5ed31dec9103"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"8c10e208981c989cd2b2e481f0efd07f7946cb83","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                        _LW(\"Tunnel IP %(ip)s in use with host %(host)s\"),"},{"line_number":288,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"},{"line_number":289,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":290,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":291,"context_line":"                elif (host_endpoint and host_endpoint.ip_address !\u003d tunnel_ip):"},{"line_number":292,"context_line":"                    # Notify all other listening agents to delete stale tunnels"},{"line_number":293,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_ad978539","line":290,"in_reply_to":"3afb71cf_c4505e0d","updated":"2015-06-11 14:55:59.000000000","message":"Let me put my concern in a simple way and I would like to hear an answer for that:\n\nA cloud having CN1 with agent A having tunnel IP (10.0.0.2, HOSTA),\nNN with agent B having tunnel IP (10.0.0.3, HOSTB) and both CN1 and NN have tunnels established between them and everything works fine.\n\nAfter, some days an Admin introduced a new machine CN2 with agent C having tunnel IP( 10.0.0.2, HOST C) to the same cloud.\n\nI know it\u0027s a mistake that Admin is doing by using a same tunnel IP used with HOSTA on CN1 which could lead to an erroneous condition in the cloud.  \n\nwhats your opinion on preventing this happening?\n\nIf I look at your patch it looks like you are simply deleting the tunnel ip endpoint which already used by HOSTA instead of preventing it and adding it for HOST C which is feel is not correct.\n\nNevermind :)","commit_id":"1518c10b91f666885e274635a2fc5ed31dec9103"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"264922460371fd318c9d37403f8d29e901d91e4e","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"TUNNEL \u003d \u0027tunnel\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class TunnelTypeDriver(helpers.SegmentTypeDriver):"},{"line_number":35,"context_line":"    \"\"\"Define stable abstract interface for ML2 type drivers."},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_1dfae875","line":33,"updated":"2015-06-16 12:56:04.000000000","message":"Do you by chance know why we have Tunnel and EndpointTunnel driver classes as separate types?","commit_id":"a42e3b30ab52e139bac209894a2cfa13c5a84513"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"329eeb1a0f50e6ddce42157d9d4d2dfe248cd0dd","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"TUNNEL \u003d \u0027tunnel\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class TunnelTypeDriver(helpers.SegmentTypeDriver):"},{"line_number":35,"context_line":"    \"\"\"Define stable abstract interface for ML2 type drivers."},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_a0386fa1","line":33,"in_reply_to":"fa32b979_1dfae875","updated":"2015-06-16 12:59:46.000000000","message":"I separate them because TunnelTypeDriver is considered as \"stable\" (docstring) and Tunnel/EndpointTunnel have different signature for __init__","commit_id":"a42e3b30ab52e139bac209894a2cfa13c5a84513"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"264922460371fd318c9d37403f8d29e901d91e4e","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_3d748ccd","line":255,"updated":"2015-06-16 12:56:04.000000000","message":"Hm. For what I see in endpoint models for gre and vxlan, host is nullable. So you can have multiple entries for different agents with different ips and identical host names (f.e. empty).\n\nAm I missing smth?","commit_id":"a42e3b30ab52e139bac209894a2cfa13c5a84513"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b4e9d872f4e351a19cabe4c567eddcb02a22a3af","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_20a53fa1","line":255,"in_reply_to":"fa32b979_3d748ccd","updated":"2015-06-16 13:07:42.000000000","message":"I got a very confusing exception when I wasn\u0027t doing delete_endpoint_by_host_or_ip, where the two hostnames were inserted twice, thus getting an error when trying to session.query for ip_address\u003dip.\n\nThe \"DBDuplicateEntry\" was for the hostname, but, I was trying to then get by an ip_address which didn\u0027t exist...\n\nI simplified the warning to get something more foolproof (being fool me...)  even if host or ip can be printed as None in some case.","commit_id":"a42e3b30ab52e139bac209894a2cfa13c5a84513"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"264922460371fd318c9d37403f8d29e901d91e4e","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":311,"context_line":"                    # HA: The neutron host-id has roamed to a different IP, we"},{"line_number":312,"context_line":"                    # don\u0027t need to notify for tunnel_delete, and then"},{"line_number":313,"context_line":"                    # then and endpoint to the same address"},{"line_number":314,"context_line":"                    # We delete any DB entry with the hostname, or the new IP"},{"line_number":315,"context_line":"                    # address for the hostname."},{"line_number":316,"context_line":"                    driver.obj.delete_endpoint_by_host_or_ip("}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_bd35fcf7","line":313,"updated":"2015-06-16 12:56:04.000000000","message":"then then and???","commit_id":"a42e3b30ab52e139bac209894a2cfa13c5a84513"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b4e9d872f4e351a19cabe4c567eddcb02a22a3af","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":311,"context_line":"                    # HA: The neutron host-id has roamed to a different IP, we"},{"line_number":312,"context_line":"                    # don\u0027t need to notify for tunnel_delete, and then"},{"line_number":313,"context_line":"                    # then and endpoint to the same address"},{"line_number":314,"context_line":"                    # We delete any DB entry with the hostname, or the new IP"},{"line_number":315,"context_line":"                    # address for the hostname."},{"line_number":316,"context_line":"                    driver.obj.delete_endpoint_by_host_or_ip("}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_80b44bd1","line":313,"in_reply_to":"fa32b979_bd35fcf7","updated":"2015-06-16 13:07:42.000000000","message":"LOL, and then then? :D\n\nI\u0027ll fix... ;)","commit_id":"a42e3b30ab52e139bac209894a2cfa13c5a84513"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ad4fd265b1418b398a099928fe5069ffbc4a2222","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_3129e1e6","line":255,"updated":"2015-06-17 13:35:47.000000000","message":"I still don\u0027t follow how duplicate hosts can result in DuplicateEntry exception. host field is not marked for uniqueness for gre or vxlan.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"eff2722362d8a61f9ef4495dab2ebf812a2a34a0","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_148fe82a","line":255,"in_reply_to":"fa32b979_11961a3f","updated":"2015-06-17 13:54:17.000000000","message":"I\u0027m sorry I don\u0027t follow what I need to change to where to see what\u0027s going on.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"0a5431aa36cdf4c02e93f11ce699dfb09cb11be4","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_27c5518d","line":255,"in_reply_to":"fa32b979_148fe82a","updated":"2015-06-24 07:55:26.000000000","message":"I will try to put a separate patch reproducing it as time allows :)","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_11961a3f","line":255,"in_reply_to":"fa32b979_3129e1e6","updated":"2015-06-17 13:45:43.000000000","message":"I know, but you will find it if you change delete_endpoint_by_host_or_ip to the delete_endpoint_by_ip for the new IP, and then run the current unit tests without this change..\n\nTry it ! ;)","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ad4fd265b1418b398a099928fe5069ffbc4a2222","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                    and host_endpoint is None):"},{"line_number":304,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":305,"context_line":"                elif (ip_endpoint and ip_endpoint.host !\u003d host):"},{"line_number":306,"context_line":"                    LOG.warning("},{"line_number":307,"context_line":"                        _LW(\"Tunnel IP %(ip)s in use with host %(host)s, \""},{"line_number":308,"context_line":"                            \"this is OK if the host name was roamed for HA\"),"},{"line_number":309,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_316b21b9","line":306,"updated":"2015-06-17 13:35:47.000000000","message":"If we consider it a usual situation, we should lower the log level to e.g. info. Also, just update the user that the hostname roamed to another IP address, don\u0027t excuse.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                    and host_endpoint is None):"},{"line_number":304,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":305,"context_line":"                elif (ip_endpoint and ip_endpoint.host !\u003d host):"},{"line_number":306,"context_line":"                    LOG.warning("},{"line_number":307,"context_line":"                        _LW(\"Tunnel IP %(ip)s in use with host %(host)s, \""},{"line_number":308,"context_line":"                            \"this is OK if the host name was roamed for HA\"),"},{"line_number":309,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_71cc466a","line":306,"in_reply_to":"fa32b979_316b21b9","updated":"2015-06-17 13:45:43.000000000","message":"It\u0027s not going to be an usual situation, it\u0027s a host failover. Don\u0027t that deserve a warning?\n\nShall we lower to INFO?","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8167793c06ff5be2ceef3e435d64298c3aa5277d","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                    and host_endpoint is None):"},{"line_number":304,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":305,"context_line":"                elif (ip_endpoint and ip_endpoint.host !\u003d host):"},{"line_number":306,"context_line":"                    LOG.warning("},{"line_number":307,"context_line":"                        _LW(\"Tunnel IP %(ip)s in use with host %(host)s, \""},{"line_number":308,"context_line":"                            \"this is OK if the host name was roamed for HA\"),"},{"line_number":309,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_f42da446","line":306,"in_reply_to":"fa32b979_71cc466a","updated":"2015-06-17 13:53:04.000000000","message":"It\u0027s a warning for HA manager, not neutron-server. I doubt it does not already warn.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"0a5431aa36cdf4c02e93f11ce699dfb09cb11be4","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                    and host_endpoint is None):"},{"line_number":304,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":305,"context_line":"                elif (ip_endpoint and ip_endpoint.host !\u003d host):"},{"line_number":306,"context_line":"                    LOG.warning("},{"line_number":307,"context_line":"                        _LW(\"Tunnel IP %(ip)s in use with host %(host)s, \""},{"line_number":308,"context_line":"                            \"this is OK if the host name was roamed for HA\"),"},{"line_number":309,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_7508d5d9","line":306,"in_reply_to":"fa32b979_f42da446","updated":"2015-06-24 07:55:26.000000000","message":"Done","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ad4fd265b1418b398a099928fe5069ffbc4a2222","unresolved":false,"context_lines":[{"line_number":308,"context_line":"                            \"this is OK if the host name was roamed for HA\"),"},{"line_number":309,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"},{"line_number":310,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":311,"context_line":"                    # HA: The neutron host-id has roamed to a different IP, we"},{"line_number":312,"context_line":"                    # don\u0027t need to notify for tunnel_delete for this IP"},{"line_number":313,"context_line":"                    # or the old one, an ovs-cleanup should handle the cleanup"},{"line_number":314,"context_line":"                    # in that use case, and we don\u0027t want to trigger race"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_acbcb6dc","line":311,"updated":"2015-06-17 13:35:47.000000000","message":"It\u0027s not strictly HA. User could just start another l3 agent on some other node, reusing the same IP address.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"0a5431aa36cdf4c02e93f11ce699dfb09cb11be4","unresolved":false,"context_lines":[{"line_number":308,"context_line":"                            \"this is OK if the host name was roamed for HA\"),"},{"line_number":309,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"},{"line_number":310,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":311,"context_line":"                    # HA: The neutron host-id has roamed to a different IP, we"},{"line_number":312,"context_line":"                    # don\u0027t need to notify for tunnel_delete for this IP"},{"line_number":313,"context_line":"                    # or the old one, an ovs-cleanup should handle the cleanup"},{"line_number":314,"context_line":"                    # in that use case, and we don\u0027t want to trigger race"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_d5f9a1c9","line":311,"in_reply_to":"fa32b979_51ed82b5","updated":"2015-06-24 07:55:26.000000000","message":"Done","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":308,"context_line":"                            \"this is OK if the host name was roamed for HA\"),"},{"line_number":309,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"},{"line_number":310,"context_line":"                         \u0027host\u0027: ip_endpoint.host})"},{"line_number":311,"context_line":"                    # HA: The neutron host-id has roamed to a different IP, we"},{"line_number":312,"context_line":"                    # don\u0027t need to notify for tunnel_delete for this IP"},{"line_number":313,"context_line":"                    # or the old one, an ovs-cleanup should handle the cleanup"},{"line_number":314,"context_line":"                    # in that use case, and we don\u0027t want to trigger race"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_51ed82b5","line":311,"in_reply_to":"fa32b979_acbcb6dc","updated":"2015-06-17 13:45:43.000000000","message":"True, I will rephrase those comments, or... I can remove them as they\u0027re associated to the commit-message with it\u0027s (will be) self explaining","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"3a6d6d293815a54f6b2aa5ccb4db329f0f9ab581","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_05b3229b","line":254,"updated":"2015-06-24 11:46:49.000000000","message":"Not sure why you have removed the search query, it may break the legacy mode where host info is not passed from an agent.","commit_id":"bedec7c0d92c4ac45490b33954f33b6049ee4c71"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"db5c72ddc8207d77ad77418ec468cacae0f90e37","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_473839d3","line":254,"in_reply_to":"fa32b979_05b3229b","updated":"2015-06-24 18:24:51.000000000","message":"It seems you missed to reply.","commit_id":"bedec7c0d92c4ac45490b33954f33b6049ee4c71"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"62dbc4901f3e99acd6d5f21270f2ce9cae5faedf","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":295,"context_line":"            #    found, delete the endpoint belonging to that host and"},{"line_number":296,"context_line":"            #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":297,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":298,"context_line":"            if host:"},{"line_number":299,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":300,"context_line":"                ip_endpoint \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_ffbfb4cd","line":297,"updated":"2015-06-24 09:44:16.000000000","message":"I think it is better to add description for the new case.","commit_id":"bedec7c0d92c4ac45490b33954f33b6049ee4c71"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"892f1a2eaae56d8f1f214407b45cf5ff4466c320","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            # 4. If passed host is found in DB and passed tunnel ip is not"},{"line_number":295,"context_line":"            #    found, delete the endpoint belonging to that host and"},{"line_number":296,"context_line":"            #    add endpoint with latest (tunnel_ip, host), it is a case"},{"line_number":297,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":298,"context_line":"            if host:"},{"line_number":299,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":300,"context_line":"                ip_endpoint \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_bc42973c","line":297,"in_reply_to":"fa32b979_ffbfb4cd","updated":"2015-06-24 10:11:00.000000000","message":"Thanks shihanzhang, you\u0027re right!","commit_id":"bedec7c0d92c4ac45490b33954f33b6049ee4c71"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"3a6d6d293815a54f6b2aa5ccb4db329f0f9ab581","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                    # and we shall not do it on the old one, because that"},{"line_number":315,"context_line":"                    # could introduce race conditions if another host took"},{"line_number":316,"context_line":"                    # the IP while we were roaming this one. We should use"},{"line_number":317,"context_line":"                    # neutron-ovs-cleanup in such situation."},{"line_number":318,"context_line":"                    driver.obj.delete_endpoint_by_host_or_ip("},{"line_number":319,"context_line":"                        host, ip_endpoint.ip_address)"},{"line_number":320,"context_line":"                elif (host_endpoint and host_endpoint.ip_address !\u003d tunnel_ip):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_e552be66","line":317,"updated":"2015-06-24 11:46:49.000000000","message":"Better to move these comments from here and add it at L297.","commit_id":"bedec7c0d92c4ac45490b33954f33b6049ee4c71"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"a9bcd90aac04cda97d72f5243b5597db21eb0009","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_b5d35603","line":254,"updated":"2015-06-25 09:37:21.000000000","message":"@Miguel: One more question \n\nNot sure why you have removed the search query, it may break the legacy mode where host info is not passed from an agent.","commit_id":"bdede27ed76b156364fc9e580e324caf39a4bd34"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3617ca0b06890db1dad754987e571f0216bee2e5","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            endpoint \u003d self.endpoint_model(ip_address\u003dip, host\u003dhost, **kwargs)"},{"line_number":253,"context_line":"            endpoint.save(session)"},{"line_number":254,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":255,"context_line":"            LOG.warning(_LW(\"Endpoint with ip %(ip)s or host %(host)s already \""},{"line_number":256,"context_line":"                            \"exists\"), {\u0027ip\u0027: ip, \u0027host\u0027: host})"},{"line_number":257,"context_line":"        return endpoint"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_3b4f376c","line":254,"in_reply_to":"fa32b979_b5d35603","updated":"2015-06-25 09:57:20.000000000","message":"I found that in some cases during unit testing (probably not happening now) the DBDuplicateEntry was raised because of a duplicated host name (while there seems to be no restriction for duplicates in the host name?)..\n\nThen when that happened, filter_by(ip_address\u003dip) returned None, and .one() could not be called on None. Which resulted in a very ugly crash.\n\nI thought that just a warning with the ip and host (which could be None) was ok, but you\u0027re right : we have a \"return endpoint\" at the end.\n\nThanks for catching this, I will roll back the change and see if the None.one() exception is not reproducing again... or otherwise amend the code to handle all the cases.\n\nBest,\nMiguel Ángel.","commit_id":"bdede27ed76b156364fc9e580e324caf39a4bd34"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8d59791fd7a058a7d1803ee7b4fc367b21739904","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                    # and we shall not do it on the old one, because that"},{"line_number":321,"context_line":"                    # could introduce race conditions if another host took"},{"line_number":322,"context_line":"                    # the IP while we were roaming this one. We should use"},{"line_number":323,"context_line":"                    # neutron-ovs-cleanup in such situation."},{"line_number":324,"context_line":"                    driver.obj.delete_endpoint_by_host_or_ip("},{"line_number":325,"context_line":"                        host, ip_endpoint.ip_address)"},{"line_number":326,"context_line":"                elif (host_endpoint and host_endpoint.ip_address !\u003d tunnel_ip):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_d2094585","line":323,"updated":"2015-06-25 12:48:36.000000000","message":"I thought I had removed this paragraph... hmm..","commit_id":"bdede27ed76b156364fc9e580e324caf39a4bd34"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0ebe474348b257754b8f1363bd01e26942d24981","unresolved":false,"context_lines":[{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def delete_endpoint_by_host_or_ip(self, host, ip):"},{"line_number":234,"context_line":"        LOG.debug(\"delete_endpoint_by_host_or_ip() called for \""},{"line_number":235,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":236,"context_line":"        session \u003d db_api.get_session()"},{"line_number":237,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":238,"context_line":"            (session.query(self.endpoint_model)."}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_86e47fac","line":235,"updated":"2015-06-28 10:22:52.000000000","message":"well, technically it\u0027s not \u0027or\u0027, but \u0027and\u0027.","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cf3e807b186f7426a2771a6280cfc142d48c3557","unresolved":false,"context_lines":[{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def delete_endpoint_by_host_or_ip(self, host, ip):"},{"line_number":234,"context_line":"        LOG.debug(\"delete_endpoint_by_host_or_ip() called for \""},{"line_number":235,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":236,"context_line":"        session \u003d db_api.get_session()"},{"line_number":237,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":238,"context_line":"            (session.query(self.endpoint_model)."}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_a652e333","line":235,"in_reply_to":"fa32b979_86e47fac","updated":"2015-06-28 18:02:46.000000000","message":"couldn\u0027t \"and\" mean, that you delete an endpoint with a certain host AND ip ? instead of any of them? :)\n\nlogic logic! \u0027:D","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a8d1fd604b0ebf6de6f0166618c76013d1686932","unresolved":false,"context_lines":[{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def delete_endpoint_by_host_or_ip(self, host, ip):"},{"line_number":234,"context_line":"        LOG.debug(\"delete_endpoint_by_host_or_ip() called for \""},{"line_number":235,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":236,"context_line":"        session \u003d db_api.get_session()"},{"line_number":237,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":238,"context_line":"            (session.query(self.endpoint_model)."}],"source_content_type":"text/x-python","patch_set":11,"id":"ba3cc151_28b18147","line":235,"in_reply_to":"fa32b979_a652e333","updated":"2015-07-08 09:43:35.000000000","message":"AND would be\n\n session.query(self.endpoint_model).filter_by(host\u003dhost, ip_address\u003dip).delete()","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"ef08872768ea4ce90e09bd1f31424322876a0fe2","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":236,"context_line":"        session \u003d db_api.get_session()"},{"line_number":237,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":238,"context_line":"            (session.query(self.endpoint_model)."},{"line_number":239,"context_line":"             filter_by(host\u003dhost).delete())"},{"line_number":240,"context_line":"            (session.query(self.endpoint_model)."},{"line_number":241,"context_line":"             filter_by(ip_address\u003dip).delete())"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba3cc151_5cea8a75","line":238,"updated":"2015-07-08 08:56:00.000000000","message":"Maybe it\u0027s just me but would be following more readable?\n\n session.query(\n     self.endpoint_model).filter_by(\n         host\u003dhost).delete()\n session.query(\n     self.endpoint_model).filter_by(\n         ip_address\u003dip).delete()","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fd7f16a9109b80ab7e527227fff9b7ce880de1fe","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":236,"context_line":"        session \u003d db_api.get_session()"},{"line_number":237,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":238,"context_line":"            (session.query(self.endpoint_model)."},{"line_number":239,"context_line":"             filter_by(host\u003dhost).delete())"},{"line_number":240,"context_line":"            (session.query(self.endpoint_model)."},{"line_number":241,"context_line":"             filter_by(ip_address\u003dip).delete())"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_863392f5","line":238,"in_reply_to":"ba3cc151_414b6cb1","updated":"2015-09-18 10:21:56.000000000","message":"Done in a similar way, more readable, but more compact.","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"742e1da0536836a342cd62d13dcc2b70dde5fe40","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":236,"context_line":"        session \u003d db_api.get_session()"},{"line_number":237,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":238,"context_line":"            (session.query(self.endpoint_model)."},{"line_number":239,"context_line":"             filter_by(host\u003dhost).delete())"},{"line_number":240,"context_line":"            (session.query(self.endpoint_model)."},{"line_number":241,"context_line":"             filter_by(ip_address\u003dip).delete())"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba3cc151_414b6cb1","line":238,"in_reply_to":"ba3cc151_5cea8a75","updated":"2015-07-08 16:09:57.000000000","message":"+1","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"742e1da0536836a342cd62d13dcc2b70dde5fe40","unresolved":false,"context_lines":[{"line_number":298,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":299,"context_line":"            # 5. If the passed host had another ip in the DB the host-id has"},{"line_number":300,"context_line":"            #    roamed to a different IP. Delete any reference to the new"},{"line_number":301,"context_line":"            #    local_ip or the host id. Don\u0027t notify tunnel_delete for the"},{"line_number":302,"context_line":"            #    old IP since that one could have been taken by a different"},{"line_number":303,"context_line":"            #    agent host-id (neutron-ovs-cleanup should be used for that)."},{"line_number":304,"context_line":"            #    Finally create a new endpoimt for the (tunnel_ip, host)."}],"source_content_type":"text/x-python","patch_set":11,"id":"ba3cc151_93530716","line":301,"updated":"2015-07-08 16:09:57.000000000","message":"but in this case is definitely \"and\" . \"delete any reference to the new local_ip and to the host id\"","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fd7f16a9109b80ab7e527227fff9b7ce880de1fe","unresolved":false,"context_lines":[{"line_number":298,"context_line":"            #    where local_ip of an agent got changed."},{"line_number":299,"context_line":"            # 5. If the passed host had another ip in the DB the host-id has"},{"line_number":300,"context_line":"            #    roamed to a different IP. Delete any reference to the new"},{"line_number":301,"context_line":"            #    local_ip or the host id. Don\u0027t notify tunnel_delete for the"},{"line_number":302,"context_line":"            #    old IP since that one could have been taken by a different"},{"line_number":303,"context_line":"            #    agent host-id (neutron-ovs-cleanup should be used for that)."},{"line_number":304,"context_line":"            #    Finally create a new endpoimt for the (tunnel_ip, host)."}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_9b00cb03","line":301,"in_reply_to":"ba3cc151_93530716","updated":"2015-09-18 10:21:56.000000000","message":"I used \"then delete any...\" I hope it sounds good.\n\nDone.","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0ebe474348b257754b8f1363bd01e26942d24981","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            #    roamed to a different IP. Delete any reference to the new"},{"line_number":301,"context_line":"            #    local_ip or the host id. Don\u0027t notify tunnel_delete for the"},{"line_number":302,"context_line":"            #    old IP since that one could have been taken by a different"},{"line_number":303,"context_line":"            #    agent host-id (neutron-ovs-cleanup should be used for that)."},{"line_number":304,"context_line":"            #    Finally create a new endpoimt for the (tunnel_ip, host)."},{"line_number":305,"context_line":"            if host:"},{"line_number":306,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_a6a4234b","line":303,"updated":"2015-06-28 10:22:52.000000000","message":"for that \u003d\u003e to clean up stale endpoints","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fd7f16a9109b80ab7e527227fff9b7ce880de1fe","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            #    roamed to a different IP. Delete any reference to the new"},{"line_number":301,"context_line":"            #    local_ip or the host id. Don\u0027t notify tunnel_delete for the"},{"line_number":302,"context_line":"            #    old IP since that one could have been taken by a different"},{"line_number":303,"context_line":"            #    agent host-id (neutron-ovs-cleanup should be used for that)."},{"line_number":304,"context_line":"            #    Finally create a new endpoimt for the (tunnel_ip, host)."},{"line_number":305,"context_line":"            if host:"},{"line_number":306,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_66051e0f","line":303,"in_reply_to":"fa32b979_063aafe7","updated":"2015-09-18 10:21:56.000000000","message":"Done","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cf3e807b186f7426a2771a6280cfc142d48c3557","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            #    roamed to a different IP. Delete any reference to the new"},{"line_number":301,"context_line":"            #    local_ip or the host id. Don\u0027t notify tunnel_delete for the"},{"line_number":302,"context_line":"            #    old IP since that one could have been taken by a different"},{"line_number":303,"context_line":"            #    agent host-id (neutron-ovs-cleanup should be used for that)."},{"line_number":304,"context_line":"            #    Finally create a new endpoimt for the (tunnel_ip, host)."},{"line_number":305,"context_line":"            if host:"},{"line_number":306,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_063aafe7","line":303,"in_reply_to":"fa32b979_a6a4234b","updated":"2015-06-28 18:02:46.000000000","message":"more clear, yes. Will change it.","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0ebe474348b257754b8f1363bd01e26942d24981","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            #    local_ip or the host id. Don\u0027t notify tunnel_delete for the"},{"line_number":302,"context_line":"            #    old IP since that one could have been taken by a different"},{"line_number":303,"context_line":"            #    agent host-id (neutron-ovs-cleanup should be used for that)."},{"line_number":304,"context_line":"            #    Finally create a new endpoimt for the (tunnel_ip, host)."},{"line_number":305,"context_line":"            if host:"},{"line_number":306,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":307,"context_line":"                ip_endpoint \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_c6da87e9","line":304,"updated":"2015-06-28 10:22:52.000000000","message":"endpoint","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fd7f16a9109b80ab7e527227fff9b7ce880de1fe","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            #    local_ip or the host id. Don\u0027t notify tunnel_delete for the"},{"line_number":302,"context_line":"            #    old IP since that one could have been taken by a different"},{"line_number":303,"context_line":"            #    agent host-id (neutron-ovs-cleanup should be used for that)."},{"line_number":304,"context_line":"            #    Finally create a new endpoimt for the (tunnel_ip, host)."},{"line_number":305,"context_line":"            if host:"},{"line_number":306,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":307,"context_line":"                ip_endpoint \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_0608e226","line":304,"in_reply_to":"fa32b979_263d73dd","updated":"2015-09-18 10:21:56.000000000","message":"Done","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cf3e807b186f7426a2771a6280cfc142d48c3557","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            #    local_ip or the host id. Don\u0027t notify tunnel_delete for the"},{"line_number":302,"context_line":"            #    old IP since that one could have been taken by a different"},{"line_number":303,"context_line":"            #    agent host-id (neutron-ovs-cleanup should be used for that)."},{"line_number":304,"context_line":"            #    Finally create a new endpoimt for the (tunnel_ip, host)."},{"line_number":305,"context_line":"            if host:"},{"line_number":306,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"},{"line_number":307,"context_line":"                ip_endpoint \u003d driver.obj.get_endpoint_by_ip(tunnel_ip)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_263d73dd","line":304,"in_reply_to":"fa32b979_c6da87e9","updated":"2015-06-28 18:02:46.000000000","message":"whoops :)","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fa1762ccd7f2cc3dec21fc90858af9231e4574dd","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        \"\"\""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @abc.abstractmethod"},{"line_number":107,"context_line":"    def delete_endpoint_by_host_or_ip(self, host, ip):"},{"line_number":108,"context_line":"        \"\"\"Delete the endpoint in the type_driver database."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        This function will delete any endpoint matching the specified"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_5e1457e7","line":107,"updated":"2015-09-18 13:48:55.000000000","message":"iirc, we should document such change in devref as out-of-tree drviers can provides their own ml2 type drivers?","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8eb7924f1d9cacf7793fcb5adf7538eb14912e84","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        \"\"\""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @abc.abstractmethod"},{"line_number":107,"context_line":"    def delete_endpoint_by_host_or_ip(self, host, ip):"},{"line_number":108,"context_line":"        \"\"\"Delete the endpoint in the type_driver database."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        This function will delete any endpoint matching the specified"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_80fb4147","line":107,"in_reply_to":"ba15a1d1_5e1457e7","updated":"2015-09-21 09:53:27.000000000","message":"There\u0027s no documentation for this API in devref, and the API is well documented in this class itself by docstrings.\n\n    [vagrant@devstack neutron]$ grep -R get_endpoint doc/source/devref/\n    [vagrant@devstack neutron]$\n\nI\u0027m not against writing a devref to explain how this mechanism can be reused by ML2 drivers, but I believe:\n\n1) it\u0027s out of scope of a bug fix, and, \n\n2) I\u0027m not the best person to write about it, because I\u0027m unsure about how out-of-tree drivers would make use of this exactly.","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"283ddbf38d214bce7e44e08a856f02fa0a5cc832","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        \"\"\""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @abc.abstractmethod"},{"line_number":107,"context_line":"    def delete_endpoint_by_host_or_ip(self, host, ip):"},{"line_number":108,"context_line":"        \"\"\"Delete the endpoint in the type_driver database."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        This function will delete any endpoint matching the specified"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_34185084","line":107,"in_reply_to":"ba15a1d1_80fb4147","updated":"2015-09-21 21:53:17.000000000","message":"Well, it broke the cisco nexus driver. :(","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"1024891bffa3b62bc1e1b6879d2c73642b00d6f1","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":283,"context_line":"        session \u003d db_api.get_session()"},{"line_number":284,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":285,"context_line":"            session.query("},{"line_number":286,"context_line":"                self.endpoint_model).filter_by(host\u003dhost).delete()"},{"line_number":287,"context_line":"            session.query("},{"line_number":288,"context_line":"                self.endpoint_model).filter_by(ip_address\u003dip).delete()"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_8214d7e8","line":285,"updated":"2015-09-18 13:43:13.000000000","message":"we could use sqlalchemy _or and have only one query","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fa1762ccd7f2cc3dec21fc90858af9231e4574dd","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":283,"context_line":"        session \u003d db_api.get_session()"},{"line_number":284,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":285,"context_line":"            session.query("},{"line_number":286,"context_line":"                self.endpoint_model).filter_by(host\u003dhost).delete()"},{"line_number":287,"context_line":"            session.query("},{"line_number":288,"context_line":"                self.endpoint_model).filter_by(ip_address\u003dip).delete()"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_be5573fa","line":285,"in_reply_to":"ba15a1d1_8214d7e8","updated":"2015-09-18 13:48:55.000000000","message":"+1!","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9b0cb40badfeb235ac3aac83f2a509724beb4455","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":283,"context_line":"        session \u003d db_api.get_session()"},{"line_number":284,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":285,"context_line":"            session.query("},{"line_number":286,"context_line":"                self.endpoint_model).filter_by(host\u003dhost).delete()"},{"line_number":287,"context_line":"            session.query("},{"line_number":288,"context_line":"                self.endpoint_model).filter_by(ip_address\u003dip).delete()"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_d451f8d9","line":285,"in_reply_to":"ba15a1d1_aaf442f0","updated":"2015-09-21 21:30:39.000000000","message":"Done","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"5a0c16febff189fafa9fcb95c98cf59cdb089c45","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":283,"context_line":"        session \u003d db_api.get_session()"},{"line_number":284,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":285,"context_line":"            session.query("},{"line_number":286,"context_line":"                self.endpoint_model).filter_by(host\u003dhost).delete()"},{"line_number":287,"context_line":"            session.query("},{"line_number":288,"context_line":"                self.endpoint_model).filter_by(ip_address\u003dip).delete()"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_dbbceedd","line":285,"in_reply_to":"ba15a1d1_be5573fa","updated":"2015-09-18 17:13:24.000000000","message":"agreed","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"ae43b69873e096f33886ddcf1120636fde9d4f8d","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                  \"host %(host)s or %(ip)s\", {\u0027host\u0027: host, \u0027ip\u0027: ip})"},{"line_number":283,"context_line":"        session \u003d db_api.get_session()"},{"line_number":284,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":285,"context_line":"            session.query("},{"line_number":286,"context_line":"                self.endpoint_model).filter_by(host\u003dhost).delete()"},{"line_number":287,"context_line":"            session.query("},{"line_number":288,"context_line":"                self.endpoint_model).filter_by(ip_address\u003dip).delete()"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_aaf442f0","line":285,"in_reply_to":"ba15a1d1_dbbceedd","updated":"2015-09-18 19:24:14.000000000","message":"+1, thanks.  Not sure what was I thinking about when I wrote such thing...","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"577f2a02d9bc1cdaad9d918c4fc38b055fe3391c","unresolved":false,"context_lines":[{"line_number":359,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":360,"context_line":"                elif (ip_endpoint and ip_endpoint.host !\u003d host):"},{"line_number":361,"context_line":"                    LOG.info("},{"line_number":362,"context_line":"                        _LI(\"Tunnel IP %(ip)s in use with host %(host)s, \""},{"line_number":363,"context_line":"                            \"this is OK if the host name was roamed from IP \""},{"line_number":364,"context_line":"                            \"to IP\"),"},{"line_number":365,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_938740b4","line":362,"updated":"2015-09-18 16:19:50.000000000","message":"I would change this msg a bit...\n\"Tunnel IP IP %(ip)s was used by host %(host)s and will be assigned to host %(new_host)s\"\n\nI was just imagining a situation where for some reasons 2 agents have the same IP, from the logs the operator should understand what\u0027s going on.","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8eb7924f1d9cacf7793fcb5adf7538eb14912e84","unresolved":false,"context_lines":[{"line_number":359,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":360,"context_line":"                elif (ip_endpoint and ip_endpoint.host !\u003d host):"},{"line_number":361,"context_line":"                    LOG.info("},{"line_number":362,"context_line":"                        _LI(\"Tunnel IP %(ip)s in use with host %(host)s, \""},{"line_number":363,"context_line":"                            \"this is OK if the host name was roamed from IP \""},{"line_number":364,"context_line":"                            \"to IP\"),"},{"line_number":365,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_c0f7f98a","line":362,"in_reply_to":"ba15a1d1_938740b4","updated":"2015-09-21 09:53:27.000000000","message":"Thanks for the suggestion Rosella, definitely thats a much better log message. +1000","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9b0cb40badfeb235ac3aac83f2a509724beb4455","unresolved":false,"context_lines":[{"line_number":359,"context_line":"                    driver.obj.delete_endpoint(ip_endpoint.ip_address)"},{"line_number":360,"context_line":"                elif (ip_endpoint and ip_endpoint.host !\u003d host):"},{"line_number":361,"context_line":"                    LOG.info("},{"line_number":362,"context_line":"                        _LI(\"Tunnel IP %(ip)s in use with host %(host)s, \""},{"line_number":363,"context_line":"                            \"this is OK if the host name was roamed from IP \""},{"line_number":364,"context_line":"                            \"to IP\"),"},{"line_number":365,"context_line":"                        {\u0027ip\u0027: ip_endpoint.ip_address,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba15a1d1_745d8ceb","line":362,"in_reply_to":"ba15a1d1_c0f7f98a","updated":"2015-09-21 21:30:39.000000000","message":"Done","commit_id":"d508d29c90d36c28f4e2518615a5891e827be082"}],"neutron/plugins/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"410e6a556ae2656457206dd1a48019d63145cf8c","unresolved":false,"context_lines":[{"line_number":1392,"context_line":"        ip_devices \u003d ip_lib.IPWrapper()"},{"line_number":1393,"context_line":"        if not ip_devices.get_device_by_ip(self.local_ip):"},{"line_number":1394,"context_line":"            raise ValueError(_(\"local_ip (%s) is missconfigured, it\u0027s \""},{"line_number":1395,"context_line":"                               \"not available in the system\") % self.local_ip)"},{"line_number":1396,"context_line":""},{"line_number":1397,"context_line":"    def tunnel_sync(self):"},{"line_number":1398,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_4b60a901","line":1395,"updated":"2015-06-16 12:39:33.000000000","message":"I feel you shouldn\u0027t be doing this.\nKindly refer:\nhttps://review.openstack.org/#/c/154043/","commit_id":"a42e3b30ab52e139bac209894a2cfa13c5a84513"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b4e9d872f4e351a19cabe4c567eddcb02a22a3af","unresolved":false,"context_lines":[{"line_number":1392,"context_line":"        ip_devices \u003d ip_lib.IPWrapper()"},{"line_number":1393,"context_line":"        if not ip_devices.get_device_by_ip(self.local_ip):"},{"line_number":1394,"context_line":"            raise ValueError(_(\"local_ip (%s) is missconfigured, it\u0027s \""},{"line_number":1395,"context_line":"                               \"not available in the system\") % self.local_ip)"},{"line_number":1396,"context_line":""},{"line_number":1397,"context_line":"    def tunnel_sync(self):"},{"line_number":1398,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_403c032f","line":1395,"in_reply_to":"fa32b979_4b60a901","updated":"2015-06-16 13:07:42.000000000","message":"Whoops, I didn\u0027t know about it. Thanks for pointing it out. It seems their approach is more complicated btw, but probably better tested.","commit_id":"a42e3b30ab52e139bac209894a2cfa13c5a84513"}],"neutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ad4fd265b1418b398a099928fe5069ffbc4a2222","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                  \u0027host\u0027: HOST_ONE}"},{"line_number":343,"context_line":"        self._test_tunnel_sync(kwargs, True)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_ha_host_roaming(self):"},{"line_number":346,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, HOST_ONE)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_8c853208","line":345,"updated":"2015-06-17 13:35:47.000000000","message":"Probably not strictly HA.","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                  \u0027host\u0027: HOST_ONE}"},{"line_number":343,"context_line":"        self._test_tunnel_sync(kwargs, True)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_ha_host_roaming(self):"},{"line_number":346,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, HOST_ONE)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_7141a6a8","line":345,"in_reply_to":"fa32b979_8c853208","updated":"2015-06-17 13:45:43.000000000","message":"+1","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ad4fd265b1418b398a099928fe5069ffbc4a2222","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":350,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_ha_roaming_case_two(self):"},{"line_number":353,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, None)"},{"line_number":354,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_TWO, HOST_TWO)"},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_0c728249","line":352,"updated":"2015-06-17 13:35:47.000000000","message":"ditto","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85fa72a4c7b7642f5c9adb7388d065f8f9806a24","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":350,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_ha_roaming_case_two(self):"},{"line_number":353,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, None)"},{"line_number":354,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_TWO, HOST_TWO)"},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_b1096e86","line":352,"in_reply_to":"fa32b979_0c728249","updated":"2015-06-17 13:45:43.000000000","message":"+1","commit_id":"64f9b5cbce01a155dcfff0052b6209866ff3d621"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"c07cba33cd0cc51ccf53888d0d196d91272604ce","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":350,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_roaming_case_two(self):"},{"line_number":353,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, None)"},{"line_number":354,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_TWO, HOST_TWO)"},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_b03b96d0","line":352,"updated":"2015-06-24 11:51:37.000000000","message":"Here, we need a raise.\n\nThe TUNNEL_IP_ONE is in use with a  legacy agent who have not upgraded the tunnel_sync rpc to send host info.\n\nIt will create a problematic situation once we upgrade this agent.","commit_id":"bedec7c0d92c4ac45490b33954f33b6049ee4c71"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"db5c72ddc8207d77ad77418ec468cacae0f90e37","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":350,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_roaming_case_two(self):"},{"line_number":353,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, None)"},{"line_number":354,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_TWO, HOST_TWO)"},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_072eb18b","line":352,"in_reply_to":"fa32b979_b03b96d0","updated":"2015-06-24 18:24:51.000000000","message":"ditto","commit_id":"bedec7c0d92c4ac45490b33954f33b6049ee4c71"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"85b2cd58066c7cd9c074072d0340fd8f1ed722e6","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":350,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_roaming_case_two(self):"},{"line_number":353,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, None)"},{"line_number":354,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_TWO, HOST_TWO)"},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa32b979_46f34673","line":352,"updated":"2015-06-25 07:44:24.000000000","message":"Sorry, my bad, I missed this one from PS7:\n   Romil Gupta\t\tJun 24 1:51 PM\n   Here, we need a raise.\n   The TUNNEL_IP_ONE is in use with a legacy agent who have not upgraded the tunnel_sync rpc to send host info.\n   It will create a problematic situation once we upgrade this agent.\n\nI believe you\u0027re not right here. It could also happen while you\u0027re upgrading that a hostname migrated.\n\nWith the current strategy: \"Delete new IP + delete new host, then add the new ip:host pair\", we\u0027re safe of issues here.\n\nSince we\u0027d:\n\n* delete (TUNNEL_IP_ONE, None), (TUNNEL_IP_TWO, HOST_TWO) \n* add (TUNNEL_IP_ONE, HOST_TWO)\n\n\nWe cannot block this case with an exception also, or we\u0027d be breaking active/passive HA system during upgrade.\n\n\nKindly,\nMiguel Ángel.","commit_id":"bdede27ed76b156364fc9e580e324caf39a4bd34"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0ebe474348b257754b8f1363bd01e26942d24981","unresolved":false,"context_lines":[{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":347,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":348,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_roaming_case_two(self):"},{"line_number":351,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_26b81375","line":348,"updated":"2015-06-28 10:22:52.000000000","message":"False is the default value, so it does not seem that those two cases are catching the issue you try to solve. I think we need better test coverage for roaming case.","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cf3e807b186f7426a2771a6280cfc142d48c3557","unresolved":false,"context_lines":[{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":347,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":348,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_roaming_case_two(self):"},{"line_number":351,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_dcdb3720","line":348,"in_reply_to":"fa32b979_26b81375","updated":"2015-06-28 18:02:46.000000000","message":"Hmm, may be we\u0027re missing some coverage?\n\nThis first one covers when you move \n\nip1:\"host one\"\n\nto \n\nip1:\"host two\"","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8b2890549bd56a76958da4153fa543a42ef8e250","unresolved":false,"context_lines":[{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":347,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":348,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    def test_tunnel_sync_called_with_used_tunnel_ip_roaming_case_two(self):"},{"line_number":351,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_7ccb0b4b","line":348,"in_reply_to":"fa32b979_26b81375","updated":"2015-06-28 18:02:18.000000000","message":"OK, that was a bad idea to review code after 2 hours of sleeping total. Now I see that the function is different, and it seems right to me.","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cf3e807b186f7426a2771a6280cfc142d48c3557","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_TWO, HOST_TWO)"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":355,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":356,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def test_tunnel_sync_called_without_tunnel_ip(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_bce8b3b4","line":355,"updated":"2015-06-28 18:02:46.000000000","message":"and, for this one:\n\nip1: None\n\nto \n\nip2: host2\n\nto \n\nip1:host2","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cf3e807b186f7426a2771a6280cfc142d48c3557","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":355,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":356,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def test_tunnel_sync_called_without_tunnel_ip(self):"},{"line_number":359,"context_line":"        kwargs \u003d {\u0027tunnel_type\u0027: self.TYPE, \u0027host\u0027: None}"},{"line_number":360,"context_line":"        self._test_tunnel_sync_raises(kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_fc05db78","line":357,"updated":"2015-06-28 18:02:46.000000000","message":"May be the checking of \"tunnel delete doesn\u0027t make sense here\" and we need to check it will call delete_by_host_or_ip ?","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8bfa283ab48063956b8cda3ea93106c07fa61558","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":355,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":356,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def test_tunnel_sync_called_without_tunnel_ip(self):"},{"line_number":359,"context_line":"        kwargs \u003d {\u0027tunnel_type\u0027: self.TYPE, \u0027host\u0027: None}"},{"line_number":360,"context_line":"        self._test_tunnel_sync_raises(kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba3cc151_dbf37d9e","line":357,"in_reply_to":"ba3cc151_a13d982c","updated":"2015-07-10 10:25:26.000000000","message":"I agree, I need to get on top of this soon.","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fd7f16a9109b80ab7e527227fff9b7ce880de1fe","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":355,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":356,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def test_tunnel_sync_called_without_tunnel_ip(self):"},{"line_number":359,"context_line":"        kwargs \u003d {\u0027tunnel_type\u0027: self.TYPE, \u0027host\u0027: None}"},{"line_number":360,"context_line":"        self._test_tunnel_sync_raises(kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_b3f6138d","line":357,"in_reply_to":"ba3cc151_dbf37d9e","updated":"2015-09-18 10:21:56.000000000","message":"Ok, after patching delete_by_host_or_ip, I discovered that then _test_tunnel_sync didn\u0027t pass.\n\nThat\u0027s because tunnel_sync returns the final list of tunnel entries,\nand it will fail if there is any extra tunnel entry i (just what we want to avoid).\n\nSo we can keep the test simple without adding extra mocks.","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"742e1da0536836a342cd62d13dcc2b70dde5fe40","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":355,"context_line":"                  \u0027host\u0027: HOST_TWO}"},{"line_number":356,"context_line":"        self._test_tunnel_sync(kwargs, False)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def test_tunnel_sync_called_without_tunnel_ip(self):"},{"line_number":359,"context_line":"        kwargs \u003d {\u0027tunnel_type\u0027: self.TYPE, \u0027host\u0027: None}"},{"line_number":360,"context_line":"        self._test_tunnel_sync_raises(kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba3cc151_a13d982c","line":357,"in_reply_to":"fa32b979_fc05db78","updated":"2015-07-08 16:09:57.000000000","message":"I think it would be better to check that delete_by_host_or_ip  is called","commit_id":"6061017424c593aabf49a8437c3b235b72cb4428"}]}
