)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"0ceddd10db6af02a816c440751459ad47c2459ca","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In addition to periodic checks of L3 and DHCP agents"},{"line_number":10,"context_line":"add periodic checks of overall health of registered agents."},{"line_number":11,"context_line":"Log total count of agents at info level so by default"},{"line_number":12,"context_line":"logs of neutron-server could show neutron \"health\""},{"line_number":13,"context_line":"In case some agents found dead - log detailed info about them:"},{"line_number":14,"context_line":"Type of agent, Last heartbeat, host."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba15a1d1_de431812","line":11,"updated":"2015-09-22 12:38:40.000000000","message":"nit: the log is at warn level, not info?","commit_id":"c703f0161c9bb21f43b8b302e27229a59816dfea"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"18c5d4507051df9362e28390fab51ef0e48c5421","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In addition to periodic checks of L3 and DHCP agents"},{"line_number":10,"context_line":"add periodic checks of overall health of registered agents."},{"line_number":11,"context_line":"Log total count of agents at info level so by default"},{"line_number":12,"context_line":"logs of neutron-server could show neutron \"health\""},{"line_number":13,"context_line":"In case some agents found dead - log detailed info about them:"},{"line_number":14,"context_line":"Type of agent, Last heartbeat, host."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba15a1d1_9041080e","line":11,"in_reply_to":"ba15a1d1_de431812","updated":"2015-09-22 14:03:30.000000000","message":"good catch. This has been changed after the discussion in the comments.\nI\u0027ll update the commit msg.","commit_id":"c703f0161c9bb21f43b8b302e27229a59816dfea"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"ac6cf93d97f8dcf9f3b6d50de66979abb2d0c818","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In addition to periodic checks of L3 and DHCP agents"},{"line_number":10,"context_line":"add periodic checks of overall health of registered agents."},{"line_number":11,"context_line":"Log total count of agents at debug level so it\u0027s could be"},{"line_number":12,"context_line":"seen in logs of neutron-server."},{"line_number":13,"context_line":"In case some agents found dead - log detailed info about them:"},{"line_number":14,"context_line":"Type of agent, last heartbeat, host."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9a1a9d01_b487ddb3","line":11,"updated":"2015-09-30 20:59:12.000000000","message":"nit - c/it\u0027s could/it can","commit_id":"b6e4a2a1dff2d1b0f3c4c8c3728776253dc38313"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"ac6cf93d97f8dcf9f3b6d50de66979abb2d0c818","unresolved":false,"context_lines":[{"line_number":10,"context_line":"add periodic checks of overall health of registered agents."},{"line_number":11,"context_line":"Log total count of agents at debug level so it\u0027s could be"},{"line_number":12,"context_line":"seen in logs of neutron-server."},{"line_number":13,"context_line":"In case some agents found dead - log detailed info about them:"},{"line_number":14,"context_line":"Type of agent, last heartbeat, host."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5db81dad4e9e8325ad3fa3a3e6d5d2d0deb297dd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9a1a9d01_d4b4d182","line":13,"updated":"2015-09-30 20:59:12.000000000","message":"nit again - \"...agents are found...\"","commit_id":"b6e4a2a1dff2d1b0f3c4c8c3728776253dc38313"}],"neutron/db/agents_db.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"0f9efd5ea359c566545e4f945bc10cf1745eeff8","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      \u0027total\u0027: len(agents),"},{"line_number":204,"context_line":"                      \u0027data\u0027: data})"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            LOG.info(_LI(\"Agent healthcheck: found %s active agents\"),"},{"line_number":207,"context_line":"                     len(agents))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_agent_by_type_and_host(self, context, agent_type, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9af37de9_a9809147","line":206,"updated":"2015-05-10 14:48:17.000000000","message":"the log will be full of this log. So I think we should just do nothing for this if branch.","commit_id":"daeab89e139fb7c6fef940a4d88a4cd8203c6881"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"b60d98bb80d0768a57cb14886b4466a3cd2ba60d","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      \u0027total\u0027: len(agents),"},{"line_number":204,"context_line":"                      \u0027data\u0027: data})"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            LOG.info(_LI(\"Agent healthcheck: found %s active agents\"),"},{"line_number":207,"context_line":"                     len(agents))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_agent_by_type_and_host(self, context, agent_type, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_b3ba0de0","line":206,"in_reply_to":"9a0c5dc1_393020e8","updated":"2015-05-15 09:52:07.000000000","message":"the periodic info will be annoying, I still think the \"nothing output means everything is good\" principle makes sense here.","commit_id":"daeab89e139fb7c6fef940a4d88a4cd8203c6881"},{"author":{"_account_id":8645,"name":"Trinath Somanchi","email":"trinath.somanchi@freescale.com","username":"trinaths"},"change_message_id":"5ba0256b74e0c2f6d5012a61a278ac24eb63822f","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      \u0027total\u0027: len(agents),"},{"line_number":204,"context_line":"                      \u0027data\u0027: data})"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            LOG.info(_LI(\"Agent healthcheck: found %s active agents\"),"},{"line_number":207,"context_line":"                     len(agents))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_agent_by_type_and_host(self, context, agent_type, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_7235b344","line":206,"in_reply_to":"9a0c5dc1_575f4172","updated":"2015-05-13 08:00:02.000000000","message":"debug printing would be good to have rather than info","commit_id":"daeab89e139fb7c6fef940a4d88a4cd8203c6881"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"39f67a4eced30049227385094d71a8c34c4bca43","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      \u0027total\u0027: len(agents),"},{"line_number":204,"context_line":"                      \u0027data\u0027: data})"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            LOG.info(_LI(\"Agent healthcheck: found %s active agents\"),"},{"line_number":207,"context_line":"                     len(agents))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_agent_by_type_and_host(self, context, agent_type, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_393020e8","line":206,"in_reply_to":"9a0c5dc1_7235b344","updated":"2015-05-13 19:59:32.000000000","message":"No, you\u0027re missing the point. Default log level (info) should provide visible (not implied) information about agent health.","commit_id":"daeab89e139fb7c6fef940a4d88a4cd8203c6881"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"11302d2defa1671d9be6f0fba3ebb554ab3bfbfe","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      \u0027total\u0027: len(agents),"},{"line_number":204,"context_line":"                      \u0027data\u0027: data})"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            LOG.info(_LI(\"Agent healthcheck: found %s active agents\"),"},{"line_number":207,"context_line":"                     len(agents))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_agent_by_type_and_host(self, context, agent_type, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_575f4172","line":206,"in_reply_to":"9af37de9_58b9ec2d","updated":"2015-05-13 07:23:41.000000000","message":"You can convert it to debug printing","commit_id":"daeab89e139fb7c6fef940a4d88a4cd8203c6881"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"761943ea2bab37f504d9cd85e9343025f2b24ae7","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      \u0027total\u0027: len(agents),"},{"line_number":204,"context_line":"                      \u0027data\u0027: data})"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            LOG.info(_LI(\"Agent healthcheck: found %s active agents\"),"},{"line_number":207,"context_line":"                     len(agents))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_agent_by_type_and_host(self, context, agent_type, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9af37de9_58b9ec2d","line":206,"in_reply_to":"9af37de9_a9809147","updated":"2015-05-10 23:29:45.000000000","message":"I can\u0027t agree here. \nIt\u0027s 1 INFO message per 15 seconds by default, typically even INFO-level logs contain many lines for 15 seconds.\nMy intent was to make agent health visible from the logs even on default logging level. This is just a tiny increase in logging even on the idle cluster.","commit_id":"daeab89e139fb7c6fef940a4d88a4cd8203c6881"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"6a690652c32c2f17f0b7e8385a168de3817dc18f","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    def health_check(self):"},{"line_number":191,"context_line":"        \"\"\"Scan agents and log if some are considered dead.\"\"\""},{"line_number":192,"context_line":"        agents \u003d self.get_agents(context.get_admin_context())"},{"line_number":193,"context_line":"        dead_agents \u003d [agent for agent in agents if not agent[\u0027alive\u0027]]"},{"line_number":194,"context_line":"        if dead_agents:"},{"line_number":195,"context_line":"            data \u003d \u0027%20s %20s %s\\n\u0027 % (\u0027Type\u0027, \u0027Last heartbeat\u0027, \"host\")"},{"line_number":196,"context_line":"            data +\u003d \u0027\\n\u0027.join([\u0027%20s %20s %s\u0027 %"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_686cf736","line":193,"updated":"2015-06-19 08:57:18.000000000","message":"I think it would be a good idea to skip including agents with admin_state_up set to False. No point in logging dead agents that the admin disabled.","commit_id":"9880a62aaf7ce1623c664d2881039871148f83ba"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"6a690652c32c2f17f0b7e8385a168de3817dc18f","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      \u0027total\u0027: len(agents),"},{"line_number":204,"context_line":"                      \u0027data\u0027: data})"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            LOG.info(_LI(\"Agent healthcheck: found %s active agents\"),"},{"line_number":207,"context_line":"                     len(agents))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_agent_by_type_and_host(self, context, agent_type, host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_88693b28","line":206,"updated":"2015-06-19 08:57:18.000000000","message":"What do you think about skipping the log message if the active agent count hasn\u0027t changed? Then you can just find the most recent \"found X active agents\" and know that it hasn\u0027t changed since then.","commit_id":"9880a62aaf7ce1623c664d2881039871148f83ba"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"ea75759c7add2cffaa5a44fc6916801edaf52c04","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      \u0027total\u0027: len(agents),"},{"line_number":204,"context_line":"                      \u0027data\u0027: data})"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            LOG.info(_LI(\"Agent healthcheck: found %s active agents\"),"},{"line_number":207,"context_line":"                     len(agents))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_agent_by_type_and_host(self, context, agent_type, host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_53b999e8","line":206,"updated":"2015-05-15 09:52:33.000000000","message":"the periodic info will be annoying, I still think the \"nothing output means everything is good\" principle makes sense here.","commit_id":"9880a62aaf7ce1623c664d2881039871148f83ba"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"4c510a12baeaaba3fd965e23813a199551d4ec35","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                      \u0027total\u0027: len(agents),"},{"line_number":204,"context_line":"                      \u0027data\u0027: data})"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            LOG.info(_LI(\"Agent healthcheck: found %s active agents\"),"},{"line_number":207,"context_line":"                     len(agents))"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _get_agent_by_type_and_host(self, context, agent_type, host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_d230b5ea","line":206,"in_reply_to":"7a016987_53b999e8","updated":"2015-05-18 05:41:38.000000000","message":"I\u0027ve been analyzing many-many log files and really lack this info, especially when agent count is changing (nodes being added, agents removed via API)\nIf you look at logs of working cluster it will be full of periodic request from nova and from monitoring services, but no information about neutron health at all. This should be fixed because it really complicates troubleshooting.","commit_id":"9880a62aaf7ce1623c664d2881039871148f83ba"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"ac6cf93d97f8dcf9f3b6d50de66979abb2d0c818","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from neutron.api.v2 import attributes"},{"line_number":28,"context_line":"from neutron.common import constants"},{"line_number":29,"context_line":"from neutron import context"},{"line_number":30,"context_line":"from neutron.db import model_base"},{"line_number":31,"context_line":"from neutron.db import models_v2"},{"line_number":32,"context_line":"from neutron.extensions import agent as ext_agent"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_f4e8f5b4","line":29,"updated":"2015-09-30 20:59:12.000000000","message":"this and line 34 should be moved up before line 27 to keep alphabetical order","commit_id":"b6e4a2a1dff2d1b0f3c4c8c3728776253dc38313"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"5932306107127c2c28ef7ea41e6c36f2c616dd4a","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from neutron.api.v2 import attributes"},{"line_number":28,"context_line":"from neutron.common import constants"},{"line_number":29,"context_line":"from neutron import context"},{"line_number":30,"context_line":"from neutron.db import model_base"},{"line_number":31,"context_line":"from neutron.db import models_v2"},{"line_number":32,"context_line":"from neutron.extensions import agent as ext_agent"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_9192cc9e","line":29,"in_reply_to":"9a1a9d01_bc833202","updated":"2015-10-01 13:47:34.000000000","message":"thanks - I was mistaken.  I thought that \"from X\" had to go before \"from X.Y\"  Virtual slap on the wrist for me :-)","commit_id":"b6e4a2a1dff2d1b0f3c4c8c3728776253dc38313"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"ec9484f8b859dc1e1fd5a5da288df5f8c2bc31d5","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from neutron.api.v2 import attributes"},{"line_number":28,"context_line":"from neutron.common import constants"},{"line_number":29,"context_line":"from neutron import context"},{"line_number":30,"context_line":"from neutron.db import model_base"},{"line_number":31,"context_line":"from neutron.db import models_v2"},{"line_number":32,"context_line":"from neutron.extensions import agent as ext_agent"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_bc833202","line":29,"in_reply_to":"9a1a9d01_f4e8f5b4","updated":"2015-10-01 09:21:35.000000000","message":"no, it\u0027s already alphabetical - checked by pep8","commit_id":"b6e4a2a1dff2d1b0f3c4c8c3728776253dc38313"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"ac6cf93d97f8dcf9f3b6d50de66979abb2d0c818","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                                 filters\u003d{\u0027admin_state_up\u0027: [True]})"},{"line_number":199,"context_line":"        dead_agents \u003d [agent for agent in agents if not agent[\u0027alive\u0027]]"},{"line_number":200,"context_line":"        if dead_agents:"},{"line_number":201,"context_line":"            data \u003d \u0027%20s %20s %s\\n\u0027 % (\u0027Type\u0027, \u0027Last heartbeat\u0027, \"host\")"},{"line_number":202,"context_line":"            data +\u003d \u0027\\n\u0027.join([\u0027%20s %20s %s\u0027 %"},{"line_number":203,"context_line":"                               (agent[\u0027agent_type\u0027],"},{"line_number":204,"context_line":"                                agent[\u0027heartbeat_timestamp\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_147c89ea","line":201,"updated":"2015-09-30 20:59:12.000000000","message":"Should this use .format instead of % ?\n\nAlso capitalize Host to be consistent.","commit_id":"b6e4a2a1dff2d1b0f3c4c8c3728776253dc38313"}],"neutron/db/agentschedulers_db.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"5fc3e4fc0f4c9045a41ab7379f89630eb3be8d23","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        initial_delay \u003d random.randint(interval, interval * 2)"},{"line_number":128,"context_line":"        loop.start(interval\u003dinterval, initial_delay\u003dinitial_delay)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if hasattr(self, \u0027periodic_agent_loops\u0027):"},{"line_number":131,"context_line":"            self.periodic_agent_loops.append(loop)"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            self.periodic_agent_loops \u003d [loop]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_ca273d61","line":130,"updated":"2015-09-01 10:30:35.000000000","message":"have not seen the periodic_agent_loops is used in other place.","commit_id":"bc75d0042c0c6f94983725327c434e710632e052"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"0f941c1a6ca622f8c821898e36dd2e1219055ed8","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        initial_delay \u003d random.randint(interval, interval * 2)"},{"line_number":128,"context_line":"        loop.start(interval\u003dinterval, initial_delay\u003dinitial_delay)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if hasattr(self, \u0027periodic_agent_loops\u0027):"},{"line_number":131,"context_line":"            self.periodic_agent_loops.append(loop)"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            self.periodic_agent_loops \u003d [loop]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_c4283236","line":130,"in_reply_to":"da20952f_4a000d02","updated":"2015-09-03 00:19:25.000000000","message":"I don\u0027t think we need to hold the loops. It is used to start the \"function\", after that it should finish its life. No need to hold it to consume memory.","commit_id":"bc75d0042c0c6f94983725327c434e710632e052"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"fe558e5a3b68acb4cb73473415dcbd4cd7ab3060","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        initial_delay \u003d random.randint(interval, interval * 2)"},{"line_number":128,"context_line":"        loop.start(interval\u003dinterval, initial_delay\u003dinitial_delay)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if hasattr(self, \u0027periodic_agent_loops\u0027):"},{"line_number":131,"context_line":"            self.periodic_agent_loops.append(loop)"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            self.periodic_agent_loops \u003d [loop]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_b3ff0a01","line":130,"in_reply_to":"da20952f_7a60c335","updated":"2015-09-07 03:23:19.000000000","message":"ok, if we agree all, can we put this attr along with agent_notifier, it is weird to define a new attribute on the fly. and also not friendly to test codes.","commit_id":"bc75d0042c0c6f94983725327c434e710632e052"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7f6e9f03bd76c09f45b60baf150de75a72a0e19b","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        initial_delay \u003d random.randint(interval, interval * 2)"},{"line_number":128,"context_line":"        loop.start(interval\u003dinterval, initial_delay\u003dinitial_delay)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if hasattr(self, \u0027periodic_agent_loops\u0027):"},{"line_number":131,"context_line":"            self.periodic_agent_loops.append(loop)"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            self.periodic_agent_loops \u003d [loop]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_7a60c335","line":130,"in_reply_to":"da20952f_7a820354","updated":"2015-09-03 14:59:51.000000000","message":"Agree that a reference should not consume much memory. Also the reference was there before so I don\u0027t think it should block the patch","commit_id":"bc75d0042c0c6f94983725327c434e710632e052"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"41988a026dc4e8b97867d7170959c9061146794d","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        initial_delay \u003d random.randint(interval, interval * 2)"},{"line_number":128,"context_line":"        loop.start(interval\u003dinterval, initial_delay\u003dinitial_delay)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if hasattr(self, \u0027periodic_agent_loops\u0027):"},{"line_number":131,"context_line":"            self.periodic_agent_loops.append(loop)"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            self.periodic_agent_loops \u003d [loop]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_ae41b40b","line":130,"in_reply_to":"da20952f_b3ff0a01","updated":"2015-09-08 08:19:09.000000000","message":"In fact agent_notifier is class attribute while we need object attribute here.\nI\u0027d need to put this in __init__ then. This kind of contradicts with \"Mixin\" concept.\n\nBut this method did add the attribute previously, so I don\u0027t think I\u0027m making the code worse in anyway.","commit_id":"bc75d0042c0c6f94983725327c434e710632e052"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"7875404727f64750fab2614d144370e5907700da","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        initial_delay \u003d random.randint(interval, interval * 2)"},{"line_number":128,"context_line":"        loop.start(interval\u003dinterval, initial_delay\u003dinitial_delay)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if hasattr(self, \u0027periodic_agent_loops\u0027):"},{"line_number":131,"context_line":"            self.periodic_agent_loops.append(loop)"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            self.periodic_agent_loops \u003d [loop]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_7a820354","line":130,"in_reply_to":"da20952f_c4283236","updated":"2015-09-03 14:54:27.000000000","message":"well, i think it\u0027s not a good thing to leave \u0027dangling\u0027 resources, e.g. unreachable from existing objects. That\u0027s the whole point.\n1-2 references arent consuming anything.","commit_id":"bc75d0042c0c6f94983725327c434e710632e052"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"4658193b79bc6f1eb7652e8a1ee3fd84cbe5b8d6","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        initial_delay \u003d random.randint(interval, interval * 2)"},{"line_number":128,"context_line":"        loop.start(interval\u003dinterval, initial_delay\u003dinitial_delay)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if hasattr(self, \u0027periodic_agent_loops\u0027):"},{"line_number":131,"context_line":"            self.periodic_agent_loops.append(loop)"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            self.periodic_agent_loops \u003d [loop]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_4a000d02","line":130,"in_reply_to":"da20952f_ca273d61","updated":"2015-09-01 10:47:36.000000000","message":"I\u0027m storing a reference to loop object in instance attribute.\nIt\u0027s not something required, but imo it\u0027s better to not leave in dangling.\n\nThat might be useful in unit tests at least.\nAlso, it\u0027s the same as was previously, but now it\u0027s more than one loop.","commit_id":"bc75d0042c0c6f94983725327c434e710632e052"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"a5ec05ed0810e77ca502834ce7815a4d6d9137a4","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                                         original_agent[\u0027host\u0027])"},{"line_number":119,"context_line":"        return result"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def add_agent_status_check(self, function):"},{"line_number":122,"context_line":"        loop \u003d loopingcall.FixedIntervalLoopingCall(function)"},{"line_number":123,"context_line":"        # TODO(enikanorov): make interval configurable rather than computed"},{"line_number":124,"context_line":"        interval \u003d max(cfg.CONF.agent_down_time // 2, 1)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_667bc02a","line":121,"updated":"2015-10-01 13:37:57.000000000","message":"any reason changing the name of the function? IMHO, setup sounds more better.","commit_id":"8ee51f253cac950787273ca117611b4660ed4523"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"62fa448b4b2ba125abe5e47d1805111872d8c4f8","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                                         original_agent[\u0027host\u0027])"},{"line_number":119,"context_line":"        return result"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def add_agent_status_check(self, function):"},{"line_number":122,"context_line":"        loop \u003d loopingcall.FixedIntervalLoopingCall(function)"},{"line_number":123,"context_line":"        # TODO(enikanorov): make interval configurable rather than computed"},{"line_number":124,"context_line":"        interval \u003d max(cfg.CONF.agent_down_time // 2, 1)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1a9d01_6c395fd8","line":121,"in_reply_to":"9a1a9d01_667bc02a","updated":"2015-10-01 14:01:22.000000000","message":"it now implies that there could be more than one periodic check for the plugin.","commit_id":"8ee51f253cac950787273ca117611b4660ed4523"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"9d18390eacea9a24b8f4468ba5f8e6337fe66113","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self._setup_rpc()"},{"line_number":145,"context_line":"        self._setup_dhcp()"},{"line_number":146,"context_line":"        self.setup_agent_status_check(self.health_check)"},{"line_number":147,"context_line":"        LOG.info(_LI(\"Modular L2 Plugin initialization complete\"))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _setup_rpc(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_5787410f","line":146,"updated":"2015-05-13 07:15:34.000000000","message":"* PluginFixture needs an update?\n* _setup_dhcp() seems to use the same self.periodic_agent_loop","commit_id":"daeab89e139fb7c6fef940a4d88a4cd8203c6881"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"39f67a4eced30049227385094d71a8c34c4bca43","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self._setup_rpc()"},{"line_number":145,"context_line":"        self._setup_dhcp()"},{"line_number":146,"context_line":"        self.setup_agent_status_check(self.health_check)"},{"line_number":147,"context_line":"        LOG.info(_LI(\"Modular L2 Plugin initialization complete\"))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _setup_rpc(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_7947b81d","line":146,"in_reply_to":"9a0c5dc1_5787410f","updated":"2015-05-13 19:59:32.000000000","message":"I guess it\u0027s optional, but yeah, I can add it.","commit_id":"daeab89e139fb7c6fef940a4d88a4cd8203c6881"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d0433b53cce58f903e3f889051bf08b0515b867c","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self.mechanism_manager.initialize()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self._setup_rpc()"},{"line_number":145,"context_line":"        self._setup_dhcp()"},{"line_number":146,"context_line":"        self.setup_agent_status_check(self.health_check)"},{"line_number":147,"context_line":"        LOG.info(_LI(\"Modular L2 Plugin initialization complete\"))"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_a00d4639","line":145,"updated":"2015-05-14 03:41:04.000000000","message":"this sets self.periodic_agent_loop.","commit_id":"9880a62aaf7ce1623c664d2881039871148f83ba"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d0433b53cce58f903e3f889051bf08b0515b867c","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self._setup_rpc()"},{"line_number":145,"context_line":"        self._setup_dhcp()"},{"line_number":146,"context_line":"        self.setup_agent_status_check(self.health_check)"},{"line_number":147,"context_line":"        LOG.info(_LI(\"Modular L2 Plugin initialization complete\"))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _setup_rpc(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_00265aba","line":146,"updated":"2015-05-14 03:41:04.000000000","message":"and then this overwrites it.\nit\u0027s confusing code reader at least.\n\nhow about just removing self.periodic_agent_loop?","commit_id":"9880a62aaf7ce1623c664d2881039871148f83ba"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"6cfc734d589ec630aa63bede46c77709398b9b7e","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self._setup_rpc()"},{"line_number":145,"context_line":"        self._setup_dhcp()"},{"line_number":146,"context_line":"        self.setup_agent_status_check(self.health_check)"},{"line_number":147,"context_line":"        LOG.info(_LI(\"Modular L2 Plugin initialization complete\"))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _setup_rpc(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_00badae1","line":146,"in_reply_to":"7a016987_00265aba","updated":"2015-05-14 03:56:45.000000000","message":"This probably needs to be refactored. we actually have 2 checks already, one for dhcp and another for l3 agents. We might be good with just one looping call.\nAnd indeed this code right now is incorrect. thanks for noticing","commit_id":"9880a62aaf7ce1623c664d2881039871148f83ba"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"75b22203a7e2e34cd7af40c14f89a75ef2c4d623","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        self.mechanism_manager.initialize()"},{"line_number":149,"context_line":"        self._setup_dhcp()"},{"line_number":150,"context_line":"        self._start_rpc_notifiers()"},{"line_number":151,"context_line":"        self.add_agent_status_check(self.health_check)"},{"line_number":152,"context_line":"        LOG.info(_LI(\"Modular L2 Plugin initialization complete\"))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _setup_rpc(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_c5521267","line":151,"updated":"2015-09-24 02:29:56.000000000","message":"I think we should change self.health_check into self.check_agents_health","commit_id":"f52ec824721ce8da47dbf3d497f59d069c731ad2"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"4903e9a443af87b777e131272eadb8c0f966545e","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        self.mechanism_manager.initialize()"},{"line_number":149,"context_line":"        self._setup_dhcp()"},{"line_number":150,"context_line":"        self._start_rpc_notifiers()"},{"line_number":151,"context_line":"        self.add_agent_status_check(self.health_check)"},{"line_number":152,"context_line":"        LOG.info(_LI(\"Modular L2 Plugin initialization complete\"))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _setup_rpc(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a1a9d01_30d3ecd6","line":151,"in_reply_to":"9a1a9d01_917e8768","updated":"2015-09-30 14:38:19.000000000","message":"ok, i\u0027ll change to \u0027agent_health_check\u0027","commit_id":"f52ec824721ce8da47dbf3d497f59d069c731ad2"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"aa15eb07e6313ff7e4d16e93913c6b7cd6008e45","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        self.mechanism_manager.initialize()"},{"line_number":149,"context_line":"        self._setup_dhcp()"},{"line_number":150,"context_line":"        self._start_rpc_notifiers()"},{"line_number":151,"context_line":"        self.add_agent_status_check(self.health_check)"},{"line_number":152,"context_line":"        LOG.info(_LI(\"Modular L2 Plugin initialization complete\"))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _setup_rpc(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a1a9d01_917e8768","line":151,"in_reply_to":"ba15a1d1_9dd22eff","updated":"2015-09-30 10:59:46.000000000","message":"the name \u0027self.health_check\u0027 called in plugin.py is not obvious to check agents\u0027 health.","commit_id":"f52ec824721ce8da47dbf3d497f59d069c731ad2"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"eceb4e2765f0cca67daff9810aaee05267f5fae4","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        self.mechanism_manager.initialize()"},{"line_number":149,"context_line":"        self._setup_dhcp()"},{"line_number":150,"context_line":"        self._start_rpc_notifiers()"},{"line_number":151,"context_line":"        self.add_agent_status_check(self.health_check)"},{"line_number":152,"context_line":"        LOG.info(_LI(\"Modular L2 Plugin initialization complete\"))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _setup_rpc(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_9dd22eff","line":151,"in_reply_to":"ba15a1d1_c5521267","updated":"2015-09-24 04:41:01.000000000","message":"why?","commit_id":"f52ec824721ce8da47dbf3d497f59d069c731ad2"}],"neutron/tests/base.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d0433b53cce58f903e3f889051bf08b0515b867c","unresolved":false,"context_lines":[{"line_number":380,"context_line":"        self.dhcp_periodic_p \u003d mock.patch("},{"line_number":381,"context_line":"            \u0027neutron.db.agentschedulers_db.DhcpAgentSchedulerDbMixin.\u0027"},{"line_number":382,"context_line":"            \u0027start_periodic_dhcp_agent_status_check\u0027)"},{"line_number":383,"context_line":"        self.patched_dhcp_periodic \u003d self.dhcp_periodic_p.start()"},{"line_number":384,"context_line":"        self.agent_health_check_p \u003d mock.patch("},{"line_number":385,"context_line":"            \u0027neutron.db.agentschedulers_db.DhcpAgentSchedulerDbMixin.\u0027"},{"line_number":386,"context_line":"            \u0027setup_agent_status_check\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_404b325a","line":383,"updated":"2015-05-14 03:41:04.000000000","message":"L380-383 seems redundant as setup_agent_status_check is now mocked.\n\nstart_periodic_l3_agent_status_check mock in test_agent_scheduler seems redundant too.","commit_id":"9880a62aaf7ce1623c664d2881039871148f83ba"}]}
