)]}'
{"neutron/services/segments/db.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"65eb2f2a5e3983d5f159332cfe0ba1cb0b3be7ff","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"def _clear_segment_host_mapping_for_agent(resource, event, trigger,"},{"line_number":236,"context_line":"                                          context, agent):"},{"line_number":237,"context_line":"    if agent.is_active:"},{"line_number":238,"context_line":"        # Don\u0027t clear the segment host mapping if agent is still alive."},{"line_number":239,"context_line":"        return"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_ff63ec17","line":237,"range":{"start_line":237,"start_character":7,"end_line":237,"end_character":22},"updated":"2016-07-12 19:12:08.000000000","message":"Is there a chance this agent will be active when we get a \"before delete\"?  If it is, when will we get another chance to clear the mappings?","commit_id":"c06af092ec708b708de703acee6e4182ee10d621"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0dd2a3ef785cc55fb75abe16944b8dbf666bd325","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"def _clear_segment_host_mapping_for_agent(resource, event, trigger,"},{"line_number":236,"context_line":"                                          context, agent):"},{"line_number":237,"context_line":"    if agent.is_active:"},{"line_number":238,"context_line":"        # Don\u0027t clear the segment host mapping if agent is still alive."},{"line_number":239,"context_line":"        return"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3ac371cc_8dbdd7d9","line":237,"updated":"2016-08-16 09:28:13.000000000","message":"if i understand this, deleting an inactive agent will now not clear the mappings?\n\nIt seems the activeness should not be related to this at all.","commit_id":"c06af092ec708b708de703acee6e4182ee10d621"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"6439560d2091f19030624971639bfa85661d3173","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"def _clear_segment_host_mapping_for_agent(resource, event, trigger,"},{"line_number":236,"context_line":"                                          context, agent):"},{"line_number":237,"context_line":"    if agent.is_active:"},{"line_number":238,"context_line":"        # Don\u0027t clear the segment host mapping if agent is still alive."},{"line_number":239,"context_line":"        return"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_17332015","line":237,"range":{"start_line":237,"start_character":7,"end_line":237,"end_character":22},"in_reply_to":"1aa78d24_ff63ec17","updated":"2016-07-14 12:46:32.000000000","message":"It is possible to be that. I think there might be another bigger problem. This fucntion will be called by api process, while \"_update_segment_host_mapping_for_agent\" will be called by rpc process. The reported_hosts is not shared between them.\n\nSo, discarding host at line 254 will take no effect at line 207. And the removed segment_host_mapping will not get added back, unless the l2 agent restart.\n\nI might need more thought on it.","commit_id":"c06af092ec708b708de703acee6e4182ee10d621"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"65eb2f2a5e3983d5f159332cfe0ba1cb0b3be7ff","unresolved":false,"context_lines":[{"line_number":242,"context_line":"    if not hasattr(cp, \u0027get_configuration_dict\u0027):"},{"line_number":243,"context_line":"        return"},{"line_number":244,"context_line":"    # Get the dict of configurations."},{"line_number":245,"context_line":"    agent_with_config_dic \u003d {"},{"line_number":246,"context_line":"        \u0027configurations\u0027: cp.get_configuration_dict(agent)}"},{"line_number":247,"context_line":"    phys_nets \u003d _get_phys_nets(agent_with_config_dic)"},{"line_number":248,"context_line":"    if not phys_nets:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_7f737c80","line":245,"range":{"start_line":245,"start_character":4,"end_line":245,"end_character":25},"updated":"2016-07-12 19:12:08.000000000","message":"nit:  Add a \u0027t\u0027 to the end:  agent_with_config_dict","commit_id":"c06af092ec708b708de703acee6e4182ee10d621"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"6439560d2091f19030624971639bfa85661d3173","unresolved":false,"context_lines":[{"line_number":242,"context_line":"    if not hasattr(cp, \u0027get_configuration_dict\u0027):"},{"line_number":243,"context_line":"        return"},{"line_number":244,"context_line":"    # Get the dict of configurations."},{"line_number":245,"context_line":"    agent_with_config_dic \u003d {"},{"line_number":246,"context_line":"        \u0027configurations\u0027: cp.get_configuration_dict(agent)}"},{"line_number":247,"context_line":"    phys_nets \u003d _get_phys_nets(agent_with_config_dic)"},{"line_number":248,"context_line":"    if not phys_nets:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_b7b20c47","line":245,"range":{"start_line":245,"start_character":4,"end_line":245,"end_character":25},"in_reply_to":"1aa78d24_7f737c80","updated":"2016-07-14 12:46:32.000000000","message":"Thanks, you are right. It should be agent_with_config_dict","commit_id":"c06af092ec708b708de703acee6e4182ee10d621"},{"author":{"_account_id":21550,"name":"xurong00037997","email":"xu.rong@zte.com.cn","username":"xurong"},"change_message_id":"6b1d537db88641a9df13d885258faf270875d4de","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                       resources.SEGMENT, events.PRECOMMIT_CREATE)"},{"line_number":267,"context_line":"    registry.subscribe(_clear_segment_host_mapping_for_agent,"},{"line_number":268,"context_line":"                       resources.AGENT,"},{"line_number":269,"context_line":"                       events.BEFORE_DELETE)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"subscribe()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_44654fb3","line":269,"range":{"start_line":269,"start_character":43,"end_line":269,"end_character":44},"updated":"2016-07-06 03:15:59.000000000","message":"This should be AFTER_DELETE?","commit_id":"c06af092ec708b708de703acee6e4182ee10d621"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"ee89cb1fbe77d40684c32eb4e572e8ed1805d7c3","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                       resources.SEGMENT, events.PRECOMMIT_CREATE)"},{"line_number":267,"context_line":"    registry.subscribe(_clear_segment_host_mapping_for_agent,"},{"line_number":268,"context_line":"                       resources.AGENT,"},{"line_number":269,"context_line":"                       events.BEFORE_DELETE)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"subscribe()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_a797d538","line":269,"range":{"start_line":269,"start_character":43,"end_line":269,"end_character":44},"in_reply_to":"1aa78d24_44654fb3","updated":"2016-07-06 04:11:00.000000000","message":"pls check https://github.com/openstack/neutron/blob/77cdddb05543ba0abeeb455b0e6dece2745dec13/neutron/db/agents_db.py#L259","commit_id":"c06af092ec708b708de703acee6e4182ee10d621"}]}
