)]}'
{"neutron/cmd/netns_cleanup.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"1868290e32fa4f9ee5997be0c4dff27b4dca4627","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        time.sleep(2)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        for namespace in candidates:"},{"line_number":166,"context_line":"            if namespace.startswith(\u0027qrouter\u0027):"},{"line_number":167,"context_line":"                cleanup_router_namespace(conf, namespace)"},{"line_number":168,"context_line":"            destroy_namespace(conf, namespace, conf.force)"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_96764cd5","line":166,"updated":"2016-10-07 21:00:09.000000000","message":"I think that this type of check should live and be maintained in L3 agent code, then used from here. The L3 agent should know if a namespace is managed by itself. In fact, check out NamespaceManager, it has logic for both this as well as line 174. Note that we\u0027d want to also clean up other namespaces (snat, fip). Check out line 44.","commit_id":"fd0554f04e3a102926121cadc80af7a0e44a7ef7"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d08c79dde3e0ca7fddcf71df4ceb37c4f3da2bc4","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        time.sleep(2)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        for namespace in candidates:"},{"line_number":166,"context_line":"            if namespace.startswith(\u0027qrouter\u0027):"},{"line_number":167,"context_line":"                cleanup_router_namespace(conf, namespace)"},{"line_number":168,"context_line":"            destroy_namespace(conf, namespace, conf.force)"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_5f68e3f5","line":166,"in_reply_to":"1a95cdbc_96764cd5","updated":"2016-10-11 13:28:37.000000000","message":"see L44:\n\nhttps://review.openstack.org/#/c/383936/1/neutron/cmd/netns_cleanup.py@44\n\nahh, as Amuller said.","commit_id":"fd0554f04e3a102926121cadc80af7a0e44a7ef7"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"1868290e32fa4f9ee5997be0c4dff27b4dca4627","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"def cleanup_router_namespace(conf, namespace):"},{"line_number":172,"context_line":"    # Extract id from namespace"},{"line_number":173,"context_line":"    l3_agt \u003d l3_agent.L3NATAgent(conf.host, conf)"},{"line_number":174,"context_line":"    router_id \u003d namespace.split(\u0027-\u0027, 1)[1]"},{"line_number":175,"context_line":"    if router_id:"},{"line_number":176,"context_line":"        l3_agt._safe_router_removed(router_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_3639f8f2","line":173,"updated":"2016-10-07 21:00:09.000000000","message":"The L3 agent requires configuration options that the netns_cleanup script currently doesn\u0027t, meaning that this change will be backwards incompatible. This would require an upgrade release note as well as a deprecation cycle, where we\u0027d have to detect if mandatory options aren\u0027t set (I\u0027m thinking of the interface_driver for example), and if not continue to use the old code path while emitting a warning to the logs to give operators/packagers/installation tools time to pass the l3_agent.ini to the netns_cleanup script.","commit_id":"fd0554f04e3a102926121cadc80af7a0e44a7ef7"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"1868290e32fa4f9ee5997be0c4dff27b4dca4627","unresolved":false,"context_lines":[{"line_number":171,"context_line":"def cleanup_router_namespace(conf, namespace):"},{"line_number":172,"context_line":"    # Extract id from namespace"},{"line_number":173,"context_line":"    l3_agt \u003d l3_agent.L3NATAgent(conf.host, conf)"},{"line_number":174,"context_line":"    router_id \u003d namespace.split(\u0027-\u0027, 1)[1]"},{"line_number":175,"context_line":"    if router_id:"},{"line_number":176,"context_line":"        l3_agt._safe_router_removed(router_id)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_3642d868","line":174,"updated":"2016-10-07 21:00:09.000000000","message":"See the comment above... Check out the NamespaceManager class.","commit_id":"fd0554f04e3a102926121cadc80af7a0e44a7ef7"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d08c79dde3e0ca7fddcf71df4ceb37c4f3da2bc4","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    # Extract id from namespace"},{"line_number":173,"context_line":"    l3_agt \u003d l3_agent.L3NATAgent(conf.host, conf)"},{"line_number":174,"context_line":"    router_id \u003d namespace.split(\u0027-\u0027, 1)[1]"},{"line_number":175,"context_line":"    if router_id:"},{"line_number":176,"context_line":"        l3_agt._safe_router_removed(router_id)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_6a2b2383","line":175,"updated":"2016-10-11 13:28:37.000000000","message":"another approach could be to detect the running process tree related to a netns (by combining netstat with process inspection), and then killing all of them.\n\nThis way we make the code independent of other configurations.\n\nKilling is a less cleaner cleanup, (we leave leftover files and pid files around), but agents, process monitor \u0026 the process handlers are ready to manage invalid pid files.","commit_id":"fd0554f04e3a102926121cadc80af7a0e44a7ef7"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"a1012c0347faad56288ba11b9ced866f50b32380","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    # Extract id from namespace"},{"line_number":173,"context_line":"    l3_agt \u003d l3_agent.L3NATAgent(conf.host, conf)"},{"line_number":174,"context_line":"    router_id \u003d namespace.split(\u0027-\u0027, 1)[1]"},{"line_number":175,"context_line":"    if router_id:"},{"line_number":176,"context_line":"        l3_agt._safe_router_removed(router_id)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_4a07311c","line":175,"in_reply_to":"fa6399be_0c8e3c78","updated":"2016-10-11 18:35:05.000000000","message":"But why complicate operator\u0027s life if we can make a simpler solution that works for everything ? (lbaas/haproxy, l3, dhcp, you-name-it? )","commit_id":"fd0554f04e3a102926121cadc80af7a0e44a7ef7"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"c5870d5b4eafdd13167c45c7084af3867ad04b94","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    # Extract id from namespace"},{"line_number":173,"context_line":"    l3_agt \u003d l3_agent.L3NATAgent(conf.host, conf)"},{"line_number":174,"context_line":"    router_id \u003d namespace.split(\u0027-\u0027, 1)[1]"},{"line_number":175,"context_line":"    if router_id:"},{"line_number":176,"context_line":"        l3_agt._safe_router_removed(router_id)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_0c8e3c78","line":175,"in_reply_to":"fa6399be_6a2b2383","updated":"2016-10-11 16:13:52.000000000","message":"for now I\u0027ll stick with use of l3 agent, we can modify the requirements to pass configs","commit_id":"fd0554f04e3a102926121cadc80af7a0e44a7ef7"}]}
