)]}'
{"neutron/agent/dhcp/agent.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e902f1a8e31ed06e32e8bfa3899ff436c3a7b2f6","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        # Yield to allow other threads that may be ready an opportunity to run."},{"line_number":182,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":183,"context_line":"        # over again, in which case no other threads waiting on the"},{"line_number":184,"context_line":"        # \"dhcp-agent\" lock would make any progress."},{"line_number":185,"context_line":"        time.sleep(0)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    @_sync_lock"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_13f663d9","line":184,"range":{"start_line":184,"start_character":10,"end_line":184,"end_character":27},"updated":"2018-07-20 12:58:47.000000000","message":"which lock are you talking about?","commit_id":"774bcbfe608c81257b0c0c3b626022ab693d1dbe"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"ffc49eeca00f264cfe0887cc2e62849cfed6409c","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        # Yield to allow other threads that may be ready an opportunity to run."},{"line_number":182,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":183,"context_line":"        # over again, in which case no other threads waiting on the"},{"line_number":184,"context_line":"        # \"dhcp-agent\" lock would make any progress."},{"line_number":185,"context_line":"        time.sleep(0)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    @_sync_lock"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_12d63d56","line":184,"range":{"start_line":184,"start_character":10,"end_line":184,"end_character":27},"in_reply_to":"5f7c97a3_13f663d9","updated":"2018-07-23 09:34:31.000000000","message":"Based on the cpython threading implementation [1], threading.event uses an underlying lock to implement a condition variable. When the event is being set, the schedule_resync needs to acquire the cited \"dhcp-agent\" lock which is a low-level _thread lock to notify/wake up all threads waiting on the condition. Since it does not yield to other threads when releasing a lock, this will cause issues when an exception occurs where the following resync in other threads needs to acquire the lock again.\n\n[1] https://github.com/python/cpython/blob/master/Lib/threading.py","commit_id":"774bcbfe608c81257b0c0c3b626022ab693d1dbe"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1e4d7cec99483ab7f89d0b3c66f65e31f20c8c5a","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def _periodic_resync_helper(self):"},{"line_number":255,"context_line":"        \"\"\"Resync the dhcp state at the configured interval.\"\"\""},{"line_number":256,"context_line":"        while True:"},{"line_number":257,"context_line":"            if self._periodic_resync_event.wait(self.conf.resync_interval):"},{"line_number":258,"context_line":"                self._periodic_resync_event.clear()"},{"line_number":259,"context_line":"            if self.needs_resync_reasons:"},{"line_number":260,"context_line":"                # be careful to avoid a race with additions to list"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_6ffe44b0","line":257,"updated":"2018-07-16 11:06:29.000000000","message":"According to documentation: https://docs.python.org/2/library/threading.html#threading.Event.wait it will always return True and it blocks until the internal flag is true.\nSo \"if\" is not necessary here IMO.","commit_id":"774bcbfe608c81257b0c0c3b626022ab693d1dbe"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e902f1a8e31ed06e32e8bfa3899ff436c3a7b2f6","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def _periodic_resync_helper(self):"},{"line_number":255,"context_line":"        \"\"\"Resync the dhcp state at the configured interval.\"\"\""},{"line_number":256,"context_line":"        while True:"},{"line_number":257,"context_line":"            if self._periodic_resync_event.wait(self.conf.resync_interval):"},{"line_number":258,"context_line":"                self._periodic_resync_event.clear()"},{"line_number":259,"context_line":"            if self.needs_resync_reasons:"},{"line_number":260,"context_line":"                # be careful to avoid a race with additions to list"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_f3d887ed","line":257,"in_reply_to":"5f7c97a3_18ba7770","updated":"2018-07-20 12:58:47.000000000","message":"doesn\u0027t this defeat batching and end up with more frequent get_active_networks_info calls?\ni suspect it\u0027s safer to have minimum interval.","commit_id":"774bcbfe608c81257b0c0c3b626022ab693d1dbe"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"5028d1ed73b4b37e69ae7e27d8c0d808dfacb70c","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def _periodic_resync_helper(self):"},{"line_number":255,"context_line":"        \"\"\"Resync the dhcp state at the configured interval.\"\"\""},{"line_number":256,"context_line":"        while True:"},{"line_number":257,"context_line":"            if self._periodic_resync_event.wait(self.conf.resync_interval):"},{"line_number":258,"context_line":"                self._periodic_resync_event.clear()"},{"line_number":259,"context_line":"            if self.needs_resync_reasons:"},{"line_number":260,"context_line":"                # be careful to avoid a race with additions to list"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_9523b206","line":257,"in_reply_to":"5f7c97a3_6ffe44b0","updated":"2018-07-16 14:02:03.000000000","message":"Based on the cited doc: \"This method returns the internal flag on exit, so it will always return True except if a timeout is given and the operation times out.\", the return value can be True or False depending on whether a timeout occurred.\nSo I guess the \"if\" is still needed here? Just correct me if I\u0027m wrong.","commit_id":"774bcbfe608c81257b0c0c3b626022ab693d1dbe"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e702e3d08f21fcf4714eeacc06658d450dc5821a","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def _periodic_resync_helper(self):"},{"line_number":255,"context_line":"        \"\"\"Resync the dhcp state at the configured interval.\"\"\""},{"line_number":256,"context_line":"        while True:"},{"line_number":257,"context_line":"            if self._periodic_resync_event.wait(self.conf.resync_interval):"},{"line_number":258,"context_line":"                self._periodic_resync_event.clear()"},{"line_number":259,"context_line":"            if self.needs_resync_reasons:"},{"line_number":260,"context_line":"                # be careful to avoid a race with additions to list"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_18ba7770","line":257,"in_reply_to":"5f7c97a3_9523b206","updated":"2018-07-16 14:13:08.000000000","message":"ahh, right. I missed that part. Sorry :)","commit_id":"774bcbfe608c81257b0c0c3b626022ab693d1dbe"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"ffc49eeca00f264cfe0887cc2e62849cfed6409c","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def _periodic_resync_helper(self):"},{"line_number":255,"context_line":"        \"\"\"Resync the dhcp state at the configured interval.\"\"\""},{"line_number":256,"context_line":"        while True:"},{"line_number":257,"context_line":"            if self._periodic_resync_event.wait(self.conf.resync_interval):"},{"line_number":258,"context_line":"                self._periodic_resync_event.clear()"},{"line_number":259,"context_line":"            if self.needs_resync_reasons:"},{"line_number":260,"context_line":"                # be careful to avoid a race with additions to list"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_ad77e807","line":257,"in_reply_to":"5f7c97a3_f3d887ed","updated":"2018-07-23 09:34:31.000000000","message":"This implements an immediate reaction to a network event, but if nothing happens it still does a predefined second sync.\n\nComparing this w/ providing a static resync interval, we will have the following benefits in general:\n1) If the user\u0027s scenario has infrequent resync events, the deployer can configure w/ a long resync interval to save the resource but get faster reaction/recovery at the same time.\n2) If the user\u0027s scenario has very frequent resync events, we will get the same/similar behavior as a config level small interval.\n3) If it\u0027s intermediate frequency, indeed we may possibly get more frequent get_active_networks_info calls but it can be seen as a trade-off for an immediate reaction.\n\nBesides, the value of a minimum interval is hard to quantize. Maybe providing an option to enable/disable the event driven dhcp resync for deployers to make self decisions is a better idea?","commit_id":"774bcbfe608c81257b0c0c3b626022ab693d1dbe"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e902f1a8e31ed06e32e8bfa3899ff436c3a7b2f6","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                        net \u003d \"*\""},{"line_number":267,"context_line":"                    LOG.debug(\"resync (%(network)s): %(reason)s\","},{"line_number":268,"context_line":"                              {\"reason\": r, \"network\": net})"},{"line_number":269,"context_line":"                self.sync_state(reasons.keys())"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def periodic_resync(self):"},{"line_number":272,"context_line":"        \"\"\"Spawn a thread to periodically resync the dhcp state.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_5307fb70","line":269,"range":{"start_line":269,"start_character":21,"end_line":269,"end_character":31},"updated":"2018-07-20 12:58:47.000000000","message":"if sync_state failed and ended up with schedule_resync, we will busy-loop?","commit_id":"774bcbfe608c81257b0c0c3b626022ab693d1dbe"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"ffc49eeca00f264cfe0887cc2e62849cfed6409c","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                        net \u003d \"*\""},{"line_number":267,"context_line":"                    LOG.debug(\"resync (%(network)s): %(reason)s\","},{"line_number":268,"context_line":"                              {\"reason\": r, \"network\": net})"},{"line_number":269,"context_line":"                self.sync_state(reasons.keys())"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def periodic_resync(self):"},{"line_number":272,"context_line":"        \"\"\"Spawn a thread to periodically resync the dhcp state.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_ed8880c4","line":269,"range":{"start_line":269,"start_character":21,"end_line":269,"end_character":31},"in_reply_to":"5f7c97a3_5307fb70","updated":"2018-07-23 09:34:31.000000000","message":"This also applies when we just reduce the retry interval. It can be treated as an issue thru another thread. The potential solution could be adding a threshold based maximum failure retry mechanism which may dynamically deal with the continuous failure.\nWould you prefer that we also address this from this RFE\u0027s perspective?","commit_id":"774bcbfe608c81257b0c0c3b626022ab693d1dbe"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"667f0ab997972452b85a4045208a39f1cb6cb599","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.needs_resync_reasons \u003d collections.defaultdict(list)"},{"line_number":89,"context_line":"        self.dhcp_ready_ports \u003d set()"},{"line_number":90,"context_line":"        self.conf \u003d conf or cfg.CONF"},{"line_number":91,"context_line":"        self._periodic_resync_event \u003d threading.Event()"},{"line_number":92,"context_line":"        self.cache \u003d NetworkCache()"},{"line_number":93,"context_line":"        self.dhcp_driver_cls \u003d importutils.import_class(self.conf.dhcp_driver)"},{"line_number":94,"context_line":"        self.plugin_rpc \u003d DhcpPluginApi(topics.PLUGIN, self.conf.host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_c4dba34b","line":91,"range":{"start_line":91,"start_character":38,"end_line":91,"end_character":55},"updated":"2018-09-28 19:51:33.000000000","message":"Neutron (and other OpenStack services) are using eventlet/greenthread, so I wonder if it is better to use eventlet.event.Event class [1] instead.\n\n[1] http://eventlet.net/doc/modules/event.html","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"5c94dfad6b2e5b57a4e6ddea5e1761b608b78e74","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.needs_resync_reasons \u003d collections.defaultdict(list)"},{"line_number":89,"context_line":"        self.dhcp_ready_ports \u003d set()"},{"line_number":90,"context_line":"        self.conf \u003d conf or cfg.CONF"},{"line_number":91,"context_line":"        self._periodic_resync_event \u003d threading.Event()"},{"line_number":92,"context_line":"        self.cache \u003d NetworkCache()"},{"line_number":93,"context_line":"        self.dhcp_driver_cls \u003d importutils.import_class(self.conf.dhcp_driver)"},{"line_number":94,"context_line":"        self.plugin_rpc \u003d DhcpPluginApi(topics.PLUGIN, self.conf.host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_f67c4e72","line":91,"range":{"start_line":91,"start_character":38,"end_line":91,"end_character":55},"in_reply_to":"3f79a3b5_c4dba34b","updated":"2018-09-29 01:21:17.000000000","message":"Thanks for the great information.\nIMO, eventlet.event.Event may not easily adapt to our requirement here. Different from threading.Event using an internal flag, it is an error for eventlet.event.Event to call send() multiple times on the same event [1]. Since schedule_resync event may be triggered via multiple RPC calls, either using a list of events OR having reset() between send()s is needed. BTW, there are quite a few OpenStack projects using threading.Event. So I guess it\u0027s OK to use it here. Just correct me if I\u0027m wrong.\n\n[1] http://eventlet.net/doc/modules/event.html#eventlet.event.Event.send","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"667f0ab997972452b85a4045208a39f1cb6cb599","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":183,"context_line":"        # over again, in which case no other threads waiting on the"},{"line_number":184,"context_line":"        # \"dhcp-agent\" lock would make any progress."},{"line_number":185,"context_line":"        time.sleep(0)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    @_sync_lock"},{"line_number":188,"context_line":"    def sync_state(self, networks\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_24c3775a","line":185,"range":{"start_line":185,"start_character":8,"end_line":185,"end_character":21},"updated":"2018-09-28 19:51:33.000000000","message":"nit: the general preference is using greenthread.sleep(0) instead of time.sleep(0). See https://docs.openstack.org/cinder/latest/contributor/threading.html#yielding-the-thread-in-long-running-tasks","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"5c94dfad6b2e5b57a4e6ddea5e1761b608b78e74","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":183,"context_line":"        # over again, in which case no other threads waiting on the"},{"line_number":184,"context_line":"        # \"dhcp-agent\" lock would make any progress."},{"line_number":185,"context_line":"        time.sleep(0)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    @_sync_lock"},{"line_number":188,"context_line":"    def sync_state(self, networks\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_90cac16b","line":185,"range":{"start_line":185,"start_character":8,"end_line":185,"end_character":21},"in_reply_to":"3f79a3b5_24c3775a","updated":"2018-09-29 01:21:17.000000000","message":"Done","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ea1852b050d633f6df6f1d58ed7d912b8e82a1b6","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        \"\"\""},{"line_number":179,"context_line":"        self.needs_resync_reasons[network_id].append(reason)"},{"line_number":180,"context_line":"        self._periodic_resync_event.set()"},{"line_number":181,"context_line":"        # Yield to allow other threads that may be ready an opportunity to run."},{"line_number":182,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":183,"context_line":"        # over again, in which case no other threads waiting on the"},{"line_number":184,"context_line":"        # \"dhcp-agent\" lock would make any progress."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_1c032bc0","line":181,"range":{"start_line":181,"start_character":51,"end_line":181,"end_character":79},"updated":"2018-09-29 05:26:06.000000000","message":"read to run","commit_id":"cf2a30174f4a9aeac48447c8f4f0f593232cf169"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"9b2830ccc4e196c653fdf2b8a3c1d5afdfb1ae8d","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        \"\"\""},{"line_number":179,"context_line":"        self.needs_resync_reasons[network_id].append(reason)"},{"line_number":180,"context_line":"        self._periodic_resync_event.set()"},{"line_number":181,"context_line":"        # Yield to allow other threads that may be ready an opportunity to run."},{"line_number":182,"context_line":"        # This helps prevent one thread from acquiring the same lock over and"},{"line_number":183,"context_line":"        # over again, in which case no other threads waiting on the"},{"line_number":184,"context_line":"        # \"dhcp-agent\" lock would make any progress."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_9f0bad29","line":181,"range":{"start_line":181,"start_character":51,"end_line":181,"end_character":79},"in_reply_to":"3f79a3b5_1c032bc0","updated":"2018-09-29 11:25:30.000000000","message":"Done","commit_id":"cf2a30174f4a9aeac48447c8f4f0f593232cf169"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ee2165d6c0c9b961e1b5985238670a1c57f4cc6c","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            # returns the internal flag on exit, so it will always return True"},{"line_number":266,"context_line":"            # except if a timeout is given and the operation times out."},{"line_number":267,"context_line":"            if self._periodic_resync_event.wait(self.conf.resync_interval):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Have resync event scheduled.\u0027)"},{"line_number":269,"context_line":"                clear_periodic_resync_event \u003d self._periodic_resync_event.clear"},{"line_number":270,"context_line":"                # configure throttler for clear_periodic_resync_event to"},{"line_number":271,"context_line":"                # introduce delays between resync state events."}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_73f1e8dd","line":268,"range":{"start_line":268,"start_character":27,"end_line":268,"end_character":55},"updated":"2018-10-15 17:17:02.000000000","message":"resync event have been scheduled ?","commit_id":"c70ad46129a7ea4f525afee0d1e7773ddca99b00"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"bd2d66f2ed1bf61181203f9f37f464306bbb21ea","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            # returns the internal flag on exit, so it will always return True"},{"line_number":266,"context_line":"            # except if a timeout is given and the operation times out."},{"line_number":267,"context_line":"            if self._periodic_resync_event.wait(self.conf.resync_interval):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Have resync event scheduled.\u0027)"},{"line_number":269,"context_line":"                clear_periodic_resync_event \u003d self._periodic_resync_event.clear"},{"line_number":270,"context_line":"                # configure throttler for clear_periodic_resync_event to"},{"line_number":271,"context_line":"                # introduce delays between resync state events."}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_900b50d2","line":268,"range":{"start_line":268,"start_character":27,"end_line":268,"end_character":55},"in_reply_to":"3f79a3b5_73f1e8dd","updated":"2018-10-16 01:40:07.000000000","message":"Done","commit_id":"c70ad46129a7ea4f525afee0d1e7773ddca99b00"}],"neutron/conf/agent/dhcp.py":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"78cd42ac78877d056dd7f59ce319c456982fbb5d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"                      \"recover from any transient notification or RPC errors. \""},{"line_number":27,"context_line":"                      \"The interval is number of seconds between attempts.\")),"},{"line_number":28,"context_line":"    cfg.IntOpt(\u0027resync_throttle\u0027, default\u003d1,"},{"line_number":29,"context_line":"               help\u003d_(\"Throttle the number of resync state events between the\""},{"line_number":30,"context_line":"                      \"local DHCP state and Neutron to only once per\""},{"line_number":31,"context_line":"                      \"\u0027resync_throttle\u0027 seconds. The value of throttle\""},{"line_number":32,"context_line":"                      \"introduces minimum intervals between resync state\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_24f7f75c","line":29,"range":{"start_line":29,"start_character":77,"end_line":29,"end_character":78},"updated":"2018-09-28 20:08:29.000000000","message":"nit: space before \". This applies to below.","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"5c94dfad6b2e5b57a4e6ddea5e1761b608b78e74","unresolved":false,"context_lines":[{"line_number":26,"context_line":"                      \"recover from any transient notification or RPC errors. \""},{"line_number":27,"context_line":"                      \"The interval is number of seconds between attempts.\")),"},{"line_number":28,"context_line":"    cfg.IntOpt(\u0027resync_throttle\u0027, default\u003d1,"},{"line_number":29,"context_line":"               help\u003d_(\"Throttle the number of resync state events between the\""},{"line_number":30,"context_line":"                      \"local DHCP state and Neutron to only once per\""},{"line_number":31,"context_line":"                      \"\u0027resync_throttle\u0027 seconds. The value of throttle\""},{"line_number":32,"context_line":"                      \"introduces minimum intervals between resync state\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_d00d99e7","line":29,"range":{"start_line":29,"start_character":77,"end_line":29,"end_character":78},"in_reply_to":"3f79a3b5_24f7f75c","updated":"2018-09-29 01:21:17.000000000","message":"Done","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"78cd42ac78877d056dd7f59ce319c456982fbb5d","unresolved":false,"context_lines":[{"line_number":29,"context_line":"               help\u003d_(\"Throttle the number of resync state events between the\""},{"line_number":30,"context_line":"                      \"local DHCP state and Neutron to only once per\""},{"line_number":31,"context_line":"                      \"\u0027resync_throttle\u0027 seconds. The value of throttle\""},{"line_number":32,"context_line":"                      \"introduces minimum intervals between resync state\""},{"line_number":33,"context_line":"                      \"events; otherwise the resync may end up in a\""},{"line_number":34,"context_line":"                      \"busy-loop.\")),"},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027dhcp_driver\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_64af2f2b","line":32,"range":{"start_line":32,"start_character":42,"end_line":32,"end_character":51},"updated":"2018-09-28 20:08:29.000000000","message":"interval","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"5c94dfad6b2e5b57a4e6ddea5e1761b608b78e74","unresolved":false,"context_lines":[{"line_number":29,"context_line":"               help\u003d_(\"Throttle the number of resync state events between the\""},{"line_number":30,"context_line":"                      \"local DHCP state and Neutron to only once per\""},{"line_number":31,"context_line":"                      \"\u0027resync_throttle\u0027 seconds. The value of throttle\""},{"line_number":32,"context_line":"                      \"introduces minimum intervals between resync state\""},{"line_number":33,"context_line":"                      \"events; otherwise the resync may end up in a\""},{"line_number":34,"context_line":"                      \"busy-loop.\")),"},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027dhcp_driver\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_70f605db","line":32,"range":{"start_line":32,"start_character":42,"end_line":32,"end_character":51},"in_reply_to":"3f79a3b5_64af2f2b","updated":"2018-09-29 01:21:17.000000000","message":"Done","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"78cd42ac78877d056dd7f59ce319c456982fbb5d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                      \"local DHCP state and Neutron to only once per\""},{"line_number":31,"context_line":"                      \"\u0027resync_throttle\u0027 seconds. The value of throttle\""},{"line_number":32,"context_line":"                      \"introduces minimum intervals between resync state\""},{"line_number":33,"context_line":"                      \"events; otherwise the resync may end up in a\""},{"line_number":34,"context_line":"                      \"busy-loop.\")),"},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027dhcp_driver\u0027,"},{"line_number":36,"context_line":"               default\u003d\u0027neutron.agent.linux.dhcp.Dnsmasq\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_44a23341","line":33,"range":{"start_line":33,"start_character":29,"end_line":33,"end_character":30},"updated":"2018-09-28 20:08:29.000000000","message":"Period is better in here.","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"5c94dfad6b2e5b57a4e6ddea5e1761b608b78e74","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                      \"local DHCP state and Neutron to only once per\""},{"line_number":31,"context_line":"                      \"\u0027resync_throttle\u0027 seconds. The value of throttle\""},{"line_number":32,"context_line":"                      \"introduces minimum intervals between resync state\""},{"line_number":33,"context_line":"                      \"events; otherwise the resync may end up in a\""},{"line_number":34,"context_line":"                      \"busy-loop.\")),"},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027dhcp_driver\u0027,"},{"line_number":36,"context_line":"               default\u003d\u0027neutron.agent.linux.dhcp.Dnsmasq\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_90f3a1e7","line":33,"range":{"start_line":33,"start_character":29,"end_line":33,"end_character":30},"in_reply_to":"3f79a3b5_44a23341","updated":"2018-09-29 01:21:17.000000000","message":"Done","commit_id":"8d20bb24ecbf3d19399af50b767a7f91a7909c7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"02d6a5e629deb19af5e9745c8317a1f75ed32d53","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DHCP_AGENT_OPTS \u003d ["},{"line_number":24,"context_line":"    cfg.IntOpt(\u0027resync_interval\u0027, default\u003d5,"},{"line_number":25,"context_line":"               help\u003d_(\"The DHCP agent will resync its state with Neutron to \""},{"line_number":26,"context_line":"                      \"recover from any transient notification or RPC errors. \""},{"line_number":27,"context_line":"                      \"The interval is number of seconds between attempts.\")),"},{"line_number":28,"context_line":"    cfg.IntOpt(\u0027resync_throttle\u0027, default\u003d1,"},{"line_number":29,"context_line":"               help\u003d_(\"Throttle the number of resync state events between the \""},{"line_number":30,"context_line":"                      \"local DHCP state and Neutron to only once per \""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_ac6730ea","line":27,"range":{"start_line":25,"start_character":23,"end_line":27,"end_character":74},"updated":"2018-10-15 08:16:04.000000000","message":"I think that this help message should be updated now as it is like something like \"the interval is maximum number of seconds between attempts. It can be done more often based on events triggered\"","commit_id":"9e50899d18465d2ba11910ec7812ef9ae2b6f7ea"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"7b986feae257d8057929b9f96d73b4e7f11ef418","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DHCP_AGENT_OPTS \u003d ["},{"line_number":24,"context_line":"    cfg.IntOpt(\u0027resync_interval\u0027, default\u003d5,"},{"line_number":25,"context_line":"               help\u003d_(\"The DHCP agent will resync its state with Neutron to \""},{"line_number":26,"context_line":"                      \"recover from any transient notification or RPC errors. \""},{"line_number":27,"context_line":"                      \"The interval is number of seconds between attempts.\")),"},{"line_number":28,"context_line":"    cfg.IntOpt(\u0027resync_throttle\u0027, default\u003d1,"},{"line_number":29,"context_line":"               help\u003d_(\"Throttle the number of resync state events between the \""},{"line_number":30,"context_line":"                      \"local DHCP state and Neutron to only once per \""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_a7b4291e","line":27,"range":{"start_line":25,"start_character":23,"end_line":27,"end_character":74},"in_reply_to":"3f79a3b5_ac6730ea","updated":"2018-10-15 14:13:15.000000000","message":"Done","commit_id":"9e50899d18465d2ba11910ec7812ef9ae2b6f7ea"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"02d6a5e629deb19af5e9745c8317a1f75ed32d53","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                      \"\u0027resync_throttle\u0027 seconds. The value of throttle \""},{"line_number":32,"context_line":"                      \"introduces a minimum interval between resync state \""},{"line_number":33,"context_line":"                      \"events. Otherwise the resync may end up in a \""},{"line_number":34,"context_line":"                      \"busy-loop.\")),"},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027dhcp_driver\u0027,"},{"line_number":36,"context_line":"               default\u003d\u0027neutron.agent.linux.dhcp.Dnsmasq\u0027,"},{"line_number":37,"context_line":"               help\u003d_(\"The driver used to manage the DHCP server.\")),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_ec9e88b5","line":34,"updated":"2018-10-15 08:16:04.000000000","message":"how it will work if resync_throttle will be higher than resync_interval value? Shouldn\u0027t You avoid/warn about that?","commit_id":"9e50899d18465d2ba11910ec7812ef9ae2b6f7ea"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"7b986feae257d8057929b9f96d73b4e7f11ef418","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                      \"\u0027resync_throttle\u0027 seconds. The value of throttle \""},{"line_number":32,"context_line":"                      \"introduces a minimum interval between resync state \""},{"line_number":33,"context_line":"                      \"events. Otherwise the resync may end up in a \""},{"line_number":34,"context_line":"                      \"busy-loop.\")),"},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027dhcp_driver\u0027,"},{"line_number":36,"context_line":"               default\u003d\u0027neutron.agent.linux.dhcp.Dnsmasq\u0027,"},{"line_number":37,"context_line":"               help\u003d_(\"The driver used to manage the DHCP server.\")),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_64da8879","line":34,"in_reply_to":"3f79a3b5_ec9e88b5","updated":"2018-10-15 14:13:15.000000000","message":"If \u0027resync_throttle\u0027 is configured more than \u0027resync_interval\u0027 by mistake, raise exception and log with message. Also update the opt help description to warn the user.","commit_id":"9e50899d18465d2ba11910ec7812ef9ae2b6f7ea"}],"neutron/tests/unit/agent/dhcp/test_agent.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9bfe9433bb49c369ea0cca90f2f47c1e9f8ec86d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                                  network_id\u003dFAKE_NETWORK_UUID,"},{"line_number":86,"context_line":"                                  cidr\u003d\u0027169.254.169.252/30\u0027,"},{"line_number":87,"context_line":"                                  gateway_ip\u003d\u0027169.254.169.253\u0027,"},{"line_number":88,"context_line":"                                  enable_dhcp\u003dTrue, ip_version\u003d4))"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"fake_fixed_ip1 \u003d dhcp.DictModel(dict(id\u003d\u0027\u0027, subnet_id\u003dfake_subnet1.id,"},{"line_number":91,"context_line":"                                ip_address\u003d\u0027172.9.9.9\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_c4efdc19","line":88,"updated":"2018-10-15 14:12:59.000000000","message":"those all changes are not related to this patch and probably shouldn\u0027t be here :)","commit_id":"baa98ec3231c55ac09aa514c208544a9e1e03931"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ee2165d6c0c9b961e1b5985238670a1c57f4cc6c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                                  network_id\u003dFAKE_NETWORK_UUID,"},{"line_number":86,"context_line":"                                  cidr\u003d\u0027169.254.169.252/30\u0027,"},{"line_number":87,"context_line":"                                  gateway_ip\u003d\u0027169.254.169.253\u0027,"},{"line_number":88,"context_line":"                                  enable_dhcp\u003dTrue, ip_version\u003d4))"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"fake_fixed_ip1 \u003d dhcp.DictModel(dict(id\u003d\u0027\u0027, subnet_id\u003dfake_subnet1.id,"},{"line_number":91,"context_line":"                                ip_address\u003d\u0027172.9.9.9\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_5392ac59","line":88,"in_reply_to":"3f79a3b5_c4cd9c2f","updated":"2018-10-15 17:17:02.000000000","message":"looks unrelated if compared with base.","commit_id":"baa98ec3231c55ac09aa514c208544a9e1e03931"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"1ed40d79fba8361e6affc52672814a2700c351ee","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                                  network_id\u003dFAKE_NETWORK_UUID,"},{"line_number":86,"context_line":"                                  cidr\u003d\u0027169.254.169.252/30\u0027,"},{"line_number":87,"context_line":"                                  gateway_ip\u003d\u0027169.254.169.253\u0027,"},{"line_number":88,"context_line":"                                  enable_dhcp\u003dTrue, ip_version\u003d4))"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"fake_fixed_ip1 \u003d dhcp.DictModel(dict(id\u003d\u0027\u0027, subnet_id\u003dfake_subnet1.id,"},{"line_number":91,"context_line":"                                ip_address\u003d\u0027172.9.9.9\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_c4cd9c2f","line":88,"in_reply_to":"3f79a3b5_c4efdc19","updated":"2018-10-15 14:33:19.000000000","message":"The unrelated changes you might see are brought by the rebase between patch sets.\nPlease kindly examine the actual diffs between the latest and the base. I guess there should be no impact to the patch itself, right?","commit_id":"baa98ec3231c55ac09aa514c208544a9e1e03931"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ee2165d6c0c9b961e1b5985238670a1c57f4cc6c","unresolved":false,"context_lines":[{"line_number":530,"context_line":"                sync_state.side_effect \u003d RuntimeError"},{"line_number":531,"context_line":"                with testtools.ExpectedException(RuntimeError):"},{"line_number":532,"context_line":"                    dhcp._periodic_resync_helper()"},{"line_number":533,"context_line":"            log.assert_any_call(\"Have resync event scheduled.\")"},{"line_number":534,"context_line":"            sync_state.assert_called_once_with(reasons)"},{"line_number":535,"context_line":"            self.assertEqual(0, len(dhcp.needs_resync_reasons))"},{"line_number":536,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_b3b22004","line":533,"range":{"start_line":533,"start_character":33,"end_line":533,"end_character":60},"updated":"2018-10-15 17:17:02.000000000","message":"this also need rephrasing !","commit_id":"c70ad46129a7ea4f525afee0d1e7773ddca99b00"},{"author":{"_account_id":28373,"name":"Kailun Qin","email":"kailun.qin@hotmail.com","username":"kailun.qin"},"change_message_id":"bd2d66f2ed1bf61181203f9f37f464306bbb21ea","unresolved":false,"context_lines":[{"line_number":530,"context_line":"                sync_state.side_effect \u003d RuntimeError"},{"line_number":531,"context_line":"                with testtools.ExpectedException(RuntimeError):"},{"line_number":532,"context_line":"                    dhcp._periodic_resync_helper()"},{"line_number":533,"context_line":"            log.assert_any_call(\"Have resync event scheduled.\")"},{"line_number":534,"context_line":"            sync_state.assert_called_once_with(reasons)"},{"line_number":535,"context_line":"            self.assertEqual(0, len(dhcp.needs_resync_reasons))"},{"line_number":536,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_30f6fcd9","line":533,"range":{"start_line":533,"start_character":33,"end_line":533,"end_character":60},"in_reply_to":"3f79a3b5_b3b22004","updated":"2018-10-16 01:40:07.000000000","message":"Done","commit_id":"c70ad46129a7ea4f525afee0d1e7773ddca99b00"}]}
