)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"65e27f3dcc2e50798f62840eb818c72f9b4ef24a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If we have some networks(with dhcp enabled subnets) created, when"},{"line_number":10,"context_line":"we want to create a new network nodes, the dhcp-agent hasn\u0027t"},{"line_number":11,"context_line":"started in that node. If we start dhcp-agent, sometimes the network"},{"line_number":12,"context_line":"resource won\u0027t be synced in this nodes, no network related ns and"},{"line_number":13,"context_line":"dnsmasq process created. The root cause is the function _report_state"},{"line_number":14,"context_line":"and sync_state are almost executed at the same time, if _report_state"},{"line_number":15,"context_line":"executed first, everything is fine, but if sync_state executed first,"},{"line_number":16,"context_line":"no network resource will be allocated."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dfbec78f_bf560b06","line":13,"range":{"start_line":11,"start_character":22,"end_line":13,"end_character":24},"updated":"2019-05-05 10:10:27.000000000","message":"Did you mean, start the dhcp-agent in the new host, and concurrently create/add a new dhcp instance (add a network to a DHCP agent. [1]) for a network?\n\nSo after the dhcp-agent is active (show the agent status [2]), this issue can be seen also?\n\n[1] neutron dhcp-agent-network-add\n[2] neutron agent-list\n\nIMO, you should give some time for the agent to startup and init.","commit_id":"7da8963c5139d77b5d92faa002d44745297d2e46"}],"neutron/agent/dhcp/agent.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5ed3bfd3921fd7974a340973f759182badf0df3e","unresolved":false,"context_lines":[{"line_number":889,"context_line":"            \u0027agent_type\u0027: constants.AGENT_TYPE_DHCP}"},{"line_number":890,"context_line":"        report_interval \u003d self.conf.AGENT.report_interval"},{"line_number":891,"context_line":"        if report_interval:"},{"line_number":892,"context_line":"            self._report_state()"},{"line_number":893,"context_line":"            self.heartbeat \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":894,"context_line":"                self._report_state)"},{"line_number":895,"context_line":"            self.heartbeat.start(interval\u003dreport_interval)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_39b639db","line":892,"range":{"start_line":892,"start_character":12,"end_line":892,"end_character":32},"updated":"2020-08-14 13:53:28.000000000","message":"I think it\u0027s ok, just needs a brief comment why it\u0027s done.","commit_id":"7da8963c5139d77b5d92faa002d44745297d2e46"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"65e27f3dcc2e50798f62840eb818c72f9b4ef24a","unresolved":false,"context_lines":[{"line_number":889,"context_line":"            \u0027agent_type\u0027: constants.AGENT_TYPE_DHCP}"},{"line_number":890,"context_line":"        report_interval \u003d self.conf.AGENT.report_interval"},{"line_number":891,"context_line":"        if report_interval:"},{"line_number":892,"context_line":"            self._report_state()"},{"line_number":893,"context_line":"            self.heartbeat \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":894,"context_line":"                self._report_state)"},{"line_number":895,"context_line":"            self.heartbeat.start(interval\u003dreport_interval)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_3f4a1b55","line":892,"range":{"start_line":892,"start_character":12,"end_line":892,"end_character":32},"updated":"2019-05-05 10:10:27.000000000","message":"The next FixedIntervalLoopingCall has default param \"initial_delay\u003dNone\", which means it will be run immediately, so why add this?","commit_id":"7da8963c5139d77b5d92faa002d44745297d2e46"},{"author":{"_account_id":19956,"name":"Yang Li","email":"yang.li@easystack.cn","username":"leonstack"},"change_message_id":"3c5ad715bdfeb0de4146fbe4e21c4bd092ced184","unresolved":false,"context_lines":[{"line_number":889,"context_line":"            \u0027agent_type\u0027: constants.AGENT_TYPE_DHCP}"},{"line_number":890,"context_line":"        report_interval \u003d self.conf.AGENT.report_interval"},{"line_number":891,"context_line":"        if report_interval:"},{"line_number":892,"context_line":"            self._report_state()"},{"line_number":893,"context_line":"            self.heartbeat \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":894,"context_line":"                self._report_state)"},{"line_number":895,"context_line":"            self.heartbeat.start(interval\u003dreport_interval)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_ff7803f9","line":892,"range":{"start_line":892,"start_character":12,"end_line":892,"end_character":32},"in_reply_to":"dfbec78f_3f4a1b55","updated":"2019-05-05 11:39:07.000000000","message":"Yes, most of time, the _report_state will executed earlier than sync, but a few times it will be late(perhaps because of the performance of FixedIntervalLoopingCall), I test several times, the probability is less then 10%, but when it happened, all the created network before won\u0027t be synced to this node, unless restart dhcp-agent.\n\nI add it here to make sure the _report_state is completed executed before putting it into FixedIntervalLoopingCall management.","commit_id":"7da8963c5139d77b5d92faa002d44745297d2e46"}]}
