)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e3e4939caf9cd2d45c58abc80513a5978fc0d7ea","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2016-02-10 07:05:24 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove threading before process forking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I0544f1d47ae53d572adda872847a56fa0b202d2e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3a57f1b5_ddf90b4f","line":8,"range":{"start_line":8,"start_character":0,"end_line":8,"end_character":0},"updated":"2016-02-10 10:56:09.000000000","message":"Please add more info, link a bug, etc.","commit_id":"977e1ef7c73f07cadf56a338cb933b4eafbcdb84"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"522c645a3126147e39537a8c4d5b1d5fcd159643","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2016-02-10 07:05:24 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove threading before process forking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I0544f1d47ae53d572adda872847a56fa0b202d2e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3a57f1b5_994960d3","line":8,"range":{"start_line":8,"start_character":0,"end_line":8,"end_character":0},"in_reply_to":"3a57f1b5_ddf90b4f","updated":"2016-02-10 13:12:20.000000000","message":"Done","commit_id":"977e1ef7c73f07cadf56a338cb933b4eafbcdb84"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0330ff57ad91fa491826dc30a34ddb2232f8ae56","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove threading before process forking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Forking procecces when a few threads are already running is potentially"},{"line_number":10,"context_line":"unsafe operation and could cause a lot of problems because only current"},{"line_number":11,"context_line":"thread will continue working in child thread. Any locked by other"},{"line_number":12,"context_line":"thread resource will remain locked forever."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"bae84128_24d56c1b","line":9,"range":{"start_line":9,"start_character":8,"end_line":9,"end_character":17},"updated":"2016-02-23 16:04:24.000000000","message":"typo","commit_id":"9c355a3f89db7c4dc31071c2ce82d49c5b198b0b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"36dbdeeba680eff98d42a884c22673265d437fea","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"So this patch fixes incorrect usage of oslo libraries. In this patch"},{"line_number":26,"context_line":"I extended functionality of NeutronWorker and add there"},{"line_number":27,"context_line":"`worker_process_count` parameter which determines how many processes"},{"line_number":28,"context_line":"should be spawned for this worker. If `worker_process_count` \u003d 0 - don\u0027t"},{"line_number":29,"context_line":"create process and spawn thread in scope of current process for worker"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"da0c15f0_7126b317","line":27,"range":{"start_line":27,"start_character":23,"end_line":27,"end_character":32},"updated":"2016-03-24 22:05:34.000000000","message":"It\u0027s not really a parameter. It is an attribute. Actually, could we make it a parameter to __init__?","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"2b36c2d4dee7fb6c5d3bca671243b3b681fb1b32","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"So this patch fixes incorrect usage of oslo libraries. In this patch"},{"line_number":26,"context_line":"I extended functionality of NeutronWorker and add there"},{"line_number":27,"context_line":"`worker_process_count` parameter which determines how many processes"},{"line_number":28,"context_line":"should be spawned for this worker. If `worker_process_count` \u003d 0 - don\u0027t"},{"line_number":29,"context_line":"create process and spawn thread in scope of current process for worker"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"da0c15f0_3e004801","line":27,"range":{"start_line":27,"start_character":23,"end_line":27,"end_character":32},"in_reply_to":"da0c15f0_7126b317","updated":"2016-03-27 00:04:49.000000000","message":"Done","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":11255,"name":"Dustin Lundquist","username":"dustin.lundquist","inactive":true},"change_message_id":"b0e452e081937c06b820daf048c7c57d732336b9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove threading before process forking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Forking processes when a few threads are already running is potentially"},{"line_number":10,"context_line":"unsafe operation and could cause a lot of problems because only current"},{"line_number":11,"context_line":"thread will continue working in child thread. Any locked by other"},{"line_number":12,"context_line":"thread resource will remain locked forever."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":37,"id":"7a1b2928_c85d31eb","line":10,"updated":"2016-04-11 18:05:01.000000000","message":"Forking a process when multiple threads are running is an unsafe operation, ...","commit_id":"b84cfc1c022f775c93e68724ff0852060f94b301"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e495231d4683d1e7e57e80725362c4a63b784dfe","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"but oslo folks said that this fix is ugly and it is wrong way to add"},{"line_number":22,"context_line":"workarounds to common libraries because projects use them incorrectly."},{"line_number":23,"context_line":"I think that is fare."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"So this patch fixes incorrect usage of oslo libraries. In this patch"},{"line_number":26,"context_line":"I extended functionality of NeutronWorker and add there"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":38,"id":"5a18252c_620ec335","line":23,"range":{"start_line":23,"start_character":16,"end_line":23,"end_character":20},"updated":"2016-04-12 16:27:51.000000000","message":"fair","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"96d43d13b0d08a4dfe7e832986da347d37f9aed9","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"but oslo folks said that this fix is ugly and it is wrong way to add"},{"line_number":22,"context_line":"workarounds to common libraries because projects use them incorrectly."},{"line_number":23,"context_line":"I think that is fare."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"So this patch fixes incorrect usage of oslo libraries. In this patch"},{"line_number":26,"context_line":"I extended functionality of NeutronWorker and add there"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":38,"id":"5a18252c_de8490d5","line":23,"range":{"start_line":23,"start_character":16,"end_line":23,"end_character":20},"in_reply_to":"5a18252c_620ec335","updated":"2016-04-13 16:35:11.000000000","message":"Done","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e495231d4683d1e7e57e80725362c4a63b784dfe","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"So this patch fixes incorrect usage of oslo libraries. In this patch"},{"line_number":26,"context_line":"I extended functionality of NeutronWorker and add there"},{"line_number":27,"context_line":"`worker_process_count` attribute which determines how many processes"},{"line_number":28,"context_line":"should be spawned for this worker. If `worker_process_count` \u003d 0 - don\u0027t"},{"line_number":29,"context_line":"create process and spawn thread in scope of current process for worker"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":38,"id":"5a18252c_622523aa","line":27,"range":{"start_line":27,"start_character":23,"end_line":27,"end_character":33},"updated":"2016-04-12 16:27:51.000000000","message":"but now it\u0027s actually a parameter for NeutronWorker __init__.","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"96d43d13b0d08a4dfe7e832986da347d37f9aed9","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"So this patch fixes incorrect usage of oslo libraries. In this patch"},{"line_number":26,"context_line":"I extended functionality of NeutronWorker and add there"},{"line_number":27,"context_line":"`worker_process_count` attribute which determines how many processes"},{"line_number":28,"context_line":"should be spawned for this worker. If `worker_process_count` \u003d 0 - don\u0027t"},{"line_number":29,"context_line":"create process and spawn thread in scope of current process for worker"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":38,"id":"5a18252c_be8714d6","line":27,"range":{"start_line":27,"start_character":23,"end_line":27,"end_character":33},"in_reply_to":"5a18252c_622523aa","updated":"2016-04-13 16:35:11.000000000","message":"Done","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"}],"neutron/db/agentschedulers_db.py":[{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"8cc9e972f121dea5cd0beda5529f1112bb25e4ff","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def start_periodic_dhcp_agent_status_check(self):"},{"line_number":201,"context_line":"        LOG.warning("},{"line_number":202,"context_line":"            _LW(\"DEPRECATED method \u0027start_periodic_dhcp_agent_status_check\u0027. \""},{"line_number":203,"context_line":"                \"Please use \u0027add_periodic_dhcp_agent_status_check\u0027 instead\")"},{"line_number":204,"context_line":"        )"},{"line_number":205,"context_line":"        self.add_periodic_dhcp_agent_status_check()"}],"source_content_type":"text/x-python","patch_set":51,"id":"1a122d0e_42421e10","line":202,"updated":"2016-05-05 18:13:20.000000000","message":"This is more than just a deprecation since it changes behavior by not actually starting the agent status check.","commit_id":"1cafff087194711399ad2a85a9f394f7204d7bdd"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"7fc4b33ed5769eed5433f44a211692caec43d221","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def start_periodic_dhcp_agent_status_check(self):"},{"line_number":201,"context_line":"        LOG.warning("},{"line_number":202,"context_line":"            _LW(\"DEPRECATED method \u0027start_periodic_dhcp_agent_status_check\u0027. \""},{"line_number":203,"context_line":"                \"Please use \u0027add_periodic_dhcp_agent_status_check\u0027 instead\")"},{"line_number":204,"context_line":"        )"},{"line_number":205,"context_line":"        self.add_periodic_dhcp_agent_status_check()"}],"source_content_type":"text/x-python","patch_set":51,"id":"dab17558_31af30e5","line":202,"in_reply_to":"1a122d0e_42421e10","updated":"2016-05-05 20:31:47.000000000","message":"I think https://review.openstack.org/#/c/313098/ should fix networking-ovn to handle this change.","commit_id":"1cafff087194711399ad2a85a9f394f7204d7bdd"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"8cc9e972f121dea5cd0beda5529f1112bb25e4ff","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def start_periodic_l3_agent_status_check(self):"},{"line_number":86,"context_line":"        LOG.warning("},{"line_number":87,"context_line":"            _LW(\"DEPRECATED method \u0027start_periodic_l3_agent_status_check\u0027. \""},{"line_number":88,"context_line":"                \"Please use \u0027add_periodic_l3_agent_status_check\u0027 instead\")"},{"line_number":89,"context_line":"        )"},{"line_number":90,"context_line":"        self.add_periodic_l3_agent_status_check()"}],"source_content_type":"text/x-python","patch_set":51,"id":"1a122d0e_e251aada","line":87,"updated":"2016-05-05 18:13:20.000000000","message":"This is more than just a deprecation since it changes behavior by not actually starting the agent status check.","commit_id":"1cafff087194711399ad2a85a9f394f7204d7bdd"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"7fc4b33ed5769eed5433f44a211692caec43d221","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def start_periodic_l3_agent_status_check(self):"},{"line_number":86,"context_line":"        LOG.warning("},{"line_number":87,"context_line":"            _LW(\"DEPRECATED method \u0027start_periodic_l3_agent_status_check\u0027. \""},{"line_number":88,"context_line":"                \"Please use \u0027add_periodic_l3_agent_status_check\u0027 instead\")"},{"line_number":89,"context_line":"        )"},{"line_number":90,"context_line":"        self.add_periodic_l3_agent_status_check()"}],"source_content_type":"text/x-python","patch_set":51,"id":"dab17558_11acacec","line":87,"in_reply_to":"1a122d0e_e251aada","updated":"2016-05-05 20:31:47.000000000","message":"I think https://review.openstack.org/#/c/313098/ should fix networking-ovn to handle this change.","commit_id":"1cafff087194711399ad2a85a9f394f7204d7bdd"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bdaaa32779562d234b270a39246e0a2ca2866430","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        self.network_scheduler \u003d importutils.import_object("},{"line_number":180,"context_line":"            cfg.CONF.network_scheduler_driver"},{"line_number":181,"context_line":"        )"},{"line_number":182,"context_line":"        self.start_periodic_dhcp_agent_status_check()"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def _verify_service_plugins_requirements(self):"},{"line_number":185,"context_line":"        for service_plugin in cfg.CONF.service_plugins:"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_d625d9c2","line":182,"range":{"start_line":182,"start_character":13,"end_line":182,"end_character":18},"updated":"2016-04-12 16:27:42.000000000","message":"this does not start anything anymore. I suspect we may need to do a major renaming to get names in line with actual behaviour.","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"9fc345fadccc670d8416c1a4679e3725af384224","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        self.network_scheduler \u003d importutils.import_object("},{"line_number":180,"context_line":"            cfg.CONF.network_scheduler_driver"},{"line_number":181,"context_line":"        )"},{"line_number":182,"context_line":"        self.start_periodic_dhcp_agent_status_check()"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def _verify_service_plugins_requirements(self):"},{"line_number":185,"context_line":"        for service_plugin in cfg.CONF.service_plugins:"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_0ad36605","line":182,"range":{"start_line":182,"start_character":13,"end_line":182,"end_character":18},"in_reply_to":"5a18252c_d625d9c2","updated":"2016-04-13 16:35:20.000000000","message":"Done","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bdaaa32779562d234b270a39246e0a2ca2866430","unresolved":false,"context_lines":[{"line_number":1619,"context_line":""},{"line_number":1620,"context_line":"    def get_workers(self):"},{"line_number":1621,"context_line":"        workers \u003d []"},{"line_number":1622,"context_line":"        if hasattr(self, \u0027workers\u0027):"},{"line_number":1623,"context_line":"            workers.extend(self.workers)"},{"line_number":1624,"context_line":"        workers.extend(self.mechanism_manager.get_workers())"},{"line_number":1625,"context_line":"        return workers"},{"line_number":1626,"context_line":""},{"line_number":1627,"context_line":"    def filter_hosts_with_network_access("}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_51ff1301","line":1624,"range":{"start_line":1622,"start_character":8,"end_line":1624,"end_character":60},"updated":"2016-04-12 16:27:42.000000000","message":"In other plugins, we register workers in self.workers in __init__. Any reason why it can\u0027t be done for ml2?","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"9fc345fadccc670d8416c1a4679e3725af384224","unresolved":false,"context_lines":[{"line_number":1619,"context_line":""},{"line_number":1620,"context_line":"    def get_workers(self):"},{"line_number":1621,"context_line":"        workers \u003d []"},{"line_number":1622,"context_line":"        if hasattr(self, \u0027workers\u0027):"},{"line_number":1623,"context_line":"            workers.extend(self.workers)"},{"line_number":1624,"context_line":"        workers.extend(self.mechanism_manager.get_workers())"},{"line_number":1625,"context_line":"        return workers"},{"line_number":1626,"context_line":""},{"line_number":1627,"context_line":"    def filter_hosts_with_network_access("}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_6ae13ad0","line":1624,"range":{"start_line":1622,"start_character":8,"end_line":1624,"end_character":60},"in_reply_to":"5a18252c_51ff1301","updated":"2016-04-13 16:35:20.000000000","message":"Done","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"}],"neutron/server/wsgi_eventlet.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"fd8d7e1532ab237849f65e55604a6fdc733b0543","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        for plugin_worker in plugin_workers:"},{"line_number":47,"context_line":"            threads.append(pool.spawn(plugin_worker.wait))"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def kill_other_workers(gt):"},{"line_number":50,"context_line":"        for th in threads:"},{"line_number":51,"context_line":"            if th !\u003d gt:"},{"line_number":52,"context_line":"                th.kill()"}],"source_content_type":"text/x-python","patch_set":20,"id":"dae33548_f1b91d30","line":49,"updated":"2016-02-15 09:48:27.000000000","message":"This patch is a very very good start to fix the mess.\n\nMy only suggestion is to write a comment/todo here to explain \nthat in a perfect world, we should just don\u0027t start useless greenlet.\n\nThis change identifies clearly what are each workers purpose and if it should leave in master process or in a child process. It will help a lot for future improvement around how neutron handles workers.\n\nThank a lot Dmitriy for working on this !","commit_id":"f6074e5182c309efb9ced59e723002b42085d881"},{"author":{"_account_id":7293,"name":"Elena Ezhova","email":"ezhovaelena19@gmail.com","username":"elena"},"change_message_id":"33f63b6cda2b50f782abcc2bb5b44f81f02111bf","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            if th !\u003d gt:"},{"line_number":52,"context_line":"                th.kill()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    # all workers should die together. When one dies, kill the other."},{"line_number":55,"context_line":"    for thread in threads:"},{"line_number":56,"context_line":"        thread.link(kill_other_workers)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"dae33548_5b8f0dcc","line":54,"range":{"start_line":54,"start_character":63,"end_line":54,"end_character":68},"updated":"2016-02-16 11:32:28.000000000","message":"nit: the others","commit_id":"f6074e5182c309efb9ced59e723002b42085d881"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"6409acb5e9c20d44de3945211857e634e2f9f94a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        service.start_plugin_workers(plugin_workers_launcher)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    pool \u003d eventlet.GreenPool()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    api_thread \u003d pool.spawn(neutron_api.wait)"},{"line_number":47,"context_line":"    plugin_workers_thread \u003d pool.spawn(plugin_workers_launcher.wait)"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a122d0e_242b1b35","line":44,"updated":"2016-05-03 17:48:02.000000000","message":"Good point. We should probably just get rid of the else and then have the exception handler return after logging.","commit_id":"7cb6c70977aab278bf6f5c9a0cc45d5c71d1555b"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"7a026d5b3a3056387ddfdda2501c4c7286a761ec","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        service.start_plugin_workers(plugin_workers_launcher)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    pool \u003d eventlet.GreenPool()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    api_thread \u003d pool.spawn(neutron_api.wait)"},{"line_number":47,"context_line":"    plugin_workers_thread \u003d pool.spawn(plugin_workers_launcher.wait)"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a122d0e_1bdf633b","line":44,"updated":"2016-05-03 15:18:39.000000000","message":"This block moved outside the else. So if I\u0027m reading this correctly, it\u0027s \"try to start rpc workers. if we fail, log a message. if we don\u0027t fail, then start plugin workers. then, no matter what we do the rest, including waiting on the plugin workers thread.\n\nIf there is an exception, this means we are calling wait() on the plugin_workers_launcher, even though we haven\u0027t actually started it. That doesn\u0027t seem right. Should we just remove the else: altogether?","commit_id":"7cb6c70977aab278bf6f5c9a0cc45d5c71d1555b"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"6690f9558df85a2bcc49e0bac7763cfd7dadbe2b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        service.start_plugin_workers(plugin_workers_launcher)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    pool \u003d eventlet.GreenPool()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    api_thread \u003d pool.spawn(neutron_api.wait)"},{"line_number":47,"context_line":"    plugin_workers_thread \u003d pool.spawn(plugin_workers_launcher.wait)"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a122d0e_dd3316f5","line":44,"in_reply_to":"1a122d0e_1bdf633b","updated":"2016-05-03 19:01:18.000000000","message":"Done","commit_id":"7cb6c70977aab278bf6f5c9a0cc45d5c71d1555b"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"6690f9558df85a2bcc49e0bac7763cfd7dadbe2b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        service.start_plugin_workers(plugin_workers_launcher)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    pool \u003d eventlet.GreenPool()"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    api_thread \u003d pool.spawn(neutron_api.wait)"},{"line_number":47,"context_line":"    plugin_workers_thread \u003d pool.spawn(plugin_workers_launcher.wait)"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a122d0e_bd2e1a8a","line":44,"in_reply_to":"1a122d0e_242b1b35","updated":"2016-05-03 19:01:18.000000000","message":"Done","commit_id":"7cb6c70977aab278bf6f5c9a0cc45d5c71d1555b"}],"neutron/service.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"36dbdeeba680eff98d42a884c22673265d437fea","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"def start_plugin_workers():"},{"line_number":117,"context_line":"    launchers \u003d []"},{"line_number":118,"context_line":"    # NOTE(twilson) get_service_plugins also returns the core plugin"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    # TODO(twilson) Instead of defaulting here, come up with a good way to"},{"line_number":121,"context_line":"    # share a common get_workers default between NeutronPluginBaseV2 and"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_7177d3d4","line":118,"updated":"2016-03-24 22:05:34.000000000","message":"I think this note belongs to line 125?","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"2b36c2d4dee7fb6c5d3bca671243b3b681fb1b32","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"def start_plugin_workers():"},{"line_number":117,"context_line":"    launchers \u003d []"},{"line_number":118,"context_line":"    # NOTE(twilson) get_service_plugins also returns the core plugin"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    # TODO(twilson) Instead of defaulting here, come up with a good way to"},{"line_number":121,"context_line":"    # share a common get_workers default between NeutronPluginBaseV2 and"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_1e03c40e","line":118,"in_reply_to":"da0c15f0_7177d3d4","updated":"2016-03-27 00:04:49.000000000","message":"Done","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"36dbdeeba680eff98d42a884c22673265d437fea","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        for plugin_worker in plugin.get_workers()"},{"line_number":128,"context_line":"    ]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    # we need to fork all neseccary processes before spawning extra threads"},{"line_number":131,"context_line":"    # to avoid problems with infinite resouce locking and other concurrency"},{"line_number":132,"context_line":"    # problems"},{"line_number":133,"context_line":"    process_plugin_workers \u003d ["}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_912c27ad","line":130,"range":{"start_line":130,"start_character":26,"end_line":130,"end_character":35},"updated":"2016-03-24 22:05:34.000000000","message":"necessary","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"2b36c2d4dee7fb6c5d3bca671243b3b681fb1b32","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        for plugin_worker in plugin.get_workers()"},{"line_number":128,"context_line":"    ]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    # we need to fork all neseccary processes before spawning extra threads"},{"line_number":131,"context_line":"    # to avoid problems with infinite resouce locking and other concurrency"},{"line_number":132,"context_line":"    # problems"},{"line_number":133,"context_line":"    process_plugin_workers \u003d ["}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_9e0fd42d","line":130,"range":{"start_line":130,"start_character":26,"end_line":130,"end_character":35},"in_reply_to":"da0c15f0_912c27ad","updated":"2016-03-27 00:04:49.000000000","message":"Done","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"36dbdeeba680eff98d42a884c22673265d437fea","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    ]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    # we need to fork all neseccary processes before spawning extra threads"},{"line_number":131,"context_line":"    # to avoid problems with infinite resouce locking and other concurrency"},{"line_number":132,"context_line":"    # problems"},{"line_number":133,"context_line":"    process_plugin_workers \u003d ["},{"line_number":134,"context_line":"        plugin_worker for plugin_worker in plugin_workers"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_5109ef30","line":131,"range":{"start_line":131,"start_character":38,"end_line":131,"end_character":45},"updated":"2016-03-24 22:05:34.000000000","message":"resource","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"2b36c2d4dee7fb6c5d3bca671243b3b681fb1b32","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    ]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    # we need to fork all neseccary processes before spawning extra threads"},{"line_number":131,"context_line":"    # to avoid problems with infinite resouce locking and other concurrency"},{"line_number":132,"context_line":"    # problems"},{"line_number":133,"context_line":"    process_plugin_workers \u003d ["},{"line_number":134,"context_line":"        plugin_worker for plugin_worker in plugin_workers"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_fe1ed061","line":131,"range":{"start_line":131,"start_character":38,"end_line":131,"end_character":45},"in_reply_to":"da0c15f0_5109ef30","updated":"2016-03-27 00:04:49.000000000","message":"Done","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"36dbdeeba680eff98d42a884c22673265d437fea","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        if plugin_worker.worker_process_count \u003c 1"},{"line_number":141,"context_line":"    ]"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    if len(process_plugin_workers) \u003e 0:"},{"line_number":144,"context_line":"        process_launcher \u003d common_service.ProcessLauncher(cfg.CONF)"},{"line_number":145,"context_line":"        launchers.append(process_launcher)"},{"line_number":146,"context_line":"        for plugin_worker in process_plugin_workers:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_4c3792e3","line":143,"range":{"start_line":143,"start_character":4,"end_line":143,"end_character":38},"updated":"2016-03-24 22:05:34.000000000","message":"if process_plugin_workers","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"2b36c2d4dee7fb6c5d3bca671243b3b681fb1b32","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        if plugin_worker.worker_process_count \u003c 1"},{"line_number":141,"context_line":"    ]"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    if len(process_plugin_workers) \u003e 0:"},{"line_number":144,"context_line":"        process_launcher \u003d common_service.ProcessLauncher(cfg.CONF)"},{"line_number":145,"context_line":"        launchers.append(process_launcher)"},{"line_number":146,"context_line":"        for plugin_worker in process_plugin_workers:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_de194c7b","line":143,"range":{"start_line":143,"start_character":4,"end_line":143,"end_character":38},"in_reply_to":"da0c15f0_4c3792e3","updated":"2016-03-27 00:04:49.000000000","message":"Done","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"36dbdeeba680eff98d42a884c22673265d437fea","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            process_launcher.launch_service(plugin_worker,"},{"line_number":148,"context_line":"                                            plugin_worker.worker_process_count)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    if len(thread_plugin_workers) \u003e 0:"},{"line_number":151,"context_line":"        thread_launcher \u003d common_service.Launcher(cfg.CONF)"},{"line_number":152,"context_line":"        launchers.append(thread_launcher)"},{"line_number":153,"context_line":"        for plugin_worker in thread_plugin_workers:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_ec4ca678","line":150,"range":{"start_line":150,"start_character":4,"end_line":150,"end_character":37},"updated":"2016-03-24 22:05:34.000000000","message":"if thread_plugin_workers","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"2b36c2d4dee7fb6c5d3bca671243b3b681fb1b32","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            process_launcher.launch_service(plugin_worker,"},{"line_number":148,"context_line":"                                            plugin_worker.worker_process_count)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    if len(thread_plugin_workers) \u003e 0:"},{"line_number":151,"context_line":"        thread_launcher \u003d common_service.Launcher(cfg.CONF)"},{"line_number":152,"context_line":"        launchers.append(thread_launcher)"},{"line_number":153,"context_line":"        for plugin_worker in thread_plugin_workers:"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_3e27a8b7","line":150,"range":{"start_line":150,"start_character":4,"end_line":150,"end_character":37},"in_reply_to":"da0c15f0_ec4ca678","updated":"2016-03-27 00:04:49.000000000","message":"Done","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e495231d4683d1e7e57e80725362c4a63b784dfe","unresolved":false,"context_lines":[{"line_number":171,"context_line":"def _get_rpc_workers():"},{"line_number":172,"context_line":"    plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":173,"context_line":"    service_plugins \u003d ("},{"line_number":174,"context_line":"        manager.NeutronManager.get_service_plugins().values())"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    if cfg.CONF.rpc_workers \u003c 1:"},{"line_number":177,"context_line":"        cfg.CONF.set_override(\u0027rpc_workers\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_7bcaeea2","line":174,"range":{"start_line":174,"start_character":31,"end_line":174,"end_character":50},"updated":"2016-04-12 16:27:51.000000000","message":"should we use get_unique_service_plugins here?","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"96d43d13b0d08a4dfe7e832986da347d37f9aed9","unresolved":false,"context_lines":[{"line_number":171,"context_line":"def _get_rpc_workers():"},{"line_number":172,"context_line":"    plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":173,"context_line":"    service_plugins \u003d ("},{"line_number":174,"context_line":"        manager.NeutronManager.get_service_plugins().values())"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    if cfg.CONF.rpc_workers \u003c 1:"},{"line_number":177,"context_line":"        cfg.CONF.set_override(\u0027rpc_workers\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_00cce768","line":174,"range":{"start_line":174,"start_character":31,"end_line":174,"end_character":50},"in_reply_to":"5a18252c_7bcaeea2","updated":"2016-04-13 16:35:11.000000000","message":"Done","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e495231d4683d1e7e57e80725362c4a63b784dfe","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    # multiple RPC workers."},{"line_number":183,"context_line":"    if not plugin.rpc_workers_supported():"},{"line_number":184,"context_line":"        LOG.debug(\"Active plugin doesn\u0027t implement start_rpc_listeners\")"},{"line_number":185,"context_line":"        if 0 \u003c cfg.CONF.rpc_workers:"},{"line_number":186,"context_line":"            LOG.error(_LE(\"\u0027rpc_workers \u003d %d\u0027 ignored because \""},{"line_number":187,"context_line":"                          \"start_rpc_listeners is not implemented.\"),"},{"line_number":188,"context_line":"                      cfg.CONF.rpc_workers)"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_f81d6467","line":185,"range":{"start_line":185,"start_character":8,"end_line":185,"end_character":36},"updated":"2016-04-12 16:27:51.000000000","message":"(Just trying to understand the broader scope of the code) won\u0027t it always trigger because of line 177? And if that\u0027s correct, does it suggest that we don\u0027t have support for plugins that don\u0027t provide workers feature at all?","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"96d43d13b0d08a4dfe7e832986da347d37f9aed9","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    # multiple RPC workers."},{"line_number":183,"context_line":"    if not plugin.rpc_workers_supported():"},{"line_number":184,"context_line":"        LOG.debug(\"Active plugin doesn\u0027t implement start_rpc_listeners\")"},{"line_number":185,"context_line":"        if 0 \u003c cfg.CONF.rpc_workers:"},{"line_number":186,"context_line":"            LOG.error(_LE(\"\u0027rpc_workers \u003d %d\u0027 ignored because \""},{"line_number":187,"context_line":"                          \"start_rpc_listeners is not implemented.\"),"},{"line_number":188,"context_line":"                      cfg.CONF.rpc_workers)"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_e0cd6b5e","line":185,"range":{"start_line":185,"start_character":8,"end_line":185,"end_character":36},"in_reply_to":"5a18252c_f81d6467","updated":"2016-04-13 16:35:11.000000000","message":"As far as I understood we need to raise NotImplemented here to stop starting plugin workers - means only WSGI will work. I dont know is it correct or not, Just left it as it was before","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e495231d4683d1e7e57e80725362c4a63b784dfe","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                )"},{"line_number":203,"context_line":"            )"},{"line_number":204,"context_line":"        return rpc_workers"},{"line_number":205,"context_line":"    except Exception:"},{"line_number":206,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":207,"context_line":"            LOG.exception(_LE(\u0027Unrecoverable error: please check log for \u0027"},{"line_number":208,"context_line":"                              \u0027details.\u0027))"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"class AllServicesService(common_service.ServiceBase):"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_981d5012","line":208,"range":{"start_line":205,"start_character":4,"end_line":208,"end_character":42},"updated":"2016-04-12 16:27:51.000000000","message":"Hm. Do we really need to catch anything here now that we don\u0027t start any threads here?","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"96d43d13b0d08a4dfe7e832986da347d37f9aed9","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                )"},{"line_number":203,"context_line":"            )"},{"line_number":204,"context_line":"        return rpc_workers"},{"line_number":205,"context_line":"    except Exception:"},{"line_number":206,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":207,"context_line":"            LOG.exception(_LE(\u0027Unrecoverable error: please check log for \u0027"},{"line_number":208,"context_line":"                              \u0027details.\u0027))"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"class AllServicesService(common_service.ServiceBase):"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_8005977b","line":208,"range":{"start_line":205,"start_character":4,"end_line":208,"end_character":42},"in_reply_to":"5a18252c_981d5012","updated":"2016-04-13 16:35:11.000000000","message":"Done","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e495231d4683d1e7e57e80725362c4a63b784dfe","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            worker_launcher.launch_service(plugin_worker,"},{"line_number":265,"context_line":"                                           plugin_worker.worker_process_count)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    if thread_plugin_workers:"},{"line_number":268,"context_line":"        process_plugin_workers.append("},{"line_number":269,"context_line":"            AllServicesService(thread_plugin_workers)"},{"line_number":270,"context_line":"        )"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    return worker_launcher"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_985b9054","line":270,"range":{"start_line":267,"start_character":4,"end_line":270,"end_character":9},"updated":"2016-04-12 16:27:51.000000000","message":"What\u0027s the point of this? You never start those threads, do you? Should it be moved to before line 256?","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"96d43d13b0d08a4dfe7e832986da347d37f9aed9","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            worker_launcher.launch_service(plugin_worker,"},{"line_number":265,"context_line":"                                           plugin_worker.worker_process_count)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    if thread_plugin_workers:"},{"line_number":268,"context_line":"        process_plugin_workers.append("},{"line_number":269,"context_line":"            AllServicesService(thread_plugin_workers)"},{"line_number":270,"context_line":"        )"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    return worker_launcher"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_de9ad062","line":270,"range":{"start_line":267,"start_character":4,"end_line":270,"end_character":9},"in_reply_to":"5a18252c_985b9054","updated":"2016-04-13 16:35:11.000000000","message":"Done","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e495231d4683d1e7e57e80725362c4a63b784dfe","unresolved":false,"context_lines":[{"line_number":278,"context_line":"    # dispose the whole pool before os.fork, otherwise there will"},{"line_number":279,"context_line":"    # be shared DB connections in child processes which may cause"},{"line_number":280,"context_line":"    # DB errors."},{"line_number":281,"context_line":"    LOG.debug(\u0027using launcher for rpc, workers\u003d%s\u0027, cfg.CONF.rpc_workers)"},{"line_number":282,"context_line":"    session.dispose()"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    for rpc_worker in rpc_workers:"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_3b887622","line":281,"range":{"start_line":281,"start_character":52,"end_line":281,"end_character":72},"updated":"2016-04-12 16:27:51.000000000","message":"Will it log 0 before it\u0027s reset to 1 in line 177?","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"96d43d13b0d08a4dfe7e832986da347d37f9aed9","unresolved":false,"context_lines":[{"line_number":278,"context_line":"    # dispose the whole pool before os.fork, otherwise there will"},{"line_number":279,"context_line":"    # be shared DB connections in child processes which may cause"},{"line_number":280,"context_line":"    # DB errors."},{"line_number":281,"context_line":"    LOG.debug(\u0027using launcher for rpc, workers\u003d%s\u0027, cfg.CONF.rpc_workers)"},{"line_number":282,"context_line":"    session.dispose()"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    for rpc_worker in rpc_workers:"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_7eba9cc1","line":281,"range":{"start_line":281,"start_character":52,"end_line":281,"end_character":72},"in_reply_to":"5a18252c_3b887622","updated":"2016-04-13 16:35:11.000000000","message":"Done","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e495231d4683d1e7e57e80725362c4a63b784dfe","unresolved":false,"context_lines":[{"line_number":275,"context_line":"def start_rpc_workers(worker_launcher):"},{"line_number":276,"context_line":"    rpc_workers \u003d _get_rpc_workers()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    # dispose the whole pool before os.fork, otherwise there will"},{"line_number":279,"context_line":"    # be shared DB connections in child processes which may cause"},{"line_number":280,"context_line":"    # DB errors."},{"line_number":281,"context_line":"    LOG.debug(\u0027using launcher for rpc, workers\u003d%s\u0027, cfg.CONF.rpc_workers)"},{"line_number":282,"context_line":"    session.dispose()"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    for rpc_worker in rpc_workers:"},{"line_number":285,"context_line":"        worker_launcher.launch_service(rpc_worker,"},{"line_number":286,"context_line":"                                       rpc_worker.worker_process_count)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"def _get_api_workers():"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_db3182ee","line":286,"range":{"start_line":278,"start_character":4,"end_line":286,"end_character":71},"updated":"2016-04-12 16:27:51.000000000","message":"It seems identical to lines 257-265. I suggest we refactor code in start_plugin_workers to get workers into a separate function (similar to _get_rpc_workers), then reuse the same _start_* helper in both places.","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"96d43d13b0d08a4dfe7e832986da347d37f9aed9","unresolved":false,"context_lines":[{"line_number":275,"context_line":"def start_rpc_workers(worker_launcher):"},{"line_number":276,"context_line":"    rpc_workers \u003d _get_rpc_workers()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    # dispose the whole pool before os.fork, otherwise there will"},{"line_number":279,"context_line":"    # be shared DB connections in child processes which may cause"},{"line_number":280,"context_line":"    # DB errors."},{"line_number":281,"context_line":"    LOG.debug(\u0027using launcher for rpc, workers\u003d%s\u0027, cfg.CONF.rpc_workers)"},{"line_number":282,"context_line":"    session.dispose()"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    for rpc_worker in rpc_workers:"},{"line_number":285,"context_line":"        worker_launcher.launch_service(rpc_worker,"},{"line_number":286,"context_line":"                                       rpc_worker.worker_process_count)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"def _get_api_workers():"}],"source_content_type":"text/x-python","patch_set":38,"id":"5a18252c_1ea568a1","line":286,"range":{"start_line":278,"start_character":4,"end_line":286,"end_character":71},"in_reply_to":"5a18252c_db3182ee","updated":"2016-04-13 16:35:11.000000000","message":"Done","commit_id":"444d169c0734c4d6be943601424f24146317d2bc"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"05584e82281aa6addcba5481b8160fa61cfe119d","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                              \u0027details.\u0027))"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"def start_plugin_workers(worker_launcher):"},{"line_number":246,"context_line":"    # NOTE(twilson) get_service_plugins also returns the core plugin"},{"line_number":247,"context_line":"    plugins \u003d manager.NeutronManager.get_unique_service_plugins()"},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":51,"id":"1a122d0e_1a6ff092","line":245,"updated":"2016-05-05 16:21:18.000000000","message":"This function is no longer called.  Isn\u0027t it still required?","commit_id":"1cafff087194711399ad2a85a9f394f7204d7bdd"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"7fc4b33ed5769eed5433f44a211692caec43d221","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                              \u0027details.\u0027))"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"def start_plugin_workers(worker_launcher):"},{"line_number":246,"context_line":"    # NOTE(twilson) get_service_plugins also returns the core plugin"},{"line_number":247,"context_line":"    plugins \u003d manager.NeutronManager.get_unique_service_plugins()"},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":51,"id":"dab17558_716258da","line":245,"in_reply_to":"1a122d0e_1a6ff092","updated":"2016-05-05 20:31:47.000000000","message":"I pushed patch set https://review.openstack.org/#/c/313088/ for this.","commit_id":"1cafff087194711399ad2a85a9f394f7204d7bdd"}],"neutron/services/l3_router/l3_router_plugin.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bdaaa32779562d234b270a39246e0a2ca2866430","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        super(L3RouterPlugin, self).__init__()"},{"line_number":65,"context_line":"        self.router_scheduler \u003d importutils.import_object("},{"line_number":66,"context_line":"            cfg.CONF.router_scheduler_driver)"},{"line_number":67,"context_line":"        self.start_periodic_l3_agent_status_check()"},{"line_number":68,"context_line":"        if \u0027dvr\u0027 in self.supported_extension_aliases:"},{"line_number":69,"context_line":"            l3_dvrscheduler_db.subscribe()"},{"line_number":70,"context_line":"        l3_db.subscribe()"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_9b86eab7","line":67,"range":{"start_line":67,"start_character":13,"end_line":67,"end_character":18},"updated":"2016-04-12 16:27:42.000000000","message":"It does not start anything anymore, so should be renamed.","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"9fc345fadccc670d8416c1a4679e3725af384224","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        super(L3RouterPlugin, self).__init__()"},{"line_number":65,"context_line":"        self.router_scheduler \u003d importutils.import_object("},{"line_number":66,"context_line":"            cfg.CONF.router_scheduler_driver)"},{"line_number":67,"context_line":"        self.start_periodic_l3_agent_status_check()"},{"line_number":68,"context_line":"        if \u0027dvr\u0027 in self.supported_extension_aliases:"},{"line_number":69,"context_line":"            l3_dvrscheduler_db.subscribe()"},{"line_number":70,"context_line":"        l3_db.subscribe()"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_6a8c9a35","line":67,"range":{"start_line":67,"start_character":13,"end_line":67,"end_character":18},"in_reply_to":"5a18252c_9b86eab7","updated":"2016-04-13 16:35:20.000000000","message":"Done","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bdaaa32779562d234b270a39246e0a2ca2866430","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        rpc_worker \u003d service.RpcWorker([self], worker_process_count\u003d0)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        if hasattr(self, \"workers\"):"},{"line_number":77,"context_line":"            self.workers.append(rpc_worker)"},{"line_number":78,"context_line":"        else:"},{"line_number":79,"context_line":"            self.workers \u003d [rpc_worker]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @log_helpers.log_method_call"},{"line_number":82,"context_line":"    def start_rpc_listeners(self):"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_96f3610a","line":79,"range":{"start_line":76,"start_character":8,"end_line":79,"end_character":39},"updated":"2016-04-12 16:27:42.000000000","message":"I see that pattern in multiple places. Why not just adding the attribute in __init__ for base plugin class? [Ideally, we would not even mess with attributes but provide API to register workers.]","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"9fc345fadccc670d8416c1a4679e3725af384224","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        rpc_worker \u003d service.RpcWorker([self], worker_process_count\u003d0)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        if hasattr(self, \"workers\"):"},{"line_number":77,"context_line":"            self.workers.append(rpc_worker)"},{"line_number":78,"context_line":"        else:"},{"line_number":79,"context_line":"            self.workers \u003d [rpc_worker]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @log_helpers.log_method_call"},{"line_number":82,"context_line":"    def start_rpc_listeners(self):"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_8ab776d7","line":79,"range":{"start_line":76,"start_character":8,"end_line":79,"end_character":39},"in_reply_to":"5a18252c_96f3610a","updated":"2016-04-13 16:35:20.000000000","message":"Done","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"64162346eee1b0ccfebde9d659a37e7a4bde3ca3","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        rpc_worker \u003d service.RpcWorker([self], worker_process_count\u003d0)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        if hasattr(self, \"workers\"):"},{"line_number":77,"context_line":"            self.workers.append(rpc_worker)"},{"line_number":78,"context_line":"        else:"},{"line_number":79,"context_line":"            self.workers \u003d [rpc_worker]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @log_helpers.log_method_call"},{"line_number":82,"context_line":"    def start_rpc_listeners(self):"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_b063fc19","line":79,"range":{"start_line":76,"start_character":8,"end_line":79,"end_character":39},"in_reply_to":"5a18252c_96f3610a","updated":"2016-04-12 21:53:14.000000000","message":"Yeah, I definitely don\u0027t like seeing this pattern repeated. The solution is kind of annoying because NeutronPluginBaseV2 and ServicePluginBase are abstract base classes with no __init__() and so you can\u0027t really count on subclasses calling super().__init__() if you add it, so storing the state if you need to add a worker like with the add_agent_status_check() stuff is harder. You could make both inherit from a common Worker mixin that defines get_workers()/add_workers() that does:\n\n def get_workers(self):\n     # existing PluginwWorkers users will have this overrided to just return their workers\n     # new users could just use add_worker() in __init__() and not override get_workers\n     try:\n         return self._workers\n     except AttributeError:\n         self._workers \u003d []\n         return self._workers\n\n def add_worker(self, worker):\n     try:\n         self._workers.append(worker)\n     except AttributeError:\n         self._workers \u003d [worker]\n\nI generally hate mixins, but I\u0027m having trouble thinking of a better way to do this without a lot of work, but it is always possible that I\u0027m missing something.","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"9fc345fadccc670d8416c1a4679e3725af384224","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        rpc_worker \u003d service.RpcWorker([self], worker_process_count\u003d0)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        if hasattr(self, \"workers\"):"},{"line_number":77,"context_line":"            self.workers.append(rpc_worker)"},{"line_number":78,"context_line":"        else:"},{"line_number":79,"context_line":"            self.workers \u003d [rpc_worker]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @log_helpers.log_method_call"},{"line_number":82,"context_line":"    def start_rpc_listeners(self):"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_ca832e03","line":79,"range":{"start_line":76,"start_character":8,"end_line":79,"end_character":39},"in_reply_to":"5a18252c_b063fc19","updated":"2016-04-13 16:35:20.000000000","message":"Done","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bdaaa32779562d234b270a39246e0a2ca2866430","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            context, floatingip,"},{"line_number":113,"context_line":"            initial_status\u003dn_const.FLOATINGIP_STATUS_DOWN)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def get_workers(self):"},{"line_number":116,"context_line":"        \"\"\"Returns a collection of NeutronWorkers\"\"\""},{"line_number":117,"context_line":"        return self.workers"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_d695d940","line":115,"updated":"2016-04-12 16:27:42.000000000","message":"In neutron/neutron_plugin_base_v2.py, I read:\n\n        \"\"\"Returns a collection NeutronWorker instances\n        \n        If a plugin needs to define worker processes outside of API/RPC workers\n        then it will override this and return a collection of NeutronWorker\n        instances\n        \"\"\" \n\nBut I see API/RPC plugins registering the method here. Is the comment invalid?\n\nShould we provide this method in base class as default implementation?","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"9fc345fadccc670d8416c1a4679e3725af384224","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            context, floatingip,"},{"line_number":113,"context_line":"            initial_status\u003dn_const.FLOATINGIP_STATUS_DOWN)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def get_workers(self):"},{"line_number":116,"context_line":"        \"\"\"Returns a collection of NeutronWorkers\"\"\""},{"line_number":117,"context_line":"        return self.workers"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_6a93fa4f","line":115,"in_reply_to":"5a18252c_d695d940","updated":"2016-04-13 16:35:20.000000000","message":"Done","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"}],"neutron/worker.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0330ff57ad91fa491826dc30a34ddb2232f8ae56","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    # 0 - spawn 1 new worker thread in current process,"},{"line_number":41,"context_line":"    # 1..N - spawn N new worker processes"},{"line_number":42,"context_line":"    worker_process_count \u003d 1"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def start(self):"},{"line_number":45,"context_line":"        registry.notify(resources.PROCESS, events.AFTER_CREATE, self.start)"}],"source_content_type":"text/x-python","patch_set":21,"id":"bae84128_e4ab8473","line":42,"range":{"start_line":42,"start_character":4,"end_line":42,"end_character":24},"updated":"2016-02-23 16:04:24.000000000","message":"where is this used?","commit_id":"9c355a3f89db7c4dc31071c2ce82d49c5b198b0b"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"58351317f0d65360dd0408259367c585be38640b","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    # 0 - spawn 1 new worker thread in current process,"},{"line_number":41,"context_line":"    # 1..N - spawn N new worker processes"},{"line_number":42,"context_line":"    worker_process_count \u003d 1"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def start(self):"},{"line_number":45,"context_line":"        registry.notify(resources.PROCESS, events.AFTER_CREATE, self.start)"}],"source_content_type":"text/x-python","patch_set":21,"id":"bae84128_6ea463b9","line":42,"range":{"start_line":42,"start_character":4,"end_line":42,"end_character":24},"in_reply_to":"bae84128_e4ab8473","updated":"2016-02-23 21:17:24.000000000","message":"please, look at neutron/service.py","commit_id":"9c355a3f89db7c4dc31071c2ce82d49c5b198b0b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0330ff57ad91fa491826dc30a34ddb2232f8ae56","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    worker_process_count \u003d 1"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def start(self):"},{"line_number":45,"context_line":"        registry.notify(resources.PROCESS, events.AFTER_CREATE, self.start)"}],"source_content_type":"text/x-python","patch_set":21,"id":"bae84128_64ae5482","line":45,"updated":"2016-02-23 16:04:24.000000000","message":"does this patch still ensure that this callback is correctly invoked?","commit_id":"9c355a3f89db7c4dc31071c2ce82d49c5b198b0b"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"58351317f0d65360dd0408259367c585be38640b","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    worker_process_count \u003d 1"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def start(self):"},{"line_number":45,"context_line":"        registry.notify(resources.PROCESS, events.AFTER_CREATE, self.start)"}],"source_content_type":"text/x-python","patch_set":21,"id":"bae84128_6e2e23fc","line":45,"in_reply_to":"bae84128_64ae5482","updated":"2016-02-23 21:17:24.000000000","message":"at neutron/service.py you can find code which launch plugin workers whis is instance of ServiceBase. That launchers follow start/stop/wait Service\u0027s protocol.","commit_id":"9c355a3f89db7c4dc31071c2ce82d49c5b198b0b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"36dbdeeba680eff98d42a884c22673265d437fea","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    # 0 - spawn 1 new worker thread in current process,"},{"line_number":41,"context_line":"    # 1..N - spawn N new worker processes"},{"line_number":42,"context_line":"    worker_process_count \u003d 1"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def start(self):"},{"line_number":45,"context_line":"        registry.notify(resources.PROCESS, events.AFTER_CREATE, self.start)"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_11a49755","line":42,"updated":"2016-03-24 22:05:34.000000000","message":"I suggest we transform the attribute into a parameter to __init__. Note we should probably document it with docstring.\n\nWe will also need a accessor property for the value.","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"2b36c2d4dee7fb6c5d3bca671243b3b681fb1b32","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    # 0 - spawn 1 new worker thread in current process,"},{"line_number":41,"context_line":"    # 1..N - spawn N new worker processes"},{"line_number":42,"context_line":"    worker_process_count \u003d 1"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def start(self):"},{"line_number":45,"context_line":"        registry.notify(resources.PROCESS, events.AFTER_CREATE, self.start)"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_1e2aa47e","line":42,"in_reply_to":"da0c15f0_11a49755","updated":"2016-03-27 00:04:49.000000000","message":"Done","commit_id":"24900b9827337eea854cbc5fb3eb6398608d7c66"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"20a25f92910d8781f19bdd7962ce9fd25c20a7f9","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class WorkerSupportServiceMixin(object):"},{"line_number":21,"context_line":"    def __init__(self):"},{"line_number":22,"context_line":"        self._workers \u003d []"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def get_workers(self):"}],"source_content_type":"text/x-python","patch_set":41,"id":"5a18252c_ac3d1cbd","line":21,"updated":"2016-04-13 22:04:48.000000000","message":"Since Mixins should be able to be added to a class in any order, they shouldn\u0027t have an __init__. Classes inheriting from NeutronPluginBaseV2 generally have very long lists of mixins, and super().__init__() will only call one of the inherited class\u0027 __init__() methods, so having mixins with __init__ doesn\u0027t really work.\n\nAlso, since NeutronPluginBaseV2 (really NeutronDbPluginV2) and ServicePluginBase are ABCs with no __init__(), can we be sure that absolutely everything inheriting from them in the neutron ecosystem actually calls super().__init__()? That\u0027s why in my comment with example code I did the (ugly and annoying) try: except AttributeError stuff.","commit_id":"b6d4e95799bed7cbcb399c8aa9ab6ba53953a1bb"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"76c475a4c1c1886989f4e356a7be000ba1995532","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class WorkerSupportServiceMixin(object):"},{"line_number":21,"context_line":"    def __init__(self):"},{"line_number":22,"context_line":"        self._workers \u003d []"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def get_workers(self):"}],"source_content_type":"text/x-python","patch_set":41,"id":"5a18252c_c76e732e","line":21,"in_reply_to":"5a18252c_ac3d1cbd","updated":"2016-04-13 22:51:41.000000000","message":"Done","commit_id":"b6d4e95799bed7cbcb399c8aa9ab6ba53953a1bb"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0dd427db5a24c4a84f5229fa977f03fe1d3019fb","unresolved":false,"context_lines":[{"line_number":23,"context_line":"        \"\"\""},{"line_number":24,"context_line":"        try:"},{"line_number":25,"context_line":"            return self._workers"},{"line_number":26,"context_line":"        except AttributeError:"},{"line_number":27,"context_line":"            self._workers \u003d []"},{"line_number":28,"context_line":"            return self._workers"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":47,"id":"1a122d0e_09cd1d31","line":26,"updated":"2016-04-26 02:30:52.000000000","message":"This attribute error logic is repeated in each method. Can you make _workers a @property where the setting logic is stored?\n\n@property\ndef _workers(self):\n    try:\n        return self.__workers\n    except AttributeError:\n        self.__workers \u003d []\n    return self.__workers","commit_id":"4bdbf934628a174f107adc81ff57665c39aba6b2"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"640b07da5afbbdcf08ddfbb75e6b9f9a41ef0256","unresolved":false,"context_lines":[{"line_number":23,"context_line":"        \"\"\""},{"line_number":24,"context_line":"        try:"},{"line_number":25,"context_line":"            return self._workers"},{"line_number":26,"context_line":"        except AttributeError:"},{"line_number":27,"context_line":"            self._workers \u003d []"},{"line_number":28,"context_line":"            return self._workers"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":47,"id":"1a122d0e_e92c21ae","line":26,"in_reply_to":"1a122d0e_09cd1d31","updated":"2016-04-26 03:22:13.000000000","message":"Done","commit_id":"4bdbf934628a174f107adc81ff57665c39aba6b2"}],"neutron/wsgi.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"64162346eee1b0ccfebde9d659a37e7a4bde3ca3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"class WorkerService(worker.NeutronWorker):"},{"line_number":78,"context_line":"    \"\"\"Wraps a worker to be handled by ProcessLauncher\"\"\""},{"line_number":79,"context_line":"    def __init__(self, service, application, disable_ssl\u003dFalse):"},{"line_number":80,"context_line":"        super(WorkerService, self).__init__()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        self._service \u003d service"},{"line_number":83,"context_line":"        self._application \u003d application"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_e9c74643","line":80,"updated":"2016-04-12 21:53:14.000000000","message":"This gets a little confusing when this is instantiated by wsgi.Server\u0027s start/_launch which default to workers\u003d0 and and NeutronWorker will default to worker_process_count\u003d1 and so now the start() method below thanks to super().start() will now send an AFTER_CREATE notification when it didn\u0027t before if workers\u003d0.\n\nOf course, I don\u0027t think any code we have can actually send workers\u003d0 because neutron.service.run_wsgi_app() passes in from _get_api_workers() which takes the config value and if it is zero sets it to the number of processors. So unless we have zero processors...\n\nBut, with that said, it\u0027s very confusing so maybe for now we allow to pass in a worker count to WorkerService?","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"9fc345fadccc670d8416c1a4679e3725af384224","unresolved":false,"context_lines":[{"line_number":77,"context_line":"class WorkerService(worker.NeutronWorker):"},{"line_number":78,"context_line":"    \"\"\"Wraps a worker to be handled by ProcessLauncher\"\"\""},{"line_number":79,"context_line":"    def __init__(self, service, application, disable_ssl\u003dFalse):"},{"line_number":80,"context_line":"        super(WorkerService, self).__init__()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        self._service \u003d service"},{"line_number":83,"context_line":"        self._application \u003d application"}],"source_content_type":"text/x-python","patch_set":39,"id":"5a18252c_ea91ca53","line":80,"in_reply_to":"5a18252c_e9c74643","updated":"2016-04-13 16:35:20.000000000","message":"Done","commit_id":"74d2925fc1c001f335f50199554c5e39895ca09a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0dd427db5a24c4a84f5229fa977f03fe1d3019fb","unresolved":false,"context_lines":[{"line_number":43,"context_line":"from neutron.common import exceptions as exception"},{"line_number":44,"context_line":"from neutron import context"},{"line_number":45,"context_line":"from neutron.db import api"},{"line_number":46,"context_line":"from neutron import worker as neutron_worker"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"socket_opts \u003d ["},{"line_number":49,"context_line":"    cfg.IntOpt(\u0027backlog\u0027,"}],"source_content_type":"text/x-python","patch_set":47,"id":"1a122d0e_69ce512e","line":46,"updated":"2016-04-26 02:30:52.000000000","message":"what was the reason for the import name change?","commit_id":"4bdbf934628a174f107adc81ff57665c39aba6b2"},{"author":{"_account_id":8601,"name":"Dmitriy Ukhlov","email":"dukhlov@mirantis.com","username":"dukhlov"},"change_message_id":"640b07da5afbbdcf08ddfbb75e6b9f9a41ef0256","unresolved":false,"context_lines":[{"line_number":43,"context_line":"from neutron.common import exceptions as exception"},{"line_number":44,"context_line":"from neutron import context"},{"line_number":45,"context_line":"from neutron.db import api"},{"line_number":46,"context_line":"from neutron import worker as neutron_worker"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"socket_opts \u003d ["},{"line_number":49,"context_line":"    cfg.IntOpt(\u0027backlog\u0027,"}],"source_content_type":"text/x-python","patch_set":47,"id":"1a122d0e_4c59e334","line":46,"in_reply_to":"1a122d0e_69ce512e","updated":"2016-04-26 03:22:13.000000000","message":"just to be uniform with imports in other modules","commit_id":"4bdbf934628a174f107adc81ff57665c39aba6b2"}]}
