)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"fba23533a47ad1a1af9235411e6efd57e227a782","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Miscelaneous changes to enable address scopes in L3 agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is very raw.  It needs testing and I think I want to divide it up"},{"line_number":10,"context_line":"in to others patches.  Some of the changes may need to be applied to"},{"line_number":11,"context_line":"to some of the earlier patches as fixups."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"1a26ad4f_5d099494","line":9,"updated":"2015-10-28 02:40:15.000000000","message":"This has improved a lot since I wrote this paragraph in this commit message.  It may need a little more work but I think reviewer feedback will be very good.  So, please review.\n\nI think some tests may break on this patch set and I will look in to that and fix them soon.","commit_id":"22c50ad9a5d6091df76ae8021fc0c108e9823a45"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"fac1f0a6c39eb92194c58f8056731bd13ac5620d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Carl Baldwin \u003ccarl@ecbaldwin.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-12 17:16:04 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Miscelaneous changes to enable address scopes in L3 agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is very raw.  It needs testing and I think I want to divide it up"},{"line_number":10,"context_line":"in to others patches.  Some of the changes may need to be applied to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"ba8a016a_fac6f998","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":12},"updated":"2015-11-18 12:00:09.000000000","message":"Miscelaneous \u003d\u003e Miscellaneous","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f0bac6074c1057974b8a7013efbcab46be1db0d7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Carl Baldwin \u003ccarl@ecbaldwin.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-12 17:16:04 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Miscelaneous changes to enable address scopes in L3 agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is very raw.  It needs testing and I think I want to divide it up"},{"line_number":10,"context_line":"in to others patches.  Some of the changes may need to be applied to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9a8ffd7b_dd29cf8a","line":7,"in_reply_to":"ba8a016a_fac6f998","updated":"2015-12-01 23:08:37.000000000","message":"Done","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"fac1f0a6c39eb92194c58f8056731bd13ac5620d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Miscelaneous changes to enable address scopes in L3 agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is very raw.  It needs testing and I think I want to divide it up"},{"line_number":10,"context_line":"in to others patches.  Some of the changes may need to be applied to"},{"line_number":11,"context_line":"to some of the earlier patches as fixups."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"ba8a016a_3a3fa188","line":9,"updated":"2015-11-18 12:00:09.000000000","message":"Can you please set as WIP then","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"42bdf9da9528fe8e93525055da05b9976997bbdc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Miscelaneous changes to enable address scopes in L3 agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is very raw.  It needs testing and I think I want to divide it up"},{"line_number":10,"context_line":"in to others patches.  Some of the changes may need to be applied to"},{"line_number":11,"context_line":"to some of the earlier patches as fixups."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"ba8a016a_aff6e0f6","line":9,"in_reply_to":"ba8a016a_3a3fa188","updated":"2015-11-18 17:21:10.000000000","message":"Yes.","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3f679a0080d7c7f62d41a2366b7d1a3d00a17155","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Carl Baldwin \u003ccarl@ecbaldwin.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-24 18:01:11 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Miscelaneous changes to enable address scopes in L3 agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is very raw.  It needs testing and I think I want to divide it up"},{"line_number":10,"context_line":"in to others patches.  Some of the changes may need to be applied to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9a8ffd7b_26717976","line":7,"updated":"2015-11-28 14:00:33.000000000","message":"Miscelaneous \u003d\u003e Miscellaneous","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ee1ce8747549b981dba6af30abfdc6c25e8d177f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Carl Baldwin \u003ccarl@ecbaldwin.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-24 18:01:11 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Miscelaneous changes to enable address scopes in L3 agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is very raw.  It needs testing and I think I want to divide it up"},{"line_number":10,"context_line":"in to others patches.  Some of the changes may need to be applied to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9a8ffd7b_f26c029e","line":7,"in_reply_to":"9a8ffd7b_26717976","updated":"2015-12-01 23:08:51.000000000","message":"Done","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"}],"doc/source/devref/address_scopes.rst":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c592b348333cdc818c40201c5b50e96c2c2c992e","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"The main table in the kernel will have routes for all of the interfaces on the"},{"line_number":188,"context_line":"system.  This means that a process running in the router namespace has access"},{"line_number":189,"context_line":"to all scopes at once at least on link.  This could be a problem if the there"},{"line_number":190,"context_line":"is address overlap between the scopes.  Due to complications mostly with the"},{"line_number":191,"context_line":"shared SNAT address in the router, the router will still refuse to connect to"},{"line_number":192,"context_line":"overlapping subnets.  This can be fixed at a later time."}],"source_content_type":"text/x-rst","patch_set":12,"id":"da85f559_8b0b137d","line":189,"updated":"2015-11-15 13:25:41.000000000","message":"extra \"the\"","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f0bac6074c1057974b8a7013efbcab46be1db0d7","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"The main table in the kernel will have routes for all of the interfaces on the"},{"line_number":188,"context_line":"system.  This means that a process running in the router namespace has access"},{"line_number":189,"context_line":"to all scopes at once at least on link.  This could be a problem if the there"},{"line_number":190,"context_line":"is address overlap between the scopes.  Due to complications mostly with the"},{"line_number":191,"context_line":"shared SNAT address in the router, the router will still refuse to connect to"},{"line_number":192,"context_line":"overlapping subnets.  This can be fixed at a later time."}],"source_content_type":"text/x-rst","patch_set":12,"id":"9a8ffd7b_bd264bb8","line":189,"in_reply_to":"da85f559_8b0b137d","updated":"2015-12-01 23:08:37.000000000","message":"Done","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3adb1b571fa9c94ad483da2bbcd5f2b7e514d92a","unresolved":false,"context_lines":[{"line_number":192,"context_line":"to all scopes at once at least on link.  This could be a problem if the there"},{"line_number":193,"context_line":"is address overlap between the scopes.  Due to complications mostly with the"},{"line_number":194,"context_line":"shared SNAT address in the router, the router will still refuse to connect to"},{"line_number":195,"context_line":"overlapping subnets.  This can be fixed at a later time."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":198,"context_line":"will both continue to work without address scopes but will not work with"}],"source_content_type":"text/x-rst","patch_set":14,"id":"9a8ffd7b_8b79eafe","line":195,"updated":"2015-11-25 10:43:37.000000000","message":"Do you have already a potential fix? From what you describe here I do not see a way out.\n\nIf we need to kill overlapping IPs, maybe let\u0027s just do that...","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5e0119ec89f4770000a9bbc35f33779335f7cfa4","unresolved":false,"context_lines":[{"line_number":192,"context_line":"to all scopes at once at least on link.  This could be a problem if the there"},{"line_number":193,"context_line":"is address overlap between the scopes.  Due to complications mostly with the"},{"line_number":194,"context_line":"shared SNAT address in the router, the router will still refuse to connect to"},{"line_number":195,"context_line":"overlapping subnets.  This can be fixed at a later time."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":198,"context_line":"will both continue to work without address scopes but will not work with"}],"source_content_type":"text/x-rst","patch_set":14,"id":"9a8ffd7b_0f8fb875","line":195,"in_reply_to":"9a8ffd7b_52e38e05","updated":"2015-12-03 12:51:33.000000000","message":"what did is ok, but I don\u0027t think it fixes the issue you\u0027re exposing here.\n\nBy killing overlapping IPs I meant prohibiting overlap among scopes. I don\u0027t know if we are at a stage where this can be deemed acceptable for v4 though.\n\nI agree double NAT is a solution, but it\u0027s also an overhead we probably don\u0027t want. It\u0027s not cheap.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ee1ce8747549b981dba6af30abfdc6c25e8d177f","unresolved":false,"context_lines":[{"line_number":192,"context_line":"to all scopes at once at least on link.  This could be a problem if the there"},{"line_number":193,"context_line":"is address overlap between the scopes.  Due to complications mostly with the"},{"line_number":194,"context_line":"shared SNAT address in the router, the router will still refuse to connect to"},{"line_number":195,"context_line":"overlapping subnets.  This can be fixed at a later time."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":198,"context_line":"will both continue to work without address scopes but will not work with"}],"source_content_type":"text/x-rst","patch_set":14,"id":"9a8ffd7b_52e38e05","line":195,"in_reply_to":"9a8ffd7b_8b79eafe","updated":"2015-12-01 23:08:51.000000000","message":"The only fix that I can think of at this moment is a double nat setup.  I found a link [1] that describes the solution that I have in mind.\n\nWhat do you mean by kill overlapping IPs?  I\u0027m not sure that is going to solve anything.  Unless you mean do what I have already done which is to not allow routers to connect to any overlapping subnets.\n\n [1] https://lwn.net/Articles/370152/","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3adb1b571fa9c94ad483da2bbcd5f2b7e514d92a","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":198,"context_line":"will both continue to work without address scopes but will not work with"},{"line_number":199,"context_line":"address scoped traffic.  This needs more investigation."}],"source_content_type":"text/x-rst","patch_set":14,"id":"9a8ffd7b_0bf97a80","line":199,"updated":"2015-11-25 10:43:37.000000000","message":"\u003couch!\u003e\n\nThat deserves a DocImpact as it should be release noted.\nAlso, I\u0027d consider adding this to the validation logic so that requests for adding routes to a router whose routing table is address scoped will fail, il possible.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ee1ce8747549b981dba6af30abfdc6c25e8d177f","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":198,"context_line":"will both continue to work without address scopes but will not work with"},{"line_number":199,"context_line":"address scoped traffic.  This needs more investigation."}],"source_content_type":"text/x-rst","patch_set":14,"id":"9a8ffd7b_52f5cec8","line":199,"in_reply_to":"9a8ffd7b_0bf97a80","updated":"2015-12-01 23:08:51.000000000","message":"Yeah, I know.  We need to figure out what to do about this.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5e0119ec89f4770000a9bbc35f33779335f7cfa4","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":198,"context_line":"will both continue to work without address scopes but will not work with"},{"line_number":199,"context_line":"address scoped traffic.  This needs more investigation."}],"source_content_type":"text/x-rst","patch_set":14,"id":"9a8ffd7b_8f3f2886","line":199,"in_reply_to":"9a8ffd7b_2e2f5089","updated":"2015-12-03 12:51:33.000000000","message":"got it.\n\nFor the VPN service it might worth finding a solution to make it work with address scope, but personally I\u0027d be fine adding to the release notes that for Mitaka address scopes don\u0027t work with VPN.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3bd97942d0320dc46ad8e82a1a0ced150fbe1f9d","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":198,"context_line":"will both continue to work without address scopes but will not work with"},{"line_number":199,"context_line":"address scoped traffic.  This needs more investigation."}],"source_content_type":"text/x-rst","patch_set":14,"id":"9a8ffd7b_2e2f5089","line":199,"in_reply_to":"9a8ffd7b_52f5cec8","updated":"2015-12-02 18:03:35.000000000","message":"I\u0027ve thought a little more about this.  Given that static routes are specific to a router and a router cannot be connected directly to overlapping cidrs, there is no ambiguity.\n\nStatic routes will work until we solve the issue with connecting routers to overlapping cidrs.  I think we can solve these problems together at a later time.\n\nI still need to give VPNaaS some thought.  We might need to make it address scope aware.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":17455,"name":"Na Zhu","email":"juno.zhu@huawei.com","username":"Na"},"change_message_id":"2479e025df8150e578e8f6e9ed6c10c8d55edb15","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    ip route show table fcca854b-f441-4613-a7f8-9dce846c2787"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"When the address scope is None -- like for existing subnets created without"},{"line_number":184,"context_line":"subnet pools -- a new routing table called \u0027noscope\u0027 will be used.  The main"},{"line_number":185,"context_line":"routing table will not be used because as interfaces are added, their on-link"},{"line_number":186,"context_line":"routes get automatically added to this routing table, which will be"},{"line_number":187,"context_line":"disruptive::"}],"source_content_type":"text/x-rst","patch_set":16,"id":"9a8ffd7b_2a64fc1f","line":184,"updated":"2015-12-04 03:53:07.000000000","message":"The noscope is only for the internal subnets, not for external subnets, right? If yes, i think you have to note here.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6fadde47f6b1b96eb783e36afe7ef3606c1d1e44","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    ip route show table fcca854b-f441-4613-a7f8-9dce846c2787"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"When the address scope is None -- like for existing subnets created without"},{"line_number":184,"context_line":"subnet pools -- a new routing table called \u0027noscope\u0027 will be used.  The main"},{"line_number":185,"context_line":"routing table will not be used because as interfaces are added, their on-link"},{"line_number":186,"context_line":"routes get automatically added to this routing table, which will be"},{"line_number":187,"context_line":"disruptive::"}],"source_content_type":"text/x-rst","patch_set":16,"id":"7a740942_3ce45ddf","line":184,"in_reply_to":"9a8ffd7b_2a64fc1f","updated":"2015-12-22 23:48:20.000000000","message":"It is used for any subnet, internal or external that isn\u0027t in an explicit scope.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9346908ac4fa3e4adecd266b766c42bf60510e37","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":199,"context_line":"will both continue to work without address scopes but will not work with"},{"line_number":200,"context_line":"address scoped traffic.  This needs more investigation."}],"source_content_type":"text/x-rst","patch_set":16,"id":"7a740942_23585856","line":200,"updated":"2015-12-03 16:34:34.000000000","message":"Just relaying what I know on VPN...\n\nToday, for an IPSec connection, there can be 1+ local and 1+ peer endpoints. For the local endpoint, it would be a subnet. For the peer endpoint, it would be a CIDR.\n\nWhen the connection is created, NAT rules will be added for all combinations of (local, peer). For example, with two local endpoints and three peer endpoints, we\u0027d have six NAT rules created.\n\nUsing endpoint groups, if one wanted to change the local subnets for a connection, for example, a new endpoint group would be created and the connection would switch from one to the other.\n\nLastly, there are checks that prevent deleting a subnet, if it is in use by an endpoint group.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":17455,"name":"Na Zhu","email":"juno.zhu@huawei.com","username":"Na"},"change_message_id":"6daa9b63ee9259dcef1f26b3e52c20ef8542d0b3","unresolved":false,"context_lines":[{"line_number":195,"context_line":"shared SNAT address in the router, the router will still refuse to connect to"},{"line_number":196,"context_line":"overlapping subnets.  This can be fixed at a later time."},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":199,"context_line":"will both continue to work without address scopes but will not work with"},{"line_number":200,"context_line":"address scoped traffic.  This needs more investigation."}],"source_content_type":"text/x-rst","patch_set":36,"id":"da6ed579_6cbb9d0f","line":198,"range":{"start_line":198,"start_character":0,"end_line":198,"end_character":7},"updated":"2016-01-12 09:59:59.000000000","message":"So address scope blocks extra routes and VPNaas, i think this does not make sense.","commit_id":"9ed00bc3e0ce3506dd36c9aacae21b41f9f274f9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2f1fddeca7a74007469874b7edf7f0287817d451","unresolved":false,"context_lines":[{"line_number":195,"context_line":"shared SNAT address in the router, the router will still refuse to connect to"},{"line_number":196,"context_line":"overlapping subnets.  This can be fixed at a later time."},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"Address scopes are currently not compatible with extra routes or VPNaaS.  They"},{"line_number":199,"context_line":"will both continue to work without address scopes but will not work with"},{"line_number":200,"context_line":"address scoped traffic.  This needs more investigation."}],"source_content_type":"text/x-rst","patch_set":36,"id":"da6ed579_6d0f3637","line":198,"range":{"start_line":198,"start_character":0,"end_line":198,"end_character":7},"in_reply_to":"da6ed579_6cbb9d0f","updated":"2016-01-15 18:08:43.000000000","message":"We\u0027re currently testing this.  Hang tight.","commit_id":"9ed00bc3e0ce3506dd36c9aacae21b41f9f274f9"}],"neutron/agent/l3/dvr_local_router.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"520d83376a182512a18dab1b1a2f69223d8002e1","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    def _handle_router_snat_rules(self, ex_gw_port, interface_name):"},{"line_number":415,"context_line":"        pass"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def setup_address_scope_routing(self,"},{"line_number":418,"context_line":"                                    device_name,"},{"line_number":419,"context_line":"                                    ip_cidrs,"},{"line_number":420,"context_line":"                                    routing_tables,"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a7b0d38_2c17dda4","line":417,"range":{"start_line":417,"start_character":8,"end_line":417,"end_character":35},"updated":"2015-12-23 03:53:01.000000000","message":"Xiaohhui:  What do you think needs to be different in a DVR router?","commit_id":"88527bed4a50019a0541aee461ca7a92d0410000"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"670f22558e69dd7476d221b61f5bfa0c4fc2abef","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    def _handle_router_snat_rules(self, ex_gw_port, interface_name):"},{"line_number":415,"context_line":"        pass"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def setup_address_scope_routing(self,"},{"line_number":418,"context_line":"                                    device_name,"},{"line_number":419,"context_line":"                                    ip_cidrs,"},{"line_number":420,"context_line":"                                    routing_tables,"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a7b0d38_3a82a653","line":417,"range":{"start_line":417,"start_character":8,"end_line":417,"end_character":35},"in_reply_to":"1a7b0d38_2c17dda4","updated":"2015-12-23 04:12:46.000000000","message":"It is for the functional test now, it may be removed when address scope for DVR is implemented","commit_id":"88527bed4a50019a0541aee461ca7a92d0410000"}],"neutron/agent/l3/ha.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"2450e33b590772825b265b15bcbda702b00d4413","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            self._update_metadata_proxy(ri, router_id, state)"},{"line_number":128,"context_line":"        self._update_radvd_daemon(ri, state)"},{"line_number":129,"context_line":"        self.state_change_notifier.queue_event((router_id, state))"},{"line_number":130,"context_line":"        ri.update_address_scope_routing()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _configure_ipv6_ra_on_ext_gw_port_if_necessary(self, ri, state):"},{"line_number":133,"context_line":"        # If ipv6 is enabled on the platform, ipv6_gateway config flag is"}],"source_content_type":"text/x-python","patch_set":34,"id":"fa69d971_898172fd","line":130,"updated":"2016-01-06 09:14:12.000000000","message":"The reason of using callback, and not using keepalived virtual route, is because that keepalived virtual route only support route table ID within 255. And only support route table ID (don\u0027t support table name) in virtual route. \nI have filed a issue in keepalived to address the table ID within 255 at [1]. \nMeanwhile, the fact of route table ID in virtual route, requires table ID to be consistent accross l3 agents. That is not part of the implementation in address scope, so use a callback here as the first step implementation.\n\n[1] https://github.com/acassen/keepalived/issues/214","commit_id":"fe9693c56168d9cb0dc6605ea3aed1b69270049e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cb8d298a78706292fdf9dfba54bb08650b195f35","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.agent.enqueue_state_change(router_id, state)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class L3AgentKeepalivedStateChangeServer(object):"},{"line_number":69,"context_line":"    def __init__(self, agent, conf):"},{"line_number":70,"context_line":"        self.agent \u003d agent"},{"line_number":71,"context_line":"        self.conf \u003d conf"}],"source_content_type":"text/x-python","patch_set":36,"id":"da6ed579_652146fb","line":68,"range":{"start_line":68,"start_character":6,"end_line":68,"end_character":40},"updated":"2016-01-13 00:05:13.000000000","message":"This handler is called from a different thread that doesn\u0027t respect the L3 agent\u0027s lock on the router.  Should these calls funnel in to the processing queue somehow?  Any other ways to synchronize this?  It would kind of stink to use VRRP for quick failover only to stick the update in to a queue in the L3 agent for processing later.","commit_id":"9ed00bc3e0ce3506dd36c9aacae21b41f9f274f9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cb8d298a78706292fdf9dfba54bb08650b195f35","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            self._update_metadata_proxy(ri, router_id, state)"},{"line_number":128,"context_line":"        self._update_radvd_daemon(ri, state)"},{"line_number":129,"context_line":"        self.state_change_notifier.queue_event((router_id, state))"},{"line_number":130,"context_line":"        ri.update_address_scope_routing()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _configure_ipv6_ra_on_ext_gw_port_if_necessary(self, ri, state):"},{"line_number":133,"context_line":"        # If ipv6 is enabled on the platform, ipv6_gateway config flag is"}],"source_content_type":"text/x-python","patch_set":36,"id":"da6ed579_457d22e6","line":130,"range":{"start_line":130,"start_character":11,"end_line":130,"end_character":39},"updated":"2016-01-13 00:05:13.000000000","message":"Assaf, remember back in a review of the routing table manager, we talked about only 1 thread operating on a router at a time as is guaranteed by the L3 agent?  I agreed at the time.  However, since then, we\u0027ve discovered that this isn\u0027t necessarily true with HA routers.  The reason is that this method is called from KeepalivedStateChangeHandler in a different thread.\n\nHence, the addition of this line to update address scopes\u0027 routing tables hits some synchronization issues.  I wondered if you had any thoughts.","commit_id":"9ed00bc3e0ce3506dd36c9aacae21b41f9f274f9"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"97b45cac78bde6b538a602b1d1a097255813e688","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            self._update_metadata_proxy(ri, router_id, state)"},{"line_number":128,"context_line":"        self._update_radvd_daemon(ri, state)"},{"line_number":129,"context_line":"        self.state_change_notifier.queue_event((router_id, state))"},{"line_number":130,"context_line":"        ri.update_address_scope_routing()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _configure_ipv6_ra_on_ext_gw_port_if_necessary(self, ri, state):"},{"line_number":133,"context_line":"        # If ipv6 is enabled on the platform, ipv6_gateway config flag is"}],"source_content_type":"text/x-python","patch_set":36,"id":"da6ed579_e06e84c8","line":130,"range":{"start_line":130,"start_character":11,"end_line":130,"end_character":39},"in_reply_to":"da6ed579_457d22e6","updated":"2016-01-13 00:16:24.000000000","message":"Any easy solution is to slap an Oslo file system lock on any method like update_address_scope_routing that is called both during router configuration and here. The lock name would be the router ID, so that you can\u0027t use a decorator, but rather:\n\ndef update_address_scope_routing():\n  with lockutils.lock(name\u003dself.router_id, external\u003dTrue):\n    method_body()","commit_id":"9ed00bc3e0ce3506dd36c9aacae21b41f9f274f9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6d3259fc01bfcc9000cf5349ca38666fdace6114","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            self._update_metadata_proxy(ri, router_id, state)"},{"line_number":128,"context_line":"        self._update_radvd_daemon(ri, state)"},{"line_number":129,"context_line":"        self.state_change_notifier.queue_event((router_id, state))"},{"line_number":130,"context_line":"        ri.update_address_scope_routing()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _configure_ipv6_ra_on_ext_gw_port_if_necessary(self, ri, state):"},{"line_number":133,"context_line":"        # If ipv6 is enabled on the platform, ipv6_gateway config flag is"}],"source_content_type":"text/x-python","patch_set":36,"id":"da6ed579_e0820400","line":130,"range":{"start_line":130,"start_character":11,"end_line":130,"end_character":39},"in_reply_to":"da6ed579_e06e84c8","updated":"2016-01-13 00:24:29.000000000","message":"That\u0027s pretty similar to what I had in mind.  @Hong Hui Xiao, are you agreed to that?","commit_id":"9ed00bc3e0ce3506dd36c9aacae21b41f9f274f9"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"0afe7cf87c401f4c94893413cf078a8248072bc5","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            self._update_metadata_proxy(ri, router_id, state)"},{"line_number":128,"context_line":"        self._update_radvd_daemon(ri, state)"},{"line_number":129,"context_line":"        self.state_change_notifier.queue_event((router_id, state))"},{"line_number":130,"context_line":"        ri.update_address_scope_routing()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _configure_ipv6_ra_on_ext_gw_port_if_necessary(self, ri, state):"},{"line_number":133,"context_line":"        # If ipv6 is enabled on the platform, ipv6_gateway config flag is"}],"source_content_type":"text/x-python","patch_set":36,"id":"da6ed579_245b4730","line":130,"range":{"start_line":130,"start_character":11,"end_line":130,"end_character":39},"in_reply_to":"da6ed579_e0820400","updated":"2016-01-13 05:06:04.000000000","message":"From the current code, update_address_scope_routing will only be called by the callback here. So, the potential issue here is not that update_address_scope_routing will have concurrency issue, but that the object rt_tables_manager and iprule_manager will have concurrency issue. \n\nThe l3 agent might call ri.process. And this callback might call ri.update_address_scope_routing at the same time. Both call will use rt_tables_manager and iprule_manager.\n\nBut if we want to resolve the problem in the way above, I can add some refactor to router_info.py to put the code of address scope in one function/method. And then, we can add lock to the function to avoid concurrency issue.","commit_id":"9ed00bc3e0ce3506dd36c9aacae21b41f9f274f9"}],"neutron/agent/l3/ha_router.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0ba2d05da8a2c9159794a221a864a4ed2ed80515","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                         namespace\u003dself.ns_name,"},{"line_number":147,"context_line":"                         prefix\u003dHA_DEV_PREFIX)"},{"line_number":148,"context_line":"        ip_cidrs \u003d common_utils.fixed_ip_cidrs(self.ha_port[\u0027fixed_ips\u0027])"},{"line_number":149,"context_line":"        # TODO(Carl) will this need a table?  I don\u0027t think so but check."},{"line_number":150,"context_line":"        self.driver.init_l3(interface_name, ip_cidrs,"},{"line_number":151,"context_line":"                            namespace\u003dself.ns_name,"},{"line_number":152,"context_line":"                            preserve_ips\u003d[self._get_primary_vip()])"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_21d3e205","line":149,"updated":"2015-08-26 20:26:59.000000000","message":"Remove this.","commit_id":"1ec58de0b44b4195f10e7b439933107527c25a7b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"520d83376a182512a18dab1b1a2f69223d8002e1","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                               namespace\u003dself.ns_name,"},{"line_number":377,"context_line":"                               prefix\u003drouter.EXTERNAL_DEV_PREFIX)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def setup_address_scope_routing(self,"},{"line_number":380,"context_line":"                                    device_name,"},{"line_number":381,"context_line":"                                    ip_cidrs,"},{"line_number":382,"context_line":"                                    routing_tables,"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a7b0d38_2c303d56","line":379,"range":{"start_line":379,"start_character":8,"end_line":379,"end_character":35},"updated":"2015-12-23 03:53:01.000000000","message":"Xiaohhui:  I don\u0027t understand why this will be any different for an HA router than for the legacy router.  Shouldn\u0027t everything be the same in every instance of the HA router?","commit_id":"88527bed4a50019a0541aee461ca7a92d0410000"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"670f22558e69dd7476d221b61f5bfa0c4fc2abef","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                               namespace\u003dself.ns_name,"},{"line_number":377,"context_line":"                               prefix\u003drouter.EXTERNAL_DEV_PREFIX)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def setup_address_scope_routing(self,"},{"line_number":380,"context_line":"                                    device_name,"},{"line_number":381,"context_line":"                                    ip_cidrs,"},{"line_number":382,"context_line":"                                    routing_tables,"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a7b0d38_ba969692","line":379,"range":{"start_line":379,"start_character":8,"end_line":379,"end_character":35},"in_reply_to":"1a7b0d38_2c303d56","updated":"2015-12-23 04:12:46.000000000","message":"This is a temp fix for functional test, just like the DVR","commit_id":"88527bed4a50019a0541aee461ca7a92d0410000"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"0131e16c6e3c192adfe8a57681ff48f4171a6d06","unresolved":false,"context_lines":[{"line_number":378,"context_line":"                               prefix\u003drouter.EXTERNAL_DEV_PREFIX)"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def delete(self, agent):"},{"line_number":381,"context_line":"        super(HaRouter, self).delete(agent)"},{"line_number":382,"context_line":"        self.destroy_state_change_monitor(self.process_monitor)"},{"line_number":383,"context_line":"        self.ha_network_removed()"},{"line_number":384,"context_line":"        self.disable_keepalived()"}],"source_content_type":"text/x-python","patch_set":33,"id":"1a7b0d38_b4cdc286","side":"PARENT","line":381,"updated":"2015-12-29 02:41:33.000000000","message":"This line is moved here in 37430d4bd096a04a0b3e23165ac244ac1f47a774 From the discussion, it is to solve this problem: disabling keepalived will clear the ip addresses. Then the delete in RouterInfo will fail at clear ip of ports, because there is no such one. \n\nBut the same problem will be addressed in b8f17bac76171993d6d276c51264fea8becb6136 because disabling keepalived will make all instances to be no master.\n\nAnd for the address scope here, if running RouterInfo.delete first, the rt_tables will be used by ha_port/keepalived. The rt_tables_manager.destroy will fail then. So, move it to the last here, as its original position.","commit_id":"3a5d8d7ebeb6a0052f69f888bc774219090a9f07"}],"neutron/agent/l3/router_info.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0ba2d05da8a2c9159794a221a864a4ed2ed80515","unresolved":false,"context_lines":[{"line_number":409,"context_line":"                  self.router_id)"},{"line_number":410,"context_line":"        self.radvd.disable()"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    def internal_network_updated(self, port):"},{"line_number":413,"context_line":"        interface_name \u003d self.get_internal_device_name(port[\u0027id\u0027])"},{"line_number":414,"context_line":"        ip_cidrs \u003d common_utils.fixed_ip_cidrs(port[\u0027fixed_ips\u0027])"},{"line_number":415,"context_line":"        self.driver.init_router_port("}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_5f24aec3","line":412,"updated":"2015-08-26 20:26:59.000000000","message":"Changing the signature here breaks ha_router but it makes it more consistent with internal_network_added/removed.  Changing it, though, is out of scope of this work.  The law of demeter says to keep it the way it was.","commit_id":"1ec58de0b44b4195f10e7b439933107527c25a7b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d8e01f9ff377ab993caf2ba2e8c517b6afeb8f69","unresolved":false,"context_lines":[{"line_number":746,"context_line":""},{"line_number":747,"context_line":"        :param agent: Passes the agent in order to send RPC messages."},{"line_number":748,"context_line":"        \"\"\""},{"line_number":749,"context_line":"        with self.rt_tables_manager, self.iprule_manager:"},{"line_number":750,"context_line":"            self._process_internal_ports()"},{"line_number":751,"context_line":"            self.process_external(agent)"},{"line_number":752,"context_line":"            # Process static routes for router"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_5af77459","line":749,"updated":"2015-08-13 19:50:02.000000000","message":"There is a problem with this.  After restart, all of the rules and routes are added properly but then when a small update is made to a router, many of the rules and routes are deleted when they should stay around.\n\nThe pattern I\u0027m using here to clean up stale rules and routes requires that the processing below adds (touches) all of the rules and routes that must stay around.  It doesn\u0027t do this.\n\nPart of the reason is that I don\u0027t think that init_router_port is being called every time.  This patch set may need to be refactored to make sure that the code to add rules and routes in there is being run each time.  Even if it doesn\u0027t actually make calls to add rules and routes, it should mark them to keep so that they\u0027re not cleaned up.","commit_id":"1ec58de0b44b4195f10e7b439933107527c25a7b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0ba2d05da8a2c9159794a221a864a4ed2ed80515","unresolved":false,"context_lines":[{"line_number":746,"context_line":""},{"line_number":747,"context_line":"        :param agent: Passes the agent in order to send RPC messages."},{"line_number":748,"context_line":"        \"\"\""},{"line_number":749,"context_line":"        with self.rt_tables_manager, self.iprule_manager:"},{"line_number":750,"context_line":"            self._process_internal_ports()"},{"line_number":751,"context_line":"            self.process_external(agent)"},{"line_number":752,"context_line":"            # Process static routes for router"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_b1926b56","line":749,"in_reply_to":"1a4dcd0f_5af77459","updated":"2015-08-26 20:26:59.000000000","message":"Will be fixed in the next patch set.","commit_id":"1ec58de0b44b4195f10e7b439933107527c25a7b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        # will be added to the interface."},{"line_number":440,"context_line":"        ip_cidrs \u003d common_utils.fixed_ip_cidrs(ex_gw_port[\u0027fixed_ips\u0027])"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        gateway_ips, enable_ra_on_gw \u003d self._get_external_gw_ips(ex_gw_port)"},{"line_number":443,"context_line":"        self.driver.init_router_port("},{"line_number":444,"context_line":"            interface_name,"},{"line_number":445,"context_line":"            ip_cidrs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_9d9d8368","side":"PARENT","line":442,"updated":"2015-08-28 19:06:13.000000000","message":"This stuff moved down to process_default_gateway.  I wonder if it would make sense to do this in a separate commit.","commit_id":"83a75d7aaa1fcfa74af13192242c8c4bb1ed4904"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":558,"context_line":"    def _add_snat_rules(self, ex_gw_port, iptables_manager,"},{"line_number":559,"context_line":"                        interface_name):"},{"line_number":560,"context_line":"        if self._snat_enabled and ex_gw_port:"},{"line_number":561,"context_line":"            # ex_gw_port should not be None in this case"},{"line_number":562,"context_line":"            # NAT rules are added only if ex_gw_port has an IPv4 address"},{"line_number":563,"context_line":"            for ip_addr in ex_gw_port[\u0027fixed_ips\u0027]:"},{"line_number":564,"context_line":"                ex_gw_ip \u003d ip_addr[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_3d855706","side":"PARENT","line":561,"updated":"2015-08-28 19:06:13.000000000","message":"Why did I remove this?","commit_id":"83a75d7aaa1fcfa74af13192242c8c4bb1ed4904"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                         prefix\u003dprefix)"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        ip_cidrs \u003d common_utils.fixed_ip_cidrs(fixed_ips)"},{"line_number":335,"context_line":"        self.driver.init_router_port(interface_name,"},{"line_number":336,"context_line":"                                     ip_cidrs,"},{"line_number":337,"context_line":"                                     namespace\u003dns_name)"},{"line_number":338,"context_line":"        for fixed_ip in fixed_ips:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_922d72aa","line":335,"updated":"2015-08-28 19:06:13.000000000","message":"Revert this whitespace change.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                          fixed_ip[\u0027ip_address\u0027],"},{"line_number":342,"context_line":"                                          self.agent_conf)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def _get_routing_tables(self, port):"},{"line_number":345,"context_line":"        port_scopes \u003d port.get(\u0027address_scopes\u0027, {})"},{"line_number":346,"context_line":"        routing_tables \u003d ((int(k), self.rt_tables_manager.add(v))"},{"line_number":347,"context_line":"                          for k, v in port_scopes.items())"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_9d8ee377","line":344,"updated":"2015-08-28 19:06:13.000000000","message":"Add a docstring;\n\nConverts the dict of address scopes from RPC to a dict mapping IP address family to the routing table that will handle ingress traffic for the port.  The new dict is indexed by the IP version integer.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                                    device_name,"},{"line_number":418,"context_line":"                                    ip_cidrs,"},{"line_number":419,"context_line":"                                    routing_tables,"},{"line_number":420,"context_line":"                                    extra_subnets\u003dNone):"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        device \u003d ip_lib.IPDevice(device_name, namespace\u003dself.ns_name)"},{"line_number":423,"context_line":"        new_onlink_routes \u003d set(s[\u0027cidr\u0027] for s in extra_subnets or [])"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_9dbca307","line":420,"updated":"2015-08-28 19:06:13.000000000","message":"Add a docstring here too.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":424,"context_line":""},{"line_number":425,"context_line":"        # Adds rules to direct any traffic from this interface to a table"},{"line_number":426,"context_line":"        for ip_version in {ip_lib.get_ip_version(cidr) for cidr in ip_cidrs}:"},{"line_number":427,"context_line":"            table \u003d routing_tables[ip_version]"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            mark_mask \u003d \"%s/%s\" % ("},{"line_number":430,"context_line":"                hex(table.table_id \u003c\u003c 16), self.iprule_manager.mask)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_9defc3e8","line":427,"updated":"2015-08-28 19:06:13.000000000","message":"Use routing_table for consistency.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        # Adds rules to direct any traffic from this interface to a table"},{"line_number":426,"context_line":"        for ip_version in {ip_lib.get_ip_version(cidr) for cidr in ip_cidrs}:"},{"line_number":427,"context_line":"            table \u003d routing_tables[ip_version]"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            mark_mask \u003d \"%s/%s\" % ("},{"line_number":430,"context_line":"                hex(table.table_id \u003c\u003c 16), self.iprule_manager.mask)"},{"line_number":431,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_3d29d737","line":428,"updated":"2015-08-28 19:06:13.000000000","message":"A comment here might be helpful.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"45566d0a0efdca9b2ba9c4a9cb1e8735edaf5b1a","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def redirect_fwmark_to_table(self, ip_version, table, fwmark):"},{"line_number":56,"context_line":"        ip \u003d l3_constants.IP_ANY[ip_version]"},{"line_number":57,"context_line":"        self.add(priority\u003dself.priority, ip\u003dip, fwmark\u003dfwmark, table\u003dtable)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        # If the routing table doesn\u0027t cover all addresses (e.g. has no default"},{"line_number":60,"context_line":"        # route) lookups will fall back to the routing policy table.  Without"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba8a016a_bc3af132","line":57,"updated":"2015-11-23 14:23:49.000000000","message":"It looks like all Ip Rule have the priority ADDRESS_SCOPES_RULE_PR. However, quoted from [1], \"Each rule should have an explicitly set unique priority value\".\n\n[1] http://man7.org/linux/man-pages/man8/ip-rule.8.html","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f0bac6074c1057974b8a7013efbcab46be1db0d7","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def redirect_fwmark_to_table(self, ip_version, table, fwmark):"},{"line_number":56,"context_line":"        ip \u003d l3_constants.IP_ANY[ip_version]"},{"line_number":57,"context_line":"        self.add(priority\u003dself.priority, ip\u003dip, fwmark\u003dfwmark, table\u003dtable)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        # If the routing table doesn\u0027t cover all addresses (e.g. has no default"},{"line_number":60,"context_line":"        # route) lookups will fall back to the routing policy table.  Without"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a8ffd7b_1d47574c","line":57,"in_reply_to":"ba8a016a_bc3af132","updated":"2015-12-01 23:08:37.000000000","message":"If I knew that before then I forgot about it.  That is actually kind of a pain.  It seems to work without unique priorities.  Let me think about this.","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"7f11848d8cb1a3e39810c8ca4f089a073ca47da5","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            return False"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        for priority, ip, fwmark in self._all - self._keep:"},{"line_number":82,"context_line":"            self.ip_rule.rule.delete(priority\u003dpriority, ip\u003dip, fwmark\u003dfwmark)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        return True"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba8a016a_c7a487a7","line":82,"updated":"2015-11-18 11:30:16.000000000","message":"The clean up here should consider the rule added at line 62~65, or else will get such error:\n\n\n2015-11-18 05:29:24.209 TRACE neutron.agent.l3.agent Command: [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, u\u0027qrouter-cbfe6c00-ff86-4c00-a6c1-8c386fee5f36\u0027, \u0027ip\u0027, \u0027-4\u0027, \u0027rule\u0027, \u0027del\u0027, \u0027fwmark\u0027, \u00270x4000000/0xffff0000\u0027, \u0027priority\u0027, \u00275001\u0027, \u0027type\u0027, \u0027unicast\u0027]\n\n2015-11-18 05:29:24.209 TRACE neutron.agent.l3.agent Exit code: 2\n\n2015-11-18 05:29:24.209 TRACE neutron.agent.l3.agent Stdin: \n\n2015-11-18 05:29:24.209 TRACE neutron.agent.l3.agent Stdout: \n\n2015-11-18 05:29:24.209 TRACE neutron.agent.l3.agent Stderr: RTNETLINK answers: No such file or directory","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"45566d0a0efdca9b2ba9c4a9cb1e8735edaf5b1a","unresolved":false,"context_lines":[{"line_number":479,"context_line":"            else:"},{"line_number":480,"context_line":"                iptables \u003d self.iptables_manager.ipv6"},{"line_number":481,"context_line":"            iptables[\u0027mangle\u0027].add_rule("},{"line_number":482,"context_line":"                \u0027scope\u0027, \u0027-i %s \u0027"},{"line_number":483,"context_line":"                         \u0027-j MARK --set-mark %s\u0027 % ("},{"line_number":484,"context_line":"                             device.name, mark_mask))"},{"line_number":485,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba8a016a_29d6b3f1","line":482,"updated":"2015-11-23 14:23:49.000000000","message":"The rule added here should use some clean up.","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f0bac6074c1057974b8a7013efbcab46be1db0d7","unresolved":false,"context_lines":[{"line_number":479,"context_line":"            else:"},{"line_number":480,"context_line":"                iptables \u003d self.iptables_manager.ipv6"},{"line_number":481,"context_line":"            iptables[\u0027mangle\u0027].add_rule("},{"line_number":482,"context_line":"                \u0027scope\u0027, \u0027-i %s \u0027"},{"line_number":483,"context_line":"                         \u0027-j MARK --set-mark %s\u0027 % ("},{"line_number":484,"context_line":"                             device.name, mark_mask))"},{"line_number":485,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a8ffd7b_9d7107ab","line":482,"in_reply_to":"ba8a016a_29d6b3f1","updated":"2015-12-01 23:08:37.000000000","message":"I don\u0027t understand.","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"45566d0a0efdca9b2ba9c4a9cb1e8735edaf5b1a","unresolved":false,"context_lines":[{"line_number":784,"context_line":"            \u0027mark\u0027, \u0027-i %s -j MARK --set-xmark %s/%s\u0027 %"},{"line_number":785,"context_line":"                    (interface_name, mark, l3_constants.ROUTER_MARK_MASK))"},{"line_number":786,"context_line":"        save_address_scope_mark_as_connmark \u003d ("},{"line_number":787,"context_line":"            \u0027POSTROUTING\u0027, \u0027-o %s -j CONNMARK --save-mark \u0027"},{"line_number":788,"context_line":"                           \u0027--mask 0xffff0000\u0027 % interface_name)"},{"line_number":789,"context_line":"        return [mark_packets_entering_external_gateway_port,"},{"line_number":790,"context_line":"                save_address_scope_mark_as_connmark]"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba8a016a_a9adc39c","line":787,"updated":"2015-11-23 14:23:49.000000000","message":"The rule added here should use some clean up.","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f0bac6074c1057974b8a7013efbcab46be1db0d7","unresolved":false,"context_lines":[{"line_number":784,"context_line":"            \u0027mark\u0027, \u0027-i %s -j MARK --set-xmark %s/%s\u0027 %"},{"line_number":785,"context_line":"                    (interface_name, mark, l3_constants.ROUTER_MARK_MASK))"},{"line_number":786,"context_line":"        save_address_scope_mark_as_connmark \u003d ("},{"line_number":787,"context_line":"            \u0027POSTROUTING\u0027, \u0027-o %s -j CONNMARK --save-mark \u0027"},{"line_number":788,"context_line":"                           \u0027--mask 0xffff0000\u0027 % interface_name)"},{"line_number":789,"context_line":"        return [mark_packets_entering_external_gateway_port,"},{"line_number":790,"context_line":"                save_address_scope_mark_as_connmark]"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a8ffd7b_1d5e7712","line":787,"in_reply_to":"ba8a016a_a9adc39c","updated":"2015-12-01 23:08:37.000000000","message":"ditto","commit_id":"74a9a4d83dd74d8a1bd5c90f81c122fcfd354c64"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3adb1b571fa9c94ad483da2bbcd5f2b7e514d92a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def __init__(self, namespace):"},{"line_number":45,"context_line":"        self.namespace \u003d namespace"},{"line_number":46,"context_line":"        self.priority \u003d self.ADDRESS_SCOPES_RULE_PR"},{"line_number":47,"context_line":"        self.mask \u003d self.ADDRESS_SCOPE_MARK_MASK"},{"line_number":48,"context_line":"        self.ip_rule \u003d ip_lib.IPRule(namespace\u003dnamespace)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def add(self, priority, ip, fwmark, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_cbaa9219","line":47,"updated":"2015-11-25 10:43:37.000000000","message":"What is you reason for passing the above 2 params to __init__?\n\nThey do seem constants to me...","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ee1ce8747549b981dba6af30abfdc6c25e8d177f","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def __init__(self, namespace):"},{"line_number":45,"context_line":"        self.namespace \u003d namespace"},{"line_number":46,"context_line":"        self.priority \u003d self.ADDRESS_SCOPES_RULE_PR"},{"line_number":47,"context_line":"        self.mask \u003d self.ADDRESS_SCOPE_MARK_MASK"},{"line_number":48,"context_line":"        self.ip_rule \u003d ip_lib.IPRule(namespace\u003dnamespace)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def add(self, priority, ip, fwmark, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_32036a44","line":47,"in_reply_to":"9a8ffd7b_cbaa9219","updated":"2015-12-01 23:08:51.000000000","message":"Done","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3adb1b571fa9c94ad483da2bbcd5f2b7e514d92a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.mask \u003d self.ADDRESS_SCOPE_MARK_MASK"},{"line_number":48,"context_line":"        self.ip_rule \u003d ip_lib.IPRule(namespace\u003dnamespace)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def add(self, priority, ip, fwmark, **kwargs):"},{"line_number":51,"context_line":"        self._keep.add((priority, ip, fwmark))"},{"line_number":52,"context_line":"        self.ip_rule.rule.add("},{"line_number":53,"context_line":"            priority\u003dpriority, ip\u003dip, fwmark\u003dfwmark, **kwargs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_8b180a86","line":50,"updated":"2015-11-25 10:43:37.000000000","message":"I left a similar comment in another patch.\nIf you call this outside of with block it probably won\u0027t behave as you expect, as self._keep is reset in __enter__","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ee1ce8747549b981dba6af30abfdc6c25e8d177f","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.mask \u003d self.ADDRESS_SCOPE_MARK_MASK"},{"line_number":48,"context_line":"        self.ip_rule \u003d ip_lib.IPRule(namespace\u003dnamespace)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def add(self, priority, ip, fwmark, **kwargs):"},{"line_number":51,"context_line":"        self._keep.add((priority, ip, fwmark))"},{"line_number":52,"context_line":"        self.ip_rule.rule.add("},{"line_number":53,"context_line":"            priority\u003dpriority, ip\u003dip, fwmark\u003dfwmark, **kwargs)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_52914e51","line":50,"in_reply_to":"9a8ffd7b_8b180a86","updated":"2015-12-01 23:08:51.000000000","message":"I\u0027ll fix it similarly as in the other patch.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3adb1b571fa9c94ad483da2bbcd5f2b7e514d92a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.add(priority\u003dself.priority, ip\u003dip, fwmark\u003dfwmark, table\u003dtable)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        # If the routing table doesn\u0027t cover all addresses (e.g. has no default"},{"line_number":60,"context_line":"        # route) lookups will fall back to the routing policy table.  Without"},{"line_number":61,"context_line":"        # this next rule they would be looked up in the main table."},{"line_number":62,"context_line":"        self.add(priority\u003d(self.priority + 1),"},{"line_number":63,"context_line":"                 ip\u003dip,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_c76e06c9","line":60,"updated":"2015-11-25 10:43:37.000000000","message":"just curious... \"routing policy table\" is the one used for PBR?","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ee1ce8747549b981dba6af30abfdc6c25e8d177f","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.add(priority\u003dself.priority, ip\u003dip, fwmark\u003dfwmark, table\u003dtable)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        # If the routing table doesn\u0027t cover all addresses (e.g. has no default"},{"line_number":60,"context_line":"        # route) lookups will fall back to the routing policy table.  Without"},{"line_number":61,"context_line":"        # this next rule they would be looked up in the main table."},{"line_number":62,"context_line":"        self.add(priority\u003d(self.priority + 1),"},{"line_number":63,"context_line":"                 ip\u003dip,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_72ab328a","line":60,"in_reply_to":"9a8ffd7b_c76e06c9","updated":"2015-12-01 23:08:51.000000000","message":"Yes.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3adb1b571fa9c94ad483da2bbcd5f2b7e514d92a","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __exit__(self, exc_type, value, traceback):"},{"line_number":78,"context_line":"        if exc_type:"},{"line_number":79,"context_line":"            return False"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        for priority, ip, fwmark in self._all - self._keep:"},{"line_number":82,"context_line":"            self.ip_rule.rule.delete(priority\u003dpriority, ip\u003dip, fwmark\u003dfwmark)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_c7f36609","line":79,"updated":"2015-11-25 10:43:37.000000000","message":"shouldn\u0027t you try to remove all the rules that are in _keep to ensure proper rollback?","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f84577956b4371111612bbb290eac7b475b5e298","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        self.router[l3_constants.INTERFACE_KEY] \u003d []"},{"line_number":316,"context_line":"        self.router[l3_constants.FLOATINGIP_KEY] \u003d []"},{"line_number":317,"context_line":"        self.process(agent)"},{"line_number":318,"context_line":"        self.disable_radvd()"},{"line_number":319,"context_line":"        if self.rt_tables_manager:"},{"line_number":320,"context_line":"            self.rt_tables_manager.destroy()"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_4656fd06","line":318,"updated":"2015-11-28 13:46:47.000000000","message":"I think you miss \"self.router_namespace.delete()\" here when merging.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ee1ce8747549b981dba6af30abfdc6c25e8d177f","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        self.router[l3_constants.INTERFACE_KEY] \u003d []"},{"line_number":316,"context_line":"        self.router[l3_constants.FLOATINGIP_KEY] \u003d []"},{"line_number":317,"context_line":"        self.process(agent)"},{"line_number":318,"context_line":"        self.disable_radvd()"},{"line_number":319,"context_line":"        if self.rt_tables_manager:"},{"line_number":320,"context_line":"            self.rt_tables_manager.destroy()"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_d2921e4b","line":318,"in_reply_to":"9a8ffd7b_4656fd06","updated":"2015-12-01 23:08:51.000000000","message":"Good catch.  Thanks.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3adb1b571fa9c94ad483da2bbcd5f2b7e514d92a","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        port_scopes \u003d port.get(\u0027address_scopes\u0027, {})"},{"line_number":368,"context_line":"        routing_tables \u003d ((int(k), self.rt_tables_manager.add(v))"},{"line_number":369,"context_line":"                          for k, v in port_scopes.items())"},{"line_number":370,"context_line":"        default_factory \u003d lambda: self.rt_tables_manager.add(None)"},{"line_number":371,"context_line":"        return collections.defaultdict(default_factory, routing_tables)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def internal_network_added(self, port):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_4be8e27c","line":370,"updated":"2015-11-25 10:43:37.000000000","message":"when would you fall back to default_factory?","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ee1ce8747549b981dba6af30abfdc6c25e8d177f","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        port_scopes \u003d port.get(\u0027address_scopes\u0027, {})"},{"line_number":368,"context_line":"        routing_tables \u003d ((int(k), self.rt_tables_manager.add(v))"},{"line_number":369,"context_line":"                          for k, v in port_scopes.items())"},{"line_number":370,"context_line":"        default_factory \u003d lambda: self.rt_tables_manager.add(None)"},{"line_number":371,"context_line":"        return collections.defaultdict(default_factory, routing_tables)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def internal_network_added(self, port):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_f2816290","line":370,"in_reply_to":"9a8ffd7b_4be8e27c","updated":"2015-12-01 23:08:51.000000000","message":"If \"port.get(\u0027address_scopes\u0027, {})\" above returns {}.\n\nFeel free to suggest a more pythonic pattern.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5e0119ec89f4770000a9bbc35f33779335f7cfa4","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        port_scopes \u003d port.get(\u0027address_scopes\u0027, {})"},{"line_number":368,"context_line":"        routing_tables \u003d ((int(k), self.rt_tables_manager.add(v))"},{"line_number":369,"context_line":"                          for k, v in port_scopes.items())"},{"line_number":370,"context_line":"        default_factory \u003d lambda: self.rt_tables_manager.add(None)"},{"line_number":371,"context_line":"        return collections.defaultdict(default_factory, routing_tables)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def internal_network_added(self, port):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_4feaa0dc","line":370,"in_reply_to":"9a8ffd7b_f2816290","updated":"2015-12-03 12:51:33.000000000","message":"python-wise I\u0027m good with this. I did not interpret correctly the logic which generated routing_tables.\n\nMy bad.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f84577956b4371111612bbb290eac7b475b5e298","unresolved":false,"context_lines":[{"line_number":647,"context_line":"                    if self._snat_enabled or table \u003d\u003d gw_ipv4_table:"},{"line_number":648,"context_line":"                        table.add_gateway(device, ip)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        self.setup_address_scope_routing("},{"line_number":651,"context_line":"            device_name\u003dinterface_name,"},{"line_number":652,"context_line":"            ip_cidrs\u003dcommon_utils.fixed_ip_cidrs(ex_gw_port[\u0027fixed_ips\u0027]),"},{"line_number":653,"context_line":"            routing_tables\u003dself._get_routing_tables(ex_gw_port),"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a8ffd7b_066c75cc","line":650,"updated":"2015-11-28 13:46:47.000000000","message":"Setting up route here may cause problem. \n\nEvery time RoutingTable.__enter__() will empty the \"keep\" set. And when RoutingTable.__exit__() will clear other route except the \"keep\" set.\n\nWhen I have a route for external net in route table, and not I add/delete a router-interface. This method will not be called because line 713. So, the route for external net will not be added to the \"keep\" set. As a result, it will be deleted.","commit_id":"1902fe2d223bd2dccbb92f40d26481d4f2f99fc1"},{"author":{"_account_id":17455,"name":"Na Zhu","email":"juno.zhu@huawei.com","username":"Na"},"change_message_id":"70ca2608c7522bce1ca25ecf59e17cc10d1eba6e","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                          if int(r[\u0027priority\u0027]) in priorities}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        for priority, ip, fwmark in all_priorities - self._keep:"},{"line_number":83,"context_line":"            self.ip_rule.rule.delete(priority\u003dpriority, ip\u003dip, fwmark\u003dfwmark)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        return True"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"7a740942_92fcd53f","line":83,"updated":"2015-12-04 08:18:51.000000000","message":"I find the self.ip_rule.rule.delete can not delete type \"unreachable\" rule. The error is \"RTNETLINK answers: No such file or directory\", because the default type of ip_rule.rule.delete is unicast.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"da42107b0da82af0e748a084eae889f7dd4cede9","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                          if int(r[\u0027priority\u0027]) in priorities}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        for priority, ip, fwmark in all_priorities - self._keep:"},{"line_number":83,"context_line":"            self.ip_rule.rule.delete(priority\u003dpriority, ip\u003dip, fwmark\u003dfwmark)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        return True"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"7a740942_859f7b4f","line":83,"in_reply_to":"7a740942_92fcd53f","updated":"2015-12-05 16:05:43.000000000","message":"This is found in previous patch and is addressed in patch set 17.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c60035f9c88118bf4debaec352839dacfc8f702d","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                                                     self.ns_name)"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def _internal_network_added(self, ns_name, network_id, port_id,"},{"line_number":342,"context_line":"                                routing_tables,"},{"line_number":343,"context_line":"                                fixed_ips, mac_address,"},{"line_number":344,"context_line":"                                interface_name, prefix):"},{"line_number":345,"context_line":"        LOG.debug(\"adding internal network: prefix(%s), port(%s)\","}],"source_content_type":"text/x-python","patch_set":16,"id":"9a8ffd7b_cf62103e","line":342,"updated":"2015-12-03 13:23:49.000000000","message":"You probably want to use this parameter somewhere in this method?\n\nDid you forget the relevant lines of code, is there another patch coming, or else?","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"da42107b0da82af0e748a084eae889f7dd4cede9","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                                                     self.ns_name)"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def _internal_network_added(self, ns_name, network_id, port_id,"},{"line_number":342,"context_line":"                                routing_tables,"},{"line_number":343,"context_line":"                                fixed_ips, mac_address,"},{"line_number":344,"context_line":"                                interface_name, prefix):"},{"line_number":345,"context_line":"        LOG.debug(\"adding internal network: prefix(%s), port(%s)\","}],"source_content_type":"text/x-python","patch_set":16,"id":"7a740942_e5b67fdb","line":342,"in_reply_to":"9a8ffd7b_cf62103e","updated":"2015-12-05 16:05:43.000000000","message":"I remove it in patch set 17","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c60035f9c88118bf4debaec352839dacfc8f702d","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        routing_tables \u003d ("},{"line_number":371,"context_line":"            (int(k), self.rt_tables_manager.add(v or AS_DEFAULT_TABLE))"},{"line_number":372,"context_line":"            for k, v in port_scopes.items())"},{"line_number":373,"context_line":"        default_factory \u003d lambda: self.rt_tables_manager.add(AS_DEFAULT_TABLE)"},{"line_number":374,"context_line":"        return collections.defaultdict(default_factory, routing_tables)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def internal_network_added(self, port):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a8ffd7b_0a3326f7","line":373,"updated":"2015-12-03 13:23:49.000000000","message":"note that this factory does not actually produce a new value for the dict, but adds AS_DEFAULT_TABLE to the routing table manager.\n\nI think this is your intention, but my question is that I would expect the following:\n\nrouting_tables \u003d self._get_routing_tables(port)\n# scope 999 does not exist\nrt \u003d routing_tables[999]\n# Expect rt\u003d\u003dAS_DEFAULT_TABLE, but is actually None\n\nAt least that\u0027s what this simple python snippet suggests:\n\n\n\u003e\u003e\u003e import collections\n\n\u003e\u003e\u003e some_set \u003d set()\n\n\u003e\u003e\u003e default_meh \u003d lambda: some_set.add(\u0027CIAO\u0027)\n\n\u003e\u003e\u003e x \u003d collections.defaultdict(default_meh, {\u0027pippo\u0027: \u0027meh\u0027})\n\n\u003e\u003e\u003e x\n\ndefaultdict(\u003cfunction \u003clambda\u003e at 0x7f260a093848\u003e, {\u0027pippo\u0027: \u0027meh\u0027})\n\n\u003e\u003e\u003e print x[999]\n\nNone\n\n\u003e\u003e\u003e some_set\n\nset([\u0027CIAO\u0027])","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c60035f9c88118bf4debaec352839dacfc8f702d","unresolved":false,"context_lines":[{"line_number":462,"context_line":"        device \u003d ip_lib.IPDevice(device_name, namespace\u003dself.ns_name)"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        # Adds rules to direct any traffic from this interface to a table"},{"line_number":465,"context_line":"        for ip_version in {ip_lib.get_ip_version(cidr) for cidr in ip_cidrs}:"},{"line_number":466,"context_line":"            routing_table \u003d routing_tables[ip_version]"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"            # NOTE: Address scopes use the upper 16 bits of the 32 fwmark"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a8ffd7b_85db894e","line":465,"updated":"2015-12-03 13:23:49.000000000","message":"correct me if I\u0027m wrong...\nAs we can have at most 1 cidr for each ip version on the interface it is not possible to process v4 or v6 more than once, is it?","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c60035f9c88118bf4debaec352839dacfc8f702d","unresolved":false,"context_lines":[{"line_number":468,"context_line":"            # NOTE: Address scopes use the upper 16 bits of the 32 fwmark"},{"line_number":469,"context_line":"            mark_mask \u003d \"%s/%s\" % ("},{"line_number":470,"context_line":"                hex(routing_table.table_id \u003c\u003c 16),"},{"line_number":471,"context_line":"                self.iprule_manager.MARK_MASK)"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"            if ip_version \u003d\u003d l3_constants.IP_VERSION_4:"},{"line_number":474,"context_line":"                iptables \u003d self.iptables_manager.ipv4"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a8ffd7b_05ac798a","line":471,"updated":"2015-12-03 13:23:49.000000000","message":"stupid question... as the last 16 bits of MARK_MASK are 0, do you still need to left shift the routing table id? I\u0027m not sure what you mean by \"upper\" here.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":17455,"name":"Na Zhu","email":"juno.zhu@huawei.com","username":"Na"},"change_message_id":"2479e025df8150e578e8f6e9ed6c10c8d55edb15","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            iptables[\u0027mangle\u0027].add_rule("},{"line_number":478,"context_line":"                \u0027scope\u0027, \u0027-i %s \u0027"},{"line_number":479,"context_line":"                         \u0027-j MARK --set-mark %s\u0027 % ("},{"line_number":480,"context_line":"                             device.name, mark_mask))"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"            self.iprule_manager.redirect_fwmark_to_table("},{"line_number":483,"context_line":"                ip_version\u003dip_version,"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a740942_01d2d800","line":480,"updated":"2015-12-04 03:53:07.000000000","message":"The mangle rule for internal port is added here, you have to delete this rule when the interface is deleted.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"da42107b0da82af0e748a084eae889f7dd4cede9","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            iptables[\u0027mangle\u0027].add_rule("},{"line_number":478,"context_line":"                \u0027scope\u0027, \u0027-i %s \u0027"},{"line_number":479,"context_line":"                         \u0027-j MARK --set-mark %s\u0027 % ("},{"line_number":480,"context_line":"                             device.name, mark_mask))"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"            self.iprule_manager.redirect_fwmark_to_table("},{"line_number":483,"context_line":"                ip_version\u003dip_version,"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a740942_05baabc0","line":480,"in_reply_to":"7a740942_01d2d800","updated":"2015-12-05 16:05:43.000000000","message":"This is found in previous patch and is addressed in patch set 17.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":17455,"name":"Na Zhu","email":"juno.zhu@huawei.com","username":"Na"},"change_message_id":"2479e025df8150e578e8f6e9ed6c10c8d55edb15","unresolved":false,"context_lines":[{"line_number":540,"context_line":"                enable_ra \u003d enable_ra or self._port_has_ipv6_subnet(p)"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"        for p in internal_ports:"},{"line_number":543,"context_line":"            self.setup_address_scope_routing("},{"line_number":544,"context_line":"                device_name\u003dself.get_internal_device_name(p[\u0027id\u0027]),"},{"line_number":545,"context_line":"                ip_cidrs\u003dcommon_utils.fixed_ip_cidrs(p[\u0027fixed_ips\u0027]),"},{"line_number":546,"context_line":"                routing_tables\u003dself._get_routing_tables(p))"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a740942_c1c4d041","line":543,"updated":"2015-12-04 03:53:07.000000000","message":"I think call setup_address_scope_routing here cause many duplicated  configurations, for example, when a new internal port is created, the exists ports related mangle rule and ip rule \"fwmark unreachable\" is added again.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"da42107b0da82af0e748a084eae889f7dd4cede9","unresolved":false,"context_lines":[{"line_number":540,"context_line":"                enable_ra \u003d enable_ra or self._port_has_ipv6_subnet(p)"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"        for p in internal_ports:"},{"line_number":543,"context_line":"            self.setup_address_scope_routing("},{"line_number":544,"context_line":"                device_name\u003dself.get_internal_device_name(p[\u0027id\u0027]),"},{"line_number":545,"context_line":"                ip_cidrs\u003dcommon_utils.fixed_ip_cidrs(p[\u0027fixed_ips\u0027]),"},{"line_number":546,"context_line":"                routing_tables\u003dself._get_routing_tables(p))"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a740942_85c69b47","line":543,"in_reply_to":"7a740942_c1c4d041","updated":"2015-12-05 16:05:43.000000000","message":"For ip rules, this should run here to keep ip rules.\nFor iptables, it is addressed in patch set 17.","commit_id":"ed2e4db86a04aca28821a48887d65de66ec4f909"},{"author":{"_account_id":17455,"name":"Na Zhu","email":"juno.zhu@huawei.com","username":"Na"},"change_message_id":"1d84ec93f18e0bd46dae210e43e41bf52b484d40","unresolved":false,"context_lines":[{"line_number":855,"context_line":"                    # If extenal network has address scope, find the table id"},{"line_number":856,"context_line":"                    table_id \u003d None"},{"line_number":857,"context_line":"                    scopes \u003d ex_gw_port.get(\u0027address_scopes\u0027, {})"},{"line_number":858,"context_line":"                    address_scope \u003d scopes.get(str(l3_constants.IP_VERSION_4))"},{"line_number":859,"context_line":"                    if address_scope:"},{"line_number":860,"context_line":"                        tables \u003d self._get_routing_tables(ex_gw_port)"},{"line_number":861,"context_line":"                        table_id \u003d tables[l3_constants.IP_VERSION_4].table_id"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a740942_d6a5eaa1","line":858,"updated":"2015-12-08 06:55:50.000000000","message":"When the gw interface connects default address scope \"noscope\", the value of key \"address_scopes\" is {u\u00274\u0027: None, u\u00276\u0027: None}, so the address_scope here is none and the ACCEPT rule dont_snat_traffic_from_same_scope never be installed.","commit_id":"808587e112e7f9a2a3a57c7da78eac7fa1625755"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9f1cfda858b7de8af8ed4c90666f4668ae3bf02c","unresolved":false,"context_lines":[{"line_number":855,"context_line":"                    # If extenal network has address scope, find the table id"},{"line_number":856,"context_line":"                    table_id \u003d None"},{"line_number":857,"context_line":"                    scopes \u003d ex_gw_port.get(\u0027address_scopes\u0027, {})"},{"line_number":858,"context_line":"                    address_scope \u003d scopes.get(str(l3_constants.IP_VERSION_4))"},{"line_number":859,"context_line":"                    if address_scope:"},{"line_number":860,"context_line":"                        tables \u003d self._get_routing_tables(ex_gw_port)"},{"line_number":861,"context_line":"                        table_id \u003d tables[l3_constants.IP_VERSION_4].table_id"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a740942_2c7c8fea","line":858,"in_reply_to":"7a740942_7afd776d","updated":"2015-12-10 11:36:42.000000000","message":"I reckon your analysis is correct, that\u0027s my understanding as well.","commit_id":"808587e112e7f9a2a3a57c7da78eac7fa1625755"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"ae1403bb4e4bee0dbe6bebf04c994ec925904f6a","unresolved":false,"context_lines":[{"line_number":855,"context_line":"                    # If extenal network has address scope, find the table id"},{"line_number":856,"context_line":"                    table_id \u003d None"},{"line_number":857,"context_line":"                    scopes \u003d ex_gw_port.get(\u0027address_scopes\u0027, {})"},{"line_number":858,"context_line":"                    address_scope \u003d scopes.get(str(l3_constants.IP_VERSION_4))"},{"line_number":859,"context_line":"                    if address_scope:"},{"line_number":860,"context_line":"                        tables \u003d self._get_routing_tables(ex_gw_port)"},{"line_number":861,"context_line":"                        table_id \u003d tables[l3_constants.IP_VERSION_4].table_id"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a740942_7afd776d","line":858,"in_reply_to":"7a740942_d6a5eaa1","updated":"2015-12-10 08:01:54.000000000","message":"I think it is for backward compatibility. If the external net is in \"noscope\", internal networks in \"noscope\" are still expecting NAT to the external network.\n\nMeanwhile, other internal networks not in \"noscope\" will also want to NAT to the external network.","commit_id":"808587e112e7f9a2a3a57c7da78eac7fa1625755"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"520d83376a182512a18dab1b1a2f69223d8002e1","unresolved":false,"context_lines":[{"line_number":691,"context_line":"                    # When snat is enabled, all scopes route externally."},{"line_number":692,"context_line":"                    # NAT applied in external_gateway_nat_rules to cross"},{"line_number":693,"context_line":"                    # scopes."},{"line_number":694,"context_line":"                    if self._snat_enabled or table \u003d\u003d gw_ipv4_table:"},{"line_number":695,"context_line":"                        table.add_gateway(device, ip)"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"        if enable_ra_on_gw:"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a7b0d38_f25bec2c","line":694,"range":{"start_line":694,"start_character":28,"end_line":694,"end_character":41},"updated":"2015-12-23 03:53:01.000000000","message":"I\u0027m now wondering why this doesn\u0027t seem to work in my most recent environment.  Looking in to it.  It might be that I have something wrong in the address scopes I created.","commit_id":"88527bed4a50019a0541aee461ca7a92d0410000"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8a9373255b52737fb9431ca9311f14d2dd9e4f74","unresolved":false,"context_lines":[{"line_number":691,"context_line":"                    # When snat is enabled, all scopes route externally."},{"line_number":692,"context_line":"                    # NAT applied in external_gateway_nat_rules to cross"},{"line_number":693,"context_line":"                    # scopes."},{"line_number":694,"context_line":"                    if self._snat_enabled or table \u003d\u003d gw_ipv4_table:"},{"line_number":695,"context_line":"                        table.add_gateway(device, ip)"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"        if enable_ra_on_gw:"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a7b0d38_daf5a283","line":694,"range":{"start_line":694,"start_character":28,"end_line":694,"end_character":41},"in_reply_to":"1a7b0d38_f25bec2c","updated":"2015-12-23 04:43:26.000000000","message":"Actually, what I thought was a problem here was the same thing I mentioned on L695.  Fixed in the next revision.","commit_id":"88527bed4a50019a0541aee461ca7a92d0410000"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"520d83376a182512a18dab1b1a2f69223d8002e1","unresolved":false,"context_lines":[{"line_number":692,"context_line":"                    # NAT applied in external_gateway_nat_rules to cross"},{"line_number":693,"context_line":"                    # scopes."},{"line_number":694,"context_line":"                    if self._snat_enabled or table \u003d\u003d gw_ipv4_table:"},{"line_number":695,"context_line":"                        table.add_gateway(device, ip)"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"        if enable_ra_on_gw:"},{"line_number":698,"context_line":"            self.driver.configure_ipv6_ra(ns_name, interface_name)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a7b0d38_72b61c3f","line":695,"range":{"start_line":695,"start_character":24,"end_line":695,"end_character":41},"updated":"2015-12-23 03:53:01.000000000","message":"This is supposed to also be called for the ipv6 gateway table.  I need to rearrange this logic a little bit.","commit_id":"88527bed4a50019a0541aee461ca7a92d0410000"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8a9373255b52737fb9431ca9311f14d2dd9e4f74","unresolved":false,"context_lines":[{"line_number":692,"context_line":"                    # NAT applied in external_gateway_nat_rules to cross"},{"line_number":693,"context_line":"                    # scopes."},{"line_number":694,"context_line":"                    if self._snat_enabled or table \u003d\u003d gw_ipv4_table:"},{"line_number":695,"context_line":"                        table.add_gateway(device, ip)"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"        if enable_ra_on_gw:"},{"line_number":698,"context_line":"            self.driver.configure_ipv6_ra(ns_name, interface_name)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1a7b0d38_1a3a4a37","line":695,"range":{"start_line":695,"start_character":24,"end_line":695,"end_character":41},"in_reply_to":"1a7b0d38_72b61c3f","updated":"2015-12-23 04:43:26.000000000","message":"I got this right in the next revision.","commit_id":"88527bed4a50019a0541aee461ca7a92d0410000"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"25b7a71d978d913ce16672171088551f57481457","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                 (fixed_ip, floating_ip))]"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def floating_mangle_rules(self, floating_ip, mark):"},{"line_number":207,"context_line":"        return [(\u0027floatingip\u0027, \u0027-d %s -j MARK --set-xmark %s\u0027 %"},{"line_number":208,"context_line":"                 (floating_ip, mark))]"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def get_mark_mask(self, routing_table):"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a7b0d38_6f9e0e58","line":207,"range":{"start_line":207,"start_character":46,"end_line":207,"end_character":57},"updated":"2015-12-23 21:38:32.000000000","message":"Need to be consistent with using --set-mark or --set-xmark.  I think --set-mark is intuitive here.","commit_id":"642ef37b4311ad9531a9d5c37aef13d0574b5b4f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"25b7a71d978d913ce16672171088551f57481457","unresolved":false,"context_lines":[{"line_number":491,"context_line":""},{"line_number":492,"context_line":"            routing_table \u003d routing_tables[ip_version]"},{"line_number":493,"context_line":"            mark_mask \u003d self.get_mark_mask(routing_table)"},{"line_number":494,"context_line":"            getattr(iptables[\u0027mangle\u0027], \u0027%s_rule\u0027 % action)("},{"line_number":495,"context_line":"                \u0027scope\u0027, \u0027-i %s \u0027"},{"line_number":496,"context_line":"                         \u0027-j MARK --set-mark %s\u0027 % ("},{"line_number":497,"context_line":"                             device_name, mark_mask))"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a7b0d38_cfe5c2a8","line":494,"range":{"start_line":494,"start_character":12,"end_line":494,"end_character":59},"updated":"2015-12-23 21:38:32.000000000","message":"I don\u0027t believe this is an effective way to eliminate code duplication.  IMO, it is worse than the code duplication because it makes things more difficult to read.","commit_id":"642ef37b4311ad9531a9d5c37aef13d0574b5b4f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"50cdaa832a36a3ad0533112b766f1a0b0dc0f749","unresolved":false,"context_lines":[{"line_number":461,"context_line":"            ip_cidrs\u003dip_cidrs,"},{"line_number":462,"context_line":"            namespace\u003dself.ns_name)"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"    def port_address_scope_rule(self, device_name, routing_table):"},{"line_number":465,"context_line":"        mark_mask \u003d self.get_mark_mask(routing_table)"},{"line_number":466,"context_line":"        return \u0027-i %s -j MARK --set-mark %s\u0027 % ("},{"line_number":467,"context_line":"                device_name, mark_mask)"}],"source_content_type":"text/x-python","patch_set":29,"id":"1a7b0d38_29d7a124","line":464,"range":{"start_line":464,"start_character":8,"end_line":464,"end_character":32},"updated":"2015-12-23 23:49:25.000000000","message":"This should be named \"address_scope_mange_rule\" to be consistent with other such methods in the file.","commit_id":"ef2c289056719cb2b14ae7b572e1229b8affe01f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"50cdaa832a36a3ad0533112b766f1a0b0dc0f749","unresolved":false,"context_lines":[{"line_number":463,"context_line":""},{"line_number":464,"context_line":"    def port_address_scope_rule(self, device_name, routing_table):"},{"line_number":465,"context_line":"        mark_mask \u003d self.get_mark_mask(routing_table)"},{"line_number":466,"context_line":"        return \u0027-i %s -j MARK --set-mark %s\u0027 % ("},{"line_number":467,"context_line":"                device_name, mark_mask)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def remove_address_scope_iptables(self,"}],"source_content_type":"text/x-python","patch_set":29,"id":"1a7b0d38_c9b4ddf3","line":466,"range":{"start_line":466,"start_character":25,"end_line":466,"end_character":30},"updated":"2015-12-23 23:49:25.000000000","message":"See my comment on L848.  I think setting this directly on CONNMARK is the right way to go here.","commit_id":"ef2c289056719cb2b14ae7b572e1229b8affe01f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"50cdaa832a36a3ad0533112b766f1a0b0dc0f749","unresolved":false,"context_lines":[{"line_number":845,"context_line":"            \u0027mark\u0027, \u0027-i %s -j MARK --set-xmark %s/%s\u0027 %"},{"line_number":846,"context_line":"                    (interface_name, mark, l3_constants.ROUTER_MARK_MASK))"},{"line_number":847,"context_line":"        save_address_scope_mark_as_connmark \u003d ("},{"line_number":848,"context_line":"            \u0027POSTROUTING\u0027, \u0027-o %s -j CONNMARK --save-mark \u0027"},{"line_number":849,"context_line":"                           \u0027--mask 0xffff0000\u0027 % interface_name)"},{"line_number":850,"context_line":"        return [mark_packets_entering_external_gateway_port,"},{"line_number":851,"context_line":"                save_address_scope_mark_as_connmark]"}],"source_content_type":"text/x-python","patch_set":29,"id":"1a7b0d38_491b0d1c","line":848,"range":{"start_line":848,"start_character":46,"end_line":848,"end_character":58},"updated":"2015-12-23 23:49:25.000000000","message":"I don\u0027t think saving the mark on the way out is working out.  A better idea is to mark the address scope directly in CONNMARK on ingress at the interface.  That way, the connection will be permanently marked with the originating scope.\n\nIn the case of scope crossing with floating IPs, these mark rules should be positioned after CONNMARK is copied to MARK to override the target routing table.  Then, return traffic will still belong to the originating scope which is the correct thing to do.","commit_id":"ef2c289056719cb2b14ae7b572e1229b8affe01f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cd89f8a6f2f75fd57355d96f74e4ad7ac3d33d1d","unresolved":false,"context_lines":[{"line_number":860,"context_line":"            for ip_addr in ex_gw_port[\u0027fixed_ips\u0027]:"},{"line_number":861,"context_line":"                ex_gw_ip \u003d ip_addr[\u0027ip_address\u0027]"},{"line_number":862,"context_line":"                if netaddr.IPAddress(ex_gw_ip).version \u003d\u003d 4:"},{"line_number":863,"context_line":"                    # If extenal network has address scope, find the table id"},{"line_number":864,"context_line":"                    table_id \u003d None"},{"line_number":865,"context_line":"                    scopes \u003d ex_gw_port.get(\u0027address_scopes\u0027, {})"},{"line_number":866,"context_line":"                    address_scope \u003d scopes.get(str(l3_constants.IP_VERSION_4))"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a7b0d38_4921cdfa","line":863,"range":{"start_line":863,"start_character":25,"end_line":863,"end_character":33},"updated":"2015-12-24 00:05:01.000000000","message":"*external","commit_id":"4c64537aae5f9c71d800a3d790fb127474e2b328"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"ba1f4f35400d9eac68d1f84d5d5afa8062d1fd17","unresolved":false,"context_lines":[{"line_number":860,"context_line":"            for ip_addr in ex_gw_port[\u0027fixed_ips\u0027]:"},{"line_number":861,"context_line":"                ex_gw_ip \u003d ip_addr[\u0027ip_address\u0027]"},{"line_number":862,"context_line":"                if netaddr.IPAddress(ex_gw_ip).version \u003d\u003d 4:"},{"line_number":863,"context_line":"                    # If extenal network has address scope, find the table id"},{"line_number":864,"context_line":"                    table_id \u003d None"},{"line_number":865,"context_line":"                    scopes \u003d ex_gw_port.get(\u0027address_scopes\u0027, {})"},{"line_number":866,"context_line":"                    address_scope \u003d scopes.get(str(l3_constants.IP_VERSION_4))"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a7b0d38_d38f5a28","line":863,"range":{"start_line":863,"start_character":25,"end_line":863,"end_character":33},"in_reply_to":"1a7b0d38_4921cdfa","updated":"2015-12-28 09:55:09.000000000","message":"Done","commit_id":"4c64537aae5f9c71d800a3d790fb127474e2b328"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4f41497afc26a72699fc90be131719733cbee712","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                                          fixed_ip[\u0027ip_address\u0027],"},{"line_number":378,"context_line":"                                          self.agent_conf)"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def _get_routing_tables(self, port, persist\u003dTrue):"},{"line_number":381,"context_line":"        \"\"\"Get the IP version 4 and 6 routing tables for the port"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        If RPC sends address scopes with the port, map them to a routing table"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa69d971_91e00cce","line":380,"range":{"start_line":380,"start_character":38,"end_line":380,"end_character":53},"updated":"2016-01-08 20:27:24.000000000","message":"I don\u0027t like this as a strategy for avoiding code duplication.  Only one place in the code needs this special case, I hate having an argument control this behavior.  I think I\u0027d rather see the one place where this is special cased just make the calls directly.","commit_id":"4d5e256404d8991320331ab06309020a8fc5fc78"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"68b61e865d2a61bfcdf94a61cd8f75389bf13089","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                                          fixed_ip[\u0027ip_address\u0027],"},{"line_number":378,"context_line":"                                          self.agent_conf)"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def _get_routing_tables(self, port, persist\u003dTrue):"},{"line_number":381,"context_line":"        \"\"\"Get the IP version 4 and 6 routing tables for the port"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        If RPC sends address scopes with the port, map them to a routing table"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa69d971_9c2d6748","line":380,"range":{"start_line":380,"start_character":38,"end_line":380,"end_character":53},"in_reply_to":"fa69d971_91e00cce","updated":"2016-01-11 03:38:42.000000000","message":"Done","commit_id":"4d5e256404d8991320331ab06309020a8fc5fc78"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4f41497afc26a72699fc90be131719733cbee712","unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def remove_address_scope_iptables(self, device_name, port):"},{"line_number":483,"context_line":"        ip_cidrs \u003d common_utils.fixed_ip_cidrs(port[\u0027fixed_ips\u0027])"},{"line_number":484,"context_line":"        routing_tables \u003d self._get_routing_tables(port, persist\u003dFalse)"},{"line_number":485,"context_line":"        for ip_version in {ip_lib.get_ip_version(cidr) for cidr in ip_cidrs}:"},{"line_number":486,"context_line":"            iptables \u003d self.iptables_manager.get_tables(ip_version)"},{"line_number":487,"context_line":"            iptables[\u0027mangle\u0027].remove_rule("}],"source_content_type":"text/x-python","patch_set":35,"id":"fa69d971_912eccf8","line":484,"range":{"start_line":484,"start_character":8,"end_line":484,"end_character":70},"updated":"2016-01-08 20:27:24.000000000","message":"I think I\u0027d rather just see this caller bypass _get_routing_tables and find it on its own.","commit_id":"4d5e256404d8991320331ab06309020a8fc5fc78"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"68b61e865d2a61bfcdf94a61cd8f75389bf13089","unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def remove_address_scope_iptables(self, device_name, port):"},{"line_number":483,"context_line":"        ip_cidrs \u003d common_utils.fixed_ip_cidrs(port[\u0027fixed_ips\u0027])"},{"line_number":484,"context_line":"        routing_tables \u003d self._get_routing_tables(port, persist\u003dFalse)"},{"line_number":485,"context_line":"        for ip_version in {ip_lib.get_ip_version(cidr) for cidr in ip_cidrs}:"},{"line_number":486,"context_line":"            iptables \u003d self.iptables_manager.get_tables(ip_version)"},{"line_number":487,"context_line":"            iptables[\u0027mangle\u0027].remove_rule("}],"source_content_type":"text/x-python","patch_set":35,"id":"fa69d971_bc32aba5","line":484,"range":{"start_line":484,"start_character":8,"end_line":484,"end_character":70},"in_reply_to":"fa69d971_912eccf8","updated":"2016-01-11 03:38:42.000000000","message":"Done","commit_id":"4d5e256404d8991320331ab06309020a8fc5fc78"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4f41497afc26a72699fc90be131719733cbee712","unresolved":false,"context_lines":[{"line_number":774,"context_line":"                pd.add_gw_interface(self.router[\u0027id\u0027], interface_name)"},{"line_number":775,"context_line":"            elif not self._gateway_ports_equal(ex_gw_port, self.ex_gw_port):"},{"line_number":776,"context_line":"                self.external_gateway_updated(ex_gw_port, interface_name)"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":"        elif not ex_gw_port and self.ex_gw_port:"},{"line_number":779,"context_line":"            self.external_gateway_removed(self.ex_gw_port, interface_name)"},{"line_number":780,"context_line":"            pd.remove_gw_interface(self.router[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa69d971_110f3c2f","line":777,"updated":"2016-01-08 20:27:24.000000000","message":"Remove this.","commit_id":"4d5e256404d8991320331ab06309020a8fc5fc78"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"68b61e865d2a61bfcdf94a61cd8f75389bf13089","unresolved":false,"context_lines":[{"line_number":774,"context_line":"                pd.add_gw_interface(self.router[\u0027id\u0027], interface_name)"},{"line_number":775,"context_line":"            elif not self._gateway_ports_equal(ex_gw_port, self.ex_gw_port):"},{"line_number":776,"context_line":"                self.external_gateway_updated(ex_gw_port, interface_name)"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":"        elif not ex_gw_port and self.ex_gw_port:"},{"line_number":779,"context_line":"            self.external_gateway_removed(self.ex_gw_port, interface_name)"},{"line_number":780,"context_line":"            pd.remove_gw_interface(self.router[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa69d971_5c236f58","line":777,"in_reply_to":"fa69d971_110f3c2f","updated":"2016-01-11 03:38:42.000000000","message":"Done","commit_id":"4d5e256404d8991320331ab06309020a8fc5fc78"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4f41497afc26a72699fc90be131719733cbee712","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                        (interface_name,"},{"line_number":853,"context_line":"                         hex(routing_table_id \u003c\u003c 16),"},{"line_number":854,"context_line":"                         \"0xffff0000\"))"},{"line_number":855,"context_line":"            return [dont_snat_traffic_from_same_scope,"},{"line_number":856,"context_line":"                    snat_normal_external_traffic,"},{"line_number":857,"context_line":"                    snat_internal_traffic_to_floating_ip]"},{"line_number":858,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"fa69d971_31d120ce","line":855,"range":{"start_line":855,"start_character":20,"end_line":855,"end_character":53},"updated":"2016-01-08 20:27:24.000000000","message":"Note:  Before I rebased this patch set to create PS35, this rule came before dont_snat_traffic_to_internal_ports_if_not_to_floating_ip (See PS34 for a reference).  But, since [1] merged, it splits these up.  Is this going to be a problem?  Was there a reason that I placed this before it in the first place?\n\n [1] https://review.openstack.org/#/c/235832/3/neutron/agent/l3/router_info.py","commit_id":"4d5e256404d8991320331ab06309020a8fc5fc78"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b4e51ab3fd787d0a4d6380feb0be0ab6e66ce0d6","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                        (interface_name,"},{"line_number":853,"context_line":"                         hex(routing_table_id \u003c\u003c 16),"},{"line_number":854,"context_line":"                         \"0xffff0000\"))"},{"line_number":855,"context_line":"            return [dont_snat_traffic_from_same_scope,"},{"line_number":856,"context_line":"                    snat_normal_external_traffic,"},{"line_number":857,"context_line":"                    snat_internal_traffic_to_floating_ip]"},{"line_number":858,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"fa69d971_b158b057","line":855,"range":{"start_line":855,"start_character":20,"end_line":855,"end_character":53},"in_reply_to":"fa69d971_31d120ce","updated":"2016-01-08 20:31:06.000000000","message":"I don\u0027t think it\u0027ll be a problem since these rules are for the \u0027snat\u0027 chain and that rule is for the \u0027POSTROUTING\u0027 chain.  The relative order of the two should not matter.","commit_id":"4d5e256404d8991320331ab06309020a8fc5fc78"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"64e12a3ffb0b2db4080e20c3c733fdfc6a32e8e8","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                    [external_port], self.get_external_device_name)"},{"line_number":922,"context_line":"            for ip_version in (l3_constants.IP_VERSION_4,"},{"line_number":923,"context_line":"                               l3_constants.IP_VERSION_6):"},{"line_number":924,"context_line":"                if not external_port_scopemark[ip_version]:"},{"line_number":925,"context_line":"                    ports_scopemark[ip_version].update("},{"line_number":926,"context_line":"                        external_port_scopemark[ip_version])"},{"line_number":927,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"9a68dd71_1363221c","line":924,"range":{"start_line":924,"start_character":19,"end_line":924,"end_character":22},"updated":"2016-01-20 17:57:05.000000000","message":"I don\u0027t think \"not\" is right here?  I changed it in my other patch.","commit_id":"ebd0f57bd1cfe46983ba1f599198bd90a896fb91"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"64e12a3ffb0b2db4080e20c3c733fdfc6a32e8e8","unresolved":false,"context_lines":[{"line_number":981,"context_line":"                if address_scope:"},{"line_number":982,"context_line":"                    tables \u003d self._get_routing_tables(external_port)"},{"line_number":983,"context_line":"                    table \u003d tables[l3_constants.IP_VERSION_4]"},{"line_number":984,"context_line":"                    rule \u003d \u0027-o %s -m mark --mark %s -j ACCEPT\u0027 % ("},{"line_number":985,"context_line":"                        external_interface_name,"},{"line_number":986,"context_line":"                        self.get_mark_mask(table))"},{"line_number":987,"context_line":"                    self.iptables_manager.ipv4[\u0027nat\u0027].add_rule("}],"source_content_type":"text/x-python","patch_set":38,"id":"9a68dd71_b309f633","line":984,"range":{"start_line":984,"start_character":37,"end_line":984,"end_character":41},"updated":"2016-01-20 17:57:05.000000000","message":"I think this needs to be connmark.  I\u0027ve changed it in my other patch set.","commit_id":"ebd0f57bd1cfe46983ba1f599198bd90a896fb91"}],"neutron/agent/l3/rt_tables.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0ba2d05da8a2c9159794a221a864a4ed2ed80515","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def add(self, device, cidr):"},{"line_number":85,"context_line":"        table \u003d device.route.table(self.name)"},{"line_number":86,"context_line":"        cidr \u003d netaddr.IPNetwork(cidr)"},{"line_number":87,"context_line":"        # Get the network cidr (e.g. 192.168.5.135/23 -\u003e 192.168.4.0/23)"},{"line_number":88,"context_line":"        net \u003d utils.ip_to_cidr(cidr.network, cidr.prefixlen)"},{"line_number":89,"context_line":"        self._keep.add((net, device.name))"},{"line_number":90,"context_line":"        table.add_onlink_route(net)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_61fb1a7c","line":87,"updated":"2015-08-26 20:26:59.000000000","message":"Fixup to a previous patch set.","commit_id":"1ec58de0b44b4195f10e7b439933107527c25a7b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_concurrency import lockutils"},{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.agent.linux import ip_lib"},{"line_number":21,"context_line":"from neutron.agent.linux import utils as linux_utils"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_587619a5","line":18,"updated":"2015-08-28 19:06:13.000000000","message":"All of this should go in to the parent commit.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"}],"neutron/agent/linux/interface.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0ba2d05da8a2c9159794a221a864a4ed2ed80515","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import abc"},{"line_number":17,"context_line":"import itertools"},{"line_number":18,"context_line":"import netaddr"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log as logging"},{"line_number":22,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_df699efa","line":19,"updated":"2015-08-26 20:26:59.000000000","message":"Take out this space","commit_id":"1ec58de0b44b4195f10e7b439933107527c25a7b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import abc"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import netaddr"},{"line_number":19,"context_line":"from oslo_config import cfg"},{"line_number":20,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_b85df516","side":"PARENT","line":17,"updated":"2015-08-28 19:06:13.000000000","message":"Revert this change","commit_id":"83a75d7aaa1fcfa74af13192242c8c4bb1ed4904"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self.conf \u003d conf"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def init_l3(self, device_name, ip_cidrs, namespace\u003dNone,"},{"line_number":55,"context_line":"                preserve_ips\u003d[],"},{"line_number":56,"context_line":"                clean_connections\u003dFalse):"},{"line_number":57,"context_line":"        \"\"\"Set the L3 settings for the interface using data from the port."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_187ae177","line":55,"updated":"2015-08-28 19:06:13.000000000","message":"Make a new commit out of the changes in this file along with the related changes to neutron/agent/l3/router_info.py","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"}],"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def _make_canonical(self, ip_version, settings):"},{"line_number":287,"context_line":"        \"\"\"Converts settings to a canonical represention to compare easily\"\"\""},{"line_number":288,"context_line":"        def canonicalize_fwmark_string(thing):"},{"line_number":289,"context_line":"            if isinstance(thing, six.string_types):"},{"line_number":290,"context_line":"                iterable \u003d thing.split(\u0027/\u0027)"},{"line_number":291,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_389c855c","line":288,"updated":"2015-08-28 19:06:13.000000000","message":"Adds ability to compare fwmark.  This should be done in new commit that beefs up testing for this stuff.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                    raise exceptions.DeviceNotFoundError("},{"line_number":568,"context_line":"                        device_name\u003dself.name)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"    def _parse_routes(self, ip_version, output, **kwargs):"},{"line_number":571,"context_line":"        for line in output.split(\u0027\\n\u0027):"},{"line_number":572,"context_line":"            parts \u003d line.split()"},{"line_number":573,"context_line":"            if not parts:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_d82789c8","line":570,"updated":"2015-08-28 19:06:13.000000000","message":"All this below should go in yet another commit.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":590,"context_line":""},{"line_number":591,"context_line":"            yield route"},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"    def list_routes(self, ip_version):"},{"line_number":594,"context_line":"        args \u003d [\u0027list\u0027]"},{"line_number":595,"context_line":"        args +\u003d self._dev_args()"},{"line_number":596,"context_line":"        args +\u003d self._table_args()"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_b8f73558","line":593,"updated":"2015-08-28 19:06:13.000000000","message":"This method is added.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":598,"context_line":"        output \u003d self._run([ip_version], tuple(args))"},{"line_number":599,"context_line":"        return [r for r in self._parse_routes(ip_version, output)]"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def list_onlink_routes(self, ip_version):"},{"line_number":602,"context_line":"        args \u003d [\u0027list\u0027]"},{"line_number":603,"context_line":"        args +\u003d self._dev_args()"},{"line_number":604,"context_line":"        args +\u003d [\u0027scope\u0027, \u0027link\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_5897f9eb","line":601,"updated":"2015-08-28 19:06:13.000000000","message":"This method is beefed up.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":705,"context_line":"                                   \u0027proto\u0027, \u0027kernel\u0027,"},{"line_number":706,"context_line":"                                   \u0027dev\u0027, device))"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    def add_route(self, cidr, via\u003dNone, table\u003dNone, **kwargs):"},{"line_number":709,"context_line":"        ip_version \u003d get_ip_version(cidr)"},{"line_number":710,"context_line":"        args \u003d [\u0027replace\u0027, cidr]"},{"line_number":711,"context_line":"        if via:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_38a2454c","line":708,"updated":"2015-08-28 19:06:13.000000000","message":"via added","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":712,"context_line":"            args +\u003d [\u0027via\u0027, via]"},{"line_number":713,"context_line":"        args +\u003d self._dev_args()"},{"line_number":714,"context_line":"        args +\u003d self._table_args(table)"},{"line_number":715,"context_line":"        for k, v in kwargs.items():"},{"line_number":716,"context_line":"            args +\u003d [k, v]"},{"line_number":717,"context_line":"        try:"},{"line_number":718,"context_line":"            self._as_root([ip_version], tuple(args))"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_f8afed27","line":715,"updated":"2015-08-28 19:06:13.000000000","message":"extra kwargs added","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":723,"context_line":"                    raise exceptions.DeviceNotFoundError("},{"line_number":724,"context_line":"                        device_name\u003dself.name)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"    def delete_route(self, cidr, via\u003dNone, table\u003dNone, **kwargs):"},{"line_number":727,"context_line":"        ip_version \u003d get_ip_version(cidr)"},{"line_number":728,"context_line":"        args \u003d [\u0027del\u0027, cidr]"},{"line_number":729,"context_line":"        if via:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_b88e55ce","line":726,"updated":"2015-08-28 19:06:13.000000000","message":"via added","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":730,"context_line":"            args +\u003d [\u0027via\u0027, via]"},{"line_number":731,"context_line":"        args +\u003d self._dev_args()"},{"line_number":732,"context_line":"        args +\u003d self._table_args(table)"},{"line_number":733,"context_line":"        for k, v in kwargs.items():"},{"line_number":734,"context_line":"            args +\u003d [k, v]"},{"line_number":735,"context_line":"        try:"},{"line_number":736,"context_line":"            self._as_root([ip_version], tuple(args))"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_38b9e579","line":733,"updated":"2015-08-28 19:06:13.000000000","message":"extra kwargs added","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":746,"context_line":"    def __init__(self, namespace\u003dNone, table\u003dNone):"},{"line_number":747,"context_line":"        super(IpRouteCommand, self).__init__(namespace\u003dnamespace)"},{"line_number":748,"context_line":"        self.name \u003d None"},{"line_number":749,"context_line":"        self.route \u003d IpRouteCommandBase(self, table\u003dtable)"},{"line_number":750,"context_line":""},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"class IpNeighCommand(IpDeviceCommandBase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_987fd1aa","line":749,"updated":"2015-08-28 19:06:13.000000000","message":"This probably goes in the commit that adds IPRoute","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"}],"neutron/agent/linux/iptables_manager.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        self.ipv4 \u003d {\u0027filter\u0027: IptablesTable(binary_name\u003dself.wrap_name)}"},{"line_number":310,"context_line":"        self.ipv6 \u003d {\u0027filter\u0027: IptablesTable(binary_name\u003dself.wrap_name)}"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        self.by_ip_version \u003d {constants.IP_VERSION_4: self.ipv4,"},{"line_number":313,"context_line":"                              constants.IP_VERSION_6: self.ipv6}"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        # Add a neutron-filter-top chain. It\u0027s intended to be shared"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_0313525c","line":312,"updated":"2015-08-28 19:06:13.000000000","message":"This by_ip_version is kind of an orthogonal thing.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aae5cf8e731d719d5084b9d4416cb189be829a84","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            builtin_chains[4].update("},{"line_number":337,"context_line":"                {\u0027mangle\u0027: [\u0027PREROUTING\u0027, \u0027INPUT\u0027, \u0027FORWARD\u0027, \u0027OUTPUT\u0027,"},{"line_number":338,"context_line":"                            \u0027POSTROUTING\u0027]})"},{"line_number":339,"context_line":"            self.ipv6.update("},{"line_number":340,"context_line":"                {\u0027mangle\u0027: IptablesTable(binary_name\u003dself.wrap_name)})"},{"line_number":341,"context_line":"            builtin_chains[6].update("},{"line_number":342,"context_line":"                {\u0027mangle\u0027: [\u0027PREROUTING\u0027, \u0027INPUT\u0027, \u0027FORWARD\u0027, \u0027OUTPUT\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_38156548","line":339,"updated":"2015-08-28 19:06:13.000000000","message":"I think this goes in the final address scopes patch.","commit_id":"6b115a47a483d93bc8e9fa3b3fe488c623bd0772"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"50cdaa832a36a3ad0533112b766f1a0b0dc0f749","unresolved":false,"context_lines":[{"line_number":412,"context_line":"            # rules because the MARK targets are non-terminating (this is true"},{"line_number":413,"context_line":"            # despite them not being documented as such)"},{"line_number":414,"context_line":"            self.ipv4[\u0027mangle\u0027].add_rule("},{"line_number":415,"context_line":"                \u0027PREROUTING\u0027, mark_new_ingress_address_scope_by_floatingip)"},{"line_number":416,"context_line":"            self.ipv4[\u0027mangle\u0027].add_rule("},{"line_number":417,"context_line":"                \u0027PREROUTING\u0027, copy_address_scope_for_existing)"},{"line_number":418,"context_line":"            self.ipv6[\u0027mangle\u0027].add_rule("}],"source_content_type":"text/x-python","patch_set":29,"id":"1a7b0d38_69c4c95e","line":415,"range":{"start_line":415,"start_character":30,"end_line":415,"end_character":75},"updated":"2015-12-23 23:49:25.000000000","message":"This should come after copy_address_scope_for_existing.  For details see my comment on neutron/agent/l3/router_info.py:848.  I think the connmark should be set on ingress to the originating interface.  Then, for crossing scopes with floating ips, just override the MARK for this packet to hit the floating ip destination scope.","commit_id":"ef2c289056719cb2b14ae7b572e1229b8affe01f"}]}
