)]}'
{"nova/service.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a6ac018ed708cc8e14641137e4d410cc17ca17d","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        :returns: None"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":"        #gt \u003d Thread(target\u003dself.run_server, args\u003d(server,))"},{"line_number":132,"context_line":"        gt \u003d eventlet.spawn(self.run_server, server)"},{"line_number":133,"context_line":"        self._services.append(gt)"},{"line_number":134,"context_line":"        #gt.start()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAFH%2F%2F%2FPM%3D","line":131,"updated":"2012-03-25 23:23:07.000000000","message":"Oops... looks like some debug code left in here...","commit_id":"5e6291443685c99f7d206a82fc738b7bda3a87bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import random"},{"line_number":25,"context_line":"import signal"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"import eventlet"},{"line_number":29,"context_line":"import greenlet"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B%2Fc%3D","line":27,"updated":"2012-03-26 18:52:33.000000000","message":"You will need to remove this extra newline... pep8 will complain about it.","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        :returns: None"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":"        #gt \u003d Thread(target\u003dself.run_server, args\u003d(server,))"},{"line_number":132,"context_line":"        gt \u003d eventlet.spawn(self.run_server, server)"},{"line_number":133,"context_line":"        self._services.append(gt)"},{"line_number":134,"context_line":"        #gt.start()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B%2FU%3D","line":131,"updated":"2012-03-26 18:52:33.000000000","message":"Ooops :) Need to remove this still. (and below)","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        for service in self._services:"},{"line_number":143,"context_line":"            service.kill()"},{"line_number":144,"context_line":"        #    service.terminate()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def wait(self):"},{"line_number":147,"context_line":"        \"\"\"Waits until all services have been stopped, and then returns."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B%2FQ%3D","line":144,"updated":"2012-03-26 18:52:33.000000000","message":"Remove this debug code...","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f1d4583dbb458cc0f4b4cef23124109e573a2394","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        :returns: None"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        \"\"\""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        for service in self._services:"},{"line_number":152,"context_line":"            try:"},{"line_number":153,"context_line":"                service.wait()"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAHX%2F%2F4DY%3D","line":150,"updated":"2012-05-24 15:01:36.000000000","message":"Can you talk through how shutting down the api servers works now?","commit_id":"ca66999ce8b56b730a6631576d9e83d0b6067209"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"46aad104318a7af07c75ddf3137df493adc0a50e","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        :returns: None"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        \"\"\""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        for service in self._services:"},{"line_number":152,"context_line":"            try:"},{"line_number":153,"context_line":"                service.wait()"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAHX%2F%2F36U%3D","line":150,"in_reply_to":"AAAAHX%2F%2F38w%3D","updated":"2012-05-24 18:04:54.000000000","message":"Thanks; I figured it was something like that :)","commit_id":"ca66999ce8b56b730a6631576d9e83d0b6067209"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"78abdad39ee17a07f278434c074184bcd6fa718c","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        :returns: None"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        \"\"\""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        for service in self._services:"},{"line_number":152,"context_line":"            try:"},{"line_number":153,"context_line":"                service.wait()"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAHX%2F%2F38w%3D","line":150,"in_reply_to":"AAAAHX%2F%2F4DY%3D","updated":"2012-05-24 17:17:06.000000000","message":"To shutdown API servers, the procedure is *almost* the same - just send SIGTERM to API servers you want to shut down and they will be shut down as expected.  The difference is with multiprocess patch, one is able to kill different API servers separately even all enabled API servers were brought up via \u0027bin/nova-api\u0027 command.  \nFor example, one might configure OSAPI_Compute to have 16 processes (by setting osapi_compute_workers to 16) to improve Nova Compute API throughput and the rest (EC2/metadata/OSAPI_Volume) are running within single process.  Then to kill OSAPI_Comute server, you send \u0027SIGTERM\u0027 or \u0027SIGINT\u0027 to \u0027master\u0027 process of OSAPI_Compute server and other API servers will not be affected.  To kill all API servers with one command (this is only possible when all API servers were brought-up by one process, something like \u0027bin/nova-api\u0027 command, no matter multiprocess is enabled or not), you send \u0027SIGTERM\u0027 or \u0027SIGINT\u0027 to the whole process group using command like \u0027kill -s SIGTERM -PID_OF_NOVA_API\u0027.  And signal handling part is moved to nova/wsgi.py, that\u0027s why I removed code here.  Let me know if you have any question.","commit_id":"ca66999ce8b56b730a6631576d9e83d0b6067209"}],"nova/tests/integrated/test_multiprocess_api.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from boto import exception as boto_exc"},{"line_number":23,"context_line":"import unittest"},{"line_number":24,"context_line":"import time"},{"line_number":25,"context_line":"import webob"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from nova import service"},{"line_number":28,"context_line":"from nova.log import logging"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B%2FM%3D","line":25,"updated":"2012-03-26 18:52:33.000000000","message":"These imports will need to be fixed to adhere to the HACKING guidelines. Basically, you need to list std libs first, then 3rd party libs, then internal libs.","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                 (self.osapi.host, self.osapi.port))"},{"line_number":64,"context_line":"        instances \u003d self.ec2.get_all_instances()"},{"line_number":65,"context_line":"        for instance in instances:"},{"line_number":66,"context_line":"            LOG.debug(_(\"instances: %s\") % instance)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class MultiprocessMetadataTest(integrated_helpers._IntegratedTestBase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B98%3D","line":66,"updated":"2012-03-26 18:52:33.000000000","message":"Other than verifying that the server started, this isn\u0027t actually asserting anything. Should it?","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        return f"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def test_meta(self):"},{"line_number":85,"context_line":"        #TODO(zhiteng) add metadata test"},{"line_number":86,"context_line":"        pass"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B%2FI%3D","line":85,"updated":"2012-03-26 18:52:33.000000000","message":"We\u0027ll need something here before this goes in :)","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def test_osapi_compute(self):"},{"line_number":105,"context_line":"        flavors \u003d self.api.get_flavors()"},{"line_number":106,"context_line":"        for flavor in flavors:"},{"line_number":107,"context_line":"            LOG.debug(_(\"flavor: %s\") % flavor)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B94%3D","line":107,"updated":"2012-03-26 18:52:33.000000000","message":"Other than verifying that the server started, this isn\u0027t actually asserting anything. Should it?","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        \"\"\"Simple check that listing volumes works.\"\"\""},{"line_number":130,"context_line":"        volumes \u003d self.api.get_volumes(False)"},{"line_number":131,"context_line":"        for volume in volumes:"},{"line_number":132,"context_line":"            LOG.debug(\"volume: %s\" % volume)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def test_get_volumes(self):"},{"line_number":135,"context_line":"        \"\"\"Simple check that listing volumes works.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B9w%3D","line":132,"updated":"2012-03-26 18:52:33.000000000","message":"Other than verifying that the server started, this isn\u0027t actually asserting anything. Should it?","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    def test_get_volumes(self):"},{"line_number":135,"context_line":"        \"\"\"Simple check that listing volumes works.\"\"\""},{"line_number":136,"context_line":"        volumes \u003d self.api.get_volumes()"},{"line_number":137,"context_line":"        for volume in volumes:"},{"line_number":138,"context_line":"            LOG.debug(\"volume: %s\" % volume)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"if __name__ \u003d\u003d \"__main__\":"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B90%3D","line":137,"updated":"2012-03-26 18:52:33.000000000","message":"Other than verifying that the server started, this isn\u0027t actually asserting anything. Should it?","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            LOG.debug(\"volume: %s\" % volume)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"if __name__ \u003d\u003d \"__main__\":"},{"line_number":141,"context_line":"    unittest.main()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B9g%3D","line":141,"updated":"2012-03-26 18:52:33.000000000","message":"Typically, we do not have this block in our test cases, as we can run a single test case with the nosetests runner....","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"82bc93362e985a94c310fe46754c3496be9e38e5","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def test_osapi_compute(self):"},{"line_number":101,"context_line":"        flavors \u003d self.api.get_flavors()"},{"line_number":102,"context_line":"        self.assertGreater(len(flavors), 0, \u0027Num of flavoers \u003e 0.\u0027)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAFH%2F%2F9U8%3D","line":102,"updated":"2012-03-30 18:20:47.000000000","message":"teeny nit: s/flavoers/flavors/","commit_id":"cd30253e2e5e25f6e79c588801f5c5d99fb3e041"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"ad91e9fb3e7ad5cda1ccaef7435f88fc2ecb691a","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def test_osapi_compute(self):"},{"line_number":101,"context_line":"        flavors \u003d self.api.get_flavors()"},{"line_number":102,"context_line":"        self.assertGreater(len(flavors), 0, \u0027Num of flavoers \u003e 0.\u0027)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAFH%2F%2F9Ow%3D","line":102,"in_reply_to":"AAAAFH%2F%2F9U8%3D","updated":"2012-03-31 01:53:25.000000000","message":"Done","commit_id":"cd30253e2e5e25f6e79c588801f5c5d99fb3e041"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"82bc93362e985a94c310fe46754c3496be9e38e5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"},{"line_number":106,"context_line":"    def setUp(self):"},{"line_number":107,"context_line":"        super(MultiprocessOSAPIVolumesTest, self).setUp()"},{"line_number":108,"context_line":"        driver.LoggingVolumeDriver.clear_logs()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _start_api_service(self):"},{"line_number":111,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_volume\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAFH%2F%2F9U0%3D","line":108,"updated":"2012-03-30 18:20:47.000000000","message":"This is interesting... could you explain why you added this call to clear_logs()? Were you debugging something and just left it in, or is this necessary for this test case to succeed properly? If so, might be good to add a quick comment saying why...","commit_id":"cd30253e2e5e25f6e79c588801f5c5d99fb3e041"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"ad91e9fb3e7ad5cda1ccaef7435f88fc2ecb691a","unresolved":false,"context_lines":[{"line_number":105,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"},{"line_number":106,"context_line":"    def setUp(self):"},{"line_number":107,"context_line":"        super(MultiprocessOSAPIVolumesTest, self).setUp()"},{"line_number":108,"context_line":"        driver.LoggingVolumeDriver.clear_logs()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _start_api_service(self):"},{"line_number":111,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_volume\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAFH%2F%2F9O0%3D","line":108,"in_reply_to":"AAAAFH%2F%2F9U0%3D","updated":"2012-03-31 01:53:25.000000000","message":"It was there for debugging.  I\u0027ll remove it.  Good catch, thanks!","commit_id":"cd30253e2e5e25f6e79c588801f5c5d99fb3e041"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"22d24a738b7123236094aff4f7183aa11021e01d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"},{"line_number":106,"context_line":"    def setUp(self):"},{"line_number":107,"context_line":"        super(MultiprocessOSAPIVolumesTest, self).setUp()"},{"line_number":108,"context_line":"        #driver.LoggingVolumeDriver.clear_logs()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _start_api_service(self):"},{"line_number":111,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_volume\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAFX%2F%2F%2Fgg%3D","line":108,"updated":"2012-04-06 15:27:43.000000000","message":"Probably best to remove this debug line...","commit_id":"f8039b01ed62d1c85debedb654c3ceead950d32e"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d5f1e04f69bbc47413a0d5cb43fcd336aeccce76","unresolved":false,"context_lines":[{"line_number":15,"context_line":"\"\"\""},{"line_number":16,"context_line":"Test multiprocess enabled EC2/OSAPI_Compute/OSAPI_Volume/Metadata API service."},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"import boto"},{"line_number":19,"context_line":"from boto.ec2 import regioninfo"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from nova import flags"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2FL8%3D","line":18,"updated":"2012-05-07 19:52:13.000000000","message":"femtonit: I would like a blank line between the closing triple-quote and this import.","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"101cfb0b1d10f2548ba27dd8f9b1bd0743570851","unresolved":false,"context_lines":[{"line_number":15,"context_line":"\"\"\""},{"line_number":16,"context_line":"Test multiprocess enabled EC2/OSAPI_Compute/OSAPI_Volume/Metadata API service."},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"import boto"},{"line_number":19,"context_line":"from boto.ec2 import regioninfo"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from nova import flags"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2B8g%3D","line":18,"in_reply_to":"AAAAHX%2F%2F%2FL8%3D","updated":"2012-05-08 16:16:03.000000000","message":"Done","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d5f1e04f69bbc47413a0d5cb43fcd336aeccce76","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class MultiprocessEC2Test(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(MultiprocessEC2Test, self).setUp()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _start_api_service(self):"},{"line_number":36,"context_line":"        self.osapi \u003d service.WSGIService(\"ec2\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2FLs%3D","line":33,"updated":"2012-05-07 19:52:13.000000000","message":"Why are you overriding the superclass\u0027s setUp() method? You\u0027re not adding anything to what it does…","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"101cfb0b1d10f2548ba27dd8f9b1bd0743570851","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class MultiprocessEC2Test(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(MultiprocessEC2Test, self).setUp()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _start_api_service(self):"},{"line_number":36,"context_line":"        self.osapi \u003d service.WSGIService(\"ec2\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2B8c%3D","line":33,"in_reply_to":"AAAAHX%2F%2F%2FLs%3D","updated":"2012-05-08 16:16:03.000000000","message":"Done","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d5f1e04f69bbc47413a0d5cb43fcd336aeccce76","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class MultiprocessMetadataTest(integrated_helpers._IntegratedTestBase):"},{"line_number":62,"context_line":"    def setUp(self):"},{"line_number":63,"context_line":"        super(MultiprocessMetadataTest, self).setUp()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _start_api_service(self):"},{"line_number":66,"context_line":"        self.osapi \u003d service.WSGIService(\"metadata\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2FLo%3D","line":63,"updated":"2012-05-07 19:52:13.000000000","message":"See above…","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"101cfb0b1d10f2548ba27dd8f9b1bd0743570851","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class MultiprocessMetadataTest(integrated_helpers._IntegratedTestBase):"},{"line_number":62,"context_line":"    def setUp(self):"},{"line_number":63,"context_line":"        super(MultiprocessMetadataTest, self).setUp()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _start_api_service(self):"},{"line_number":66,"context_line":"        self.osapi \u003d service.WSGIService(\"metadata\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2B8U%3D","line":63,"in_reply_to":"AAAAHX%2F%2F%2FLo%3D","updated":"2012-05-08 16:16:03.000000000","message":"Done","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d5f1e04f69bbc47413a0d5cb43fcd336aeccce76","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class MultiprocessOSAPIComputeTest(integrated_helpers._IntegratedTestBase):"},{"line_number":86,"context_line":"    def setUp(self):"},{"line_number":87,"context_line":"        super(MultiprocessOSAPIComputeTest, self).setUp()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _start_api_service(self):"},{"line_number":90,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_compute\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2FLw%3D","line":87,"updated":"2012-05-07 19:52:13.000000000","message":"See above…","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"101cfb0b1d10f2548ba27dd8f9b1bd0743570851","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class MultiprocessOSAPIComputeTest(integrated_helpers._IntegratedTestBase):"},{"line_number":86,"context_line":"    def setUp(self):"},{"line_number":87,"context_line":"        super(MultiprocessOSAPIComputeTest, self).setUp()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _start_api_service(self):"},{"line_number":90,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_compute\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2B8Q%3D","line":87,"in_reply_to":"AAAAHX%2F%2F%2FLw%3D","updated":"2012-05-08 16:16:03.000000000","message":"Done","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d5f1e04f69bbc47413a0d5cb43fcd336aeccce76","unresolved":false,"context_lines":[{"line_number":105,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"},{"line_number":106,"context_line":"    def setUp(self):"},{"line_number":107,"context_line":"        super(MultiprocessOSAPIVolumesTest, self).setUp()"},{"line_number":108,"context_line":"        #driver.LoggingVolumeDriver.clear_logs()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _start_api_service(self):"},{"line_number":111,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_volume\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2FL0%3D","line":108,"updated":"2012-05-07 19:52:13.000000000","message":"Is there a reason this line is commented out?  If it\u0027s not needed, I\u0027d rather you simply delete the line.  And, once you do that, there\u0027s no need for this entire function, since it simply delegates to the superclass.","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"101cfb0b1d10f2548ba27dd8f9b1bd0743570851","unresolved":false,"context_lines":[{"line_number":105,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"},{"line_number":106,"context_line":"    def setUp(self):"},{"line_number":107,"context_line":"        super(MultiprocessOSAPIVolumesTest, self).setUp()"},{"line_number":108,"context_line":"        #driver.LoggingVolumeDriver.clear_logs()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _start_api_service(self):"},{"line_number":111,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_volume\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F%2B8I%3D","line":108,"in_reply_to":"AAAAHX%2F%2F%2FL0%3D","updated":"2012-05-08 16:16:03.000000000","message":"Done","commit_id":"0bdf699fe5b5a04bb5f2132320171fa8f02a2554"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"008a1eb0a526fb45a6ea9de936a3cce8b5df52a7","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class MultiprocessEC2Test(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(MultiprocessEC2Test, self).setUp()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _start_api_service(self):"},{"line_number":36,"context_line":"        self.osapi \u003d service.WSGIService(\"ec2\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F4no%3D","line":33,"updated":"2012-05-23 17:06:17.000000000","message":"This setUp() method does nothing except delegate to the superclass method.  Please remove it.","commit_id":"f02c33c68fafa63dfde80f31e42b9e3b0e725ed7"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"1b7e1c85d7a927371381b07f1c40d4ba47107546","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class MultiprocessEC2Test(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(MultiprocessEC2Test, self).setUp()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _start_api_service(self):"},{"line_number":36,"context_line":"        self.osapi \u003d service.WSGIService(\"ec2\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F4NA%3D","line":33,"in_reply_to":"AAAAHX%2F%2F4no%3D","updated":"2012-05-24 07:26:12.000000000","message":"Done","commit_id":"f02c33c68fafa63dfde80f31e42b9e3b0e725ed7"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"008a1eb0a526fb45a6ea9de936a3cce8b5df52a7","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class MultiprocessMetadataTest(integrated_helpers._IntegratedTestBase):"},{"line_number":62,"context_line":"    def setUp(self):"},{"line_number":63,"context_line":"        super(MultiprocessMetadataTest, self).setUp()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _start_api_service(self):"},{"line_number":66,"context_line":"        self.osapi \u003d service.WSGIService(\"metadata\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F4nk%3D","line":63,"updated":"2012-05-23 17:06:17.000000000","message":"See above.","commit_id":"f02c33c68fafa63dfde80f31e42b9e3b0e725ed7"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"1b7e1c85d7a927371381b07f1c40d4ba47107546","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class MultiprocessMetadataTest(integrated_helpers._IntegratedTestBase):"},{"line_number":62,"context_line":"    def setUp(self):"},{"line_number":63,"context_line":"        super(MultiprocessMetadataTest, self).setUp()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _start_api_service(self):"},{"line_number":66,"context_line":"        self.osapi \u003d service.WSGIService(\"metadata\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F4M8%3D","line":63,"in_reply_to":"AAAAHX%2F%2F4nk%3D","updated":"2012-05-24 07:26:12.000000000","message":"Done","commit_id":"f02c33c68fafa63dfde80f31e42b9e3b0e725ed7"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"008a1eb0a526fb45a6ea9de936a3cce8b5df52a7","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class MultiprocessOSAPIComputeTest(integrated_helpers._IntegratedTestBase):"},{"line_number":86,"context_line":"    def setUp(self):"},{"line_number":87,"context_line":"        super(MultiprocessOSAPIComputeTest, self).setUp()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _start_api_service(self):"},{"line_number":90,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_compute\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F4ng%3D","line":87,"updated":"2012-05-23 17:06:17.000000000","message":"See above.","commit_id":"f02c33c68fafa63dfde80f31e42b9e3b0e725ed7"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"1b7e1c85d7a927371381b07f1c40d4ba47107546","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class MultiprocessOSAPIComputeTest(integrated_helpers._IntegratedTestBase):"},{"line_number":86,"context_line":"    def setUp(self):"},{"line_number":87,"context_line":"        super(MultiprocessOSAPIComputeTest, self).setUp()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _start_api_service(self):"},{"line_number":90,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_compute\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F4M4%3D","line":87,"in_reply_to":"AAAAHX%2F%2F4ng%3D","updated":"2012-05-24 07:26:12.000000000","message":"Done","commit_id":"f02c33c68fafa63dfde80f31e42b9e3b0e725ed7"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"008a1eb0a526fb45a6ea9de936a3cce8b5df52a7","unresolved":false,"context_lines":[{"line_number":105,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"},{"line_number":106,"context_line":"    def setUp(self):"},{"line_number":107,"context_line":"        super(MultiprocessOSAPIVolumesTest, self).setUp()"},{"line_number":108,"context_line":"        #driver.LoggingVolumeDriver.clear_logs()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _start_api_service(self):"},{"line_number":111,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_volume\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F4nc%3D","line":108,"updated":"2012-05-23 17:06:17.000000000","message":"I would rather you remove lines rather than comment them out.  If you remove this line, then this setUp() method does nothing, and should be removed like the others above.","commit_id":"f02c33c68fafa63dfde80f31e42b9e3b0e725ed7"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"1b7e1c85d7a927371381b07f1c40d4ba47107546","unresolved":false,"context_lines":[{"line_number":105,"context_line":"class MultiprocessOSAPIVolumesTest(integrated_helpers._IntegratedTestBase):"},{"line_number":106,"context_line":"    def setUp(self):"},{"line_number":107,"context_line":"        super(MultiprocessOSAPIVolumesTest, self).setUp()"},{"line_number":108,"context_line":"        #driver.LoggingVolumeDriver.clear_logs()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _start_api_service(self):"},{"line_number":111,"context_line":"        self.osapi \u003d service.WSGIService(\"osapi_volume\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAHX%2F%2F4M0%3D","line":108,"in_reply_to":"AAAAHX%2F%2F4nc%3D","updated":"2012-05-24 07:26:12.000000000","message":"Done","commit_id":"f02c33c68fafa63dfde80f31e42b9e3b0e725ed7"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f1d4583dbb458cc0f4b4cef23124109e573a2394","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class MultiprocessEC2Test(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(MultiprocessEC2Test, self).setUp()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _start_api_service(self):"},{"line_number":36,"context_line":"        self.osapi \u003d service.WSGIService(\"ec2\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAHX%2F%2F4DU%3D","line":33,"updated":"2012-05-24 15:01:36.000000000","message":"Um, these are still here…","commit_id":"ca66999ce8b56b730a6631576d9e83d0b6067209"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"78abdad39ee17a07f278434c074184bcd6fa718c","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class MultiprocessEC2Test(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(MultiprocessEC2Test, self).setUp()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _start_api_service(self):"},{"line_number":36,"context_line":"        self.osapi \u003d service.WSGIService(\"ec2\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAHX%2F%2F38s%3D","line":33,"in_reply_to":"AAAAHX%2F%2F4DU%3D","updated":"2012-05-24 17:17:06.000000000","message":"Grrr, my bad.  Will do.","commit_id":"ca66999ce8b56b730a6631576d9e83d0b6067209"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"8921ab354cc573e9e10ba57de641daae7ed3666b","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class MultiprocessEC2Test(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(MultiprocessEC2Test, self).setUp()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _start_api_service(self):"},{"line_number":36,"context_line":"        self.osapi \u003d service.WSGIService(\"ec2\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAHX%2F%2F358%3D","line":33,"updated":"2012-05-24 18:05:02.000000000","message":"Still present.  You did an appropriate \"git add nova/tests/integrated/test_multiprocess_api.py\", followed by \"git commit --amend\"?","commit_id":"f9e80555c47688af7804dbfbcea388edc519d081"}],"nova/wsgi.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a6ac018ed708cc8e14641137e4d410cc17ca17d","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import os"},{"line_number":24,"context_line":"import signal"},{"line_number":25,"context_line":"import sys"},{"line_number":26,"context_line":"import time"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"import eventlet"},{"line_number":29,"context_line":"from eventlet.green import socket"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAFH%2F%2F%2FPI%3D","line":26,"updated":"2012-03-25 23:23:07.000000000","message":"You don\u0027t use this import...","commit_id":"5e6291443685c99f7d206a82fc738b7bda3a87bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a6ac018ed708cc8e14641137e4d410cc17ca17d","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        # this type of API service, only needed if workers \u003e 1"},{"line_number":125,"context_line":"        self.master_worker \u003d Process(target\u003dself.run_workers, args\u003d())"},{"line_number":126,"context_line":"        self.master_worker.start()"},{"line_number":127,"context_line":"        LOG.info(_(\"Started multiprocess %(name)s on %(host)s:%(port)s\")"},{"line_number":128,"context_line":"                    % self.__dict__)"},{"line_number":129,"context_line":"        return None"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAFH%2F%2F%2FOs%3D","line":127,"updated":"2012-03-25 23:23:07.000000000","message":"From here on out, instead of the global LOG variable, you will want to use the self._logger variable here instead, which will be the child process\u0027 copy of the eventlet.wsgi.server logger...","commit_id":"5e6291443685c99f7d206a82fc738b7bda3a87bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a6ac018ed708cc8e14641137e4d410cc17ca17d","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def run_server_in_process(self):"},{"line_number":132,"context_line":"        \"\"\"Run a WSGI server.\"\"\""},{"line_number":133,"context_line":"        # do we need all these?"},{"line_number":134,"context_line":"        eventlet.wsgi.HttpProtocol.default_request_version \u003d \"HTTP/1.0\""},{"line_number":135,"context_line":"        eventlet.hubs.use_hub(\u0027poll\u0027)"},{"line_number":136,"context_line":"        eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAFH%2F%2F%2FPE%3D","line":133,"updated":"2012-03-25 23:23:07.000000000","message":"Probably not :) Looks like Swift and Glance, though...","commit_id":"5e6291443685c99f7d206a82fc738b7bda3a87bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a6ac018ed708cc8e14641137e4d410cc17ca17d","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        eventlet.hubs.use_hub(\u0027poll\u0027)"},{"line_number":136,"context_line":"        eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        self._pool \u003d eventlet.GreenPool(size\u003dself._pool_size)"},{"line_number":139,"context_line":"        gt \u003d None"},{"line_number":140,"context_line":"        try:"},{"line_number":141,"context_line":"            gt \u003d eventlet.spawn(self._start)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAFH%2F%2F%2FOo%3D","line":138,"updated":"2012-03-25 23:23:07.000000000","message":"Why create this pool if you are not going to use it? Perhaps you want something like this instead?\n\n        try:\n            eventlet.wsgi.server(self._socket, self.app,\n                    log\u003dself._wsgi_logger, custom_pool\u003dself._pool)\n        except socket.error, err:\n            if err[0] !\u003d errno.EINVAL:\n                raise\n        self._pool.waitall()\n\nAlso note that you will want to remove the creation of the self._pool object that is also in the constructor of this class... It belongs here, as you have it, in this block of code...","commit_id":"5e6291443685c99f7d206a82fc738b7bda3a87bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a6ac018ed708cc8e14641137e4d410cc17ca17d","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        gt.wait()"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def run_workers(self):"},{"line_number":149,"context_line":"        \"\"\" Start workers and wait for them to join"},{"line_number":150,"context_line":"        \"\"\""},{"line_number":151,"context_line":"        def kill_children(*args):"},{"line_number":152,"context_line":"            \"\"\"Kills the entire process group.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAFH%2F%2F%2FPA%3D","line":149,"updated":"2012-03-25 23:23:07.000000000","message":"nit: Please remove space between enclosing triple quotes","commit_id":"5e6291443685c99f7d206a82fc738b7bda3a87bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1a6ac018ed708cc8e14641137e4d410cc17ca17d","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            signal.signal(signal.SIGTERM, signal.SIG_IGN)"},{"line_number":156,"context_line":"            self.running \u003d False"},{"line_number":157,"context_line":"            for pid in self.children:"},{"line_number":158,"context_line":"                os.kill(pid, signal.SIGTERM)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        def hup(*args):"},{"line_number":161,"context_line":"            \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAFH%2F%2F%2FO0%3D","line":158,"updated":"2012-03-25 23:23:07.000000000","message":"I believe you could reduce the above two lines to just:\n\n os.killpg(0, signal.SIGTERM)","commit_id":"5e6291443685c99f7d206a82fc738b7bda3a87bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from eventlet.green import socket"},{"line_number":29,"context_line":"import eventlet.wsgi"},{"line_number":30,"context_line":"import greenlet"},{"line_number":31,"context_line":"from multiprocessing import Process, Queue"},{"line_number":32,"context_line":"from paste import deploy"},{"line_number":33,"context_line":"import routes.middleware"},{"line_number":34,"context_line":"import webob.dec"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B9Y%3D","line":31,"updated":"2012-03-26 18:52:33.000000000","message":"You don\u0027t use Queue anywhere. In addition, the Nova project\u0027s HACKING guidelines state that you should only import modules, never objects. So you should probably just import multiprocessing.","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        self._protocol \u003d protocol"},{"line_number":74,"context_line":"        self._pool_size \u003d pool_size or self.default_pool_size"},{"line_number":75,"context_line":"        self._pool \u003d None"},{"line_number":76,"context_line":"        #self._pool \u003d eventlet.GreenPool(self._pool_size)"},{"line_number":77,"context_line":"        self._logger \u003d logging.getLogger(\"nova.%s.wsgi.server\" % self.name)"},{"line_number":78,"context_line":"        self._wsgi_logger \u003d logging.WritableLogger(self._logger)"},{"line_number":79,"context_line":"        self.master_worker \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B9Q%3D","line":76,"updated":"2012-03-26 18:52:33.000000000","message":"Please remove the above line.","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self._pool_size \u003d pool_size or self.default_pool_size"},{"line_number":75,"context_line":"        self._pool \u003d None"},{"line_number":76,"context_line":"        #self._pool \u003d eventlet.GreenPool(self._pool_size)"},{"line_number":77,"context_line":"        self._logger \u003d logging.getLogger(\"nova.%s.wsgi.server\" % self.name)"},{"line_number":78,"context_line":"        self._wsgi_logger \u003d logging.WritableLogger(self._logger)"},{"line_number":79,"context_line":"        self.master_worker \u003d None"},{"line_number":80,"context_line":"        self.children \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B9M%3D","line":77,"updated":"2012-03-26 18:52:33.000000000","message":"Why did you change this? The log messages that will appear during WSGI server startup should probably be in eventlet.wsgi.server, right?","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        if self.workers \u003d\u003d 0:"},{"line_number":116,"context_line":"            # single process mode, useful for profiling, test, debug etc."},{"line_number":117,"context_line":"            self._pool \u003d eventlet.GreenPool(self._pool_size)"},{"line_number":118,"context_line":"            self._server \u003d eventlet.spawn(self._start)"},{"line_number":119,"context_line":"            LOG.info(_(\"Started %(name)s on %(host)s:%(port)s\") %"},{"line_number":120,"context_line":"                    self.__dict__)"},{"line_number":121,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B80%3D","line":118,"updated":"2012-03-26 18:52:33.000000000","message":"Hmm, unless I\u0027m missing something not-so-obvious, it seems the code above (and the existing code in Nova) doesn\u0027t actually use the GreenPool that it creates... instead it just spawns a single greenthread to run the self._start method... :(\n\nI believe the above should instead be:\n\n            self._pool \u003d eventlet.GreenPool(size\u003dself._pool_size)\n            self_.pool.spawn_n(self._single_run, self.app, self._socket)\n\nand then put this in the Server object somewhere:\n\n def _single_run(self, application, sock):\n      self.logger.info(_(\"Starting single process server\"))\n      eventlet.wsgi.server(sock, application, custom_pool\u003dself._pool,\n                            log\u003dself._wsgi_logger)","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            #                    self.app,"},{"line_number":145,"context_line":"            #                    protocol\u003dself._protocol,"},{"line_number":146,"context_line":"            #                    custom_pool\u003dself._pool,"},{"line_number":147,"context_line":"            #                    log\u003dself._wsgi_logger)"},{"line_number":148,"context_line":"        except socket.error, err:"},{"line_number":149,"context_line":"            if err[0] !\u003d errno.EINVAL:"},{"line_number":150,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B8o%3D","line":147,"updated":"2012-03-26 18:52:33.000000000","message":"I believe you need to remove the line:\n\n gt \u003d eventlet.spawn(self._start)\n\nand uncomment the block above.","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd588146b0cb6b82813a099c827a02052fe806b9","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                raise"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        gt.wait()"},{"line_number":153,"context_line":"        #self._pool.waitall()"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def run_workers(self):"},{"line_number":156,"context_line":"        \"\"\"Start workers and wait for them to join\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAFH%2F%2F%2B8g%3D","line":153,"updated":"2012-03-26 18:52:33.000000000","message":"Same here... remove the:\n\n gt.wait()\n\nand uncomment the other line.","commit_id":"579ec2b3b7190d0c942acb46b70269fc690f0571"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"82bc93362e985a94c310fe46754c3496be9e38e5","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            # Kill Active green threads in the pool"},{"line_number":254,"context_line":"            for gt in self._active_gt:"},{"line_number":255,"context_line":"                gt.kill()"},{"line_number":256,"context_line":"            #sys.exit(1)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        if self._tcp_server is not None:"},{"line_number":259,"context_line":"            LOG.info(_(\"Stopping raw TCP server.\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAFH%2F%2F9Uw%3D","line":256,"updated":"2012-03-30 18:20:47.000000000","message":"Did you mean to leave this line commented out?","commit_id":"cd30253e2e5e25f6e79c588801f5c5d99fb3e041"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"ad91e9fb3e7ad5cda1ccaef7435f88fc2ecb691a","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            # Kill Active green threads in the pool"},{"line_number":254,"context_line":"            for gt in self._active_gt:"},{"line_number":255,"context_line":"                gt.kill()"},{"line_number":256,"context_line":"            #sys.exit(1)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        if self._tcp_server is not None:"},{"line_number":259,"context_line":"            LOG.info(_(\"Stopping raw TCP server.\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAFH%2F%2F9O8%3D","line":256,"in_reply_to":"AAAAFH%2F%2F9Uw%3D","updated":"2012-03-31 01:53:25.000000000","message":"Yes, I did.  Sys.exit() would cause wrong behaviour in unittest, i.e. causing whole process exit.","commit_id":"cd30253e2e5e25f6e79c588801f5c5d99fb3e041"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"82bc93362e985a94c310fe46754c3496be9e38e5","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                # is already waiting"},{"line_number":282,"context_line":"                pass"},{"line_number":283,"context_line":"            else:"},{"line_number":284,"context_line":"                #self._server.wait()"},{"line_number":285,"context_line":"                self._pool.waitall()"},{"line_number":286,"context_line":"        except greenlet.GreenletExit:"},{"line_number":287,"context_line":"            LOG.info(_(\"WSGI server has stopped.\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAFH%2F%2F9Us%3D","line":284,"updated":"2012-03-30 18:20:47.000000000","message":"Should be able to remove the above commented-out line.","commit_id":"cd30253e2e5e25f6e79c588801f5c5d99fb3e041"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"ad91e9fb3e7ad5cda1ccaef7435f88fc2ecb691a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                # is already waiting"},{"line_number":282,"context_line":"                pass"},{"line_number":283,"context_line":"            else:"},{"line_number":284,"context_line":"                #self._server.wait()"},{"line_number":285,"context_line":"                self._pool.waitall()"},{"line_number":286,"context_line":"        except greenlet.GreenletExit:"},{"line_number":287,"context_line":"            LOG.info(_(\"WSGI server has stopped.\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAFH%2F%2F9O4%3D","line":284,"in_reply_to":"AAAAFH%2F%2F9Us%3D","updated":"2012-03-31 01:53:25.000000000","message":"Done","commit_id":"cd30253e2e5e25f6e79c588801f5c5d99fb3e041"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"22d24a738b7123236094aff4f7183aa11021e01d","unresolved":false,"context_lines":[{"line_number":280,"context_line":"                # is already waiting"},{"line_number":281,"context_line":"                pass"},{"line_number":282,"context_line":"            else:"},{"line_number":283,"context_line":"                #self._server.wait()"},{"line_number":284,"context_line":"                self._pool.waitall()"},{"line_number":285,"context_line":"        except greenlet.GreenletExit:"},{"line_number":286,"context_line":"            LOG.info(_(\"WSGI server has stopped.\"))"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAFX%2F%2F%2FgU%3D","line":283,"updated":"2012-04-06 15:27:43.000000000","message":"Best to remove comment above.","commit_id":"f8039b01ed62d1c85debedb654c3ceead950d32e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.app \u003d app"},{"line_number":67,"context_line":"        self.host \u003d host or \"0.0.0.0\""},{"line_number":68,"context_line":"        self.port \u003d port or 0"},{"line_number":69,"context_line":"        self.workers \u003d workers or 0"},{"line_number":70,"context_line":"        self._server \u003d None"},{"line_number":71,"context_line":"        self._socket \u003d None"},{"line_number":72,"context_line":"        self._protocol \u003d protocol"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9NE%3D","line":69,"updated":"2012-06-05 01:33:41.000000000","message":"I know this follows the previous lines of code, but setting the default to 0 is clearer","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.app \u003d app"},{"line_number":67,"context_line":"        self.host \u003d host or \"0.0.0.0\""},{"line_number":68,"context_line":"        self.port \u003d port or 0"},{"line_number":69,"context_line":"        self.workers \u003d workers or 0"},{"line_number":70,"context_line":"        self._server \u003d None"},{"line_number":71,"context_line":"        self._socket \u003d None"},{"line_number":72,"context_line":"        self._protocol \u003d protocol"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9Fc%3D","line":69,"in_reply_to":"AAAAHn%2F%2F9NE%3D","updated":"2012-06-06 08:54:26.000000000","message":"Done","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        self._logger \u003d logging.getLogger(\"nova.%s.wsgi.server\" % self.name)"},{"line_number":76,"context_line":"        self._wsgi_logger \u003d logging.WritableLogger(self._logger)"},{"line_number":77,"context_line":"        self.master_worker \u003d None"},{"line_number":78,"context_line":"        self.children \u003d []"},{"line_number":79,"context_line":"        self.running \u003d True"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _start(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9Mk%3D","line":78,"updated":"2012-06-05 01:33:41.000000000","message":"A set might be a better option here","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            (self.host, self.port) \u003d self._socket.getsockname()"},{"line_number":109,"context_line":"        except socket.error, err:"},{"line_number":110,"context_line":"            if err[0] !\u003d errno.EINVAL:"},{"line_number":111,"context_line":"                raise"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if self.workers \u003d\u003d 0:"},{"line_number":114,"context_line":"            # single process mode, useful for profiling, test, debug etc."}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9NA%3D","line":111,"updated":"2012-06-05 01:33:41.000000000","message":"This will leave self._socket undefined if it\u0027s EINVAL. The rest of the code assumes self._socket will be defined","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            (self.host, self.port) \u003d self._socket.getsockname()"},{"line_number":109,"context_line":"        except socket.error, err:"},{"line_number":110,"context_line":"            if err[0] !\u003d errno.EINVAL:"},{"line_number":111,"context_line":"                raise"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if self.workers \u003d\u003d 0:"},{"line_number":114,"context_line":"            # single process mode, useful for profiling, test, debug etc."}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F8nI%3D","line":111,"in_reply_to":"AAAAHn%2F%2F9NA%3D","updated":"2012-06-06 08:54:26.000000000","message":"self._socket is defined in __init__() but yes, EINVAL shouldn\u0027t be ignored. will fix.","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            self._server \u003d self._pool.spawn(self._start)"},{"line_number":117,"context_line":"            LOG.info(_(\"Started %(name)s on %(host)s:%(port)s\") %"},{"line_number":118,"context_line":"                    self.__dict__)"},{"line_number":119,"context_line":"            return None"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # master_worker doesn\u0027t actually do work (i.e. handle API request)"},{"line_number":122,"context_line":"        # but it\u0027s a managing process to handle signal/termination for"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9M0%3D","line":119,"updated":"2012-06-05 01:33:41.000000000","message":"Just a return should be sufficient here. It will make it clearer that the return value isn\u0027t important","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            self._server \u003d self._pool.spawn(self._start)"},{"line_number":117,"context_line":"            LOG.info(_(\"Started %(name)s on %(host)s:%(port)s\") %"},{"line_number":118,"context_line":"                    self.__dict__)"},{"line_number":119,"context_line":"            return None"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # master_worker doesn\u0027t actually do work (i.e. handle API request)"},{"line_number":122,"context_line":"        # but it\u0027s a managing process to handle signal/termination for"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9Eo%3D","line":119,"in_reply_to":"AAAAHn%2F%2F9M0%3D","updated":"2012-06-06 08:54:26.000000000","message":"Done","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.master_worker.start()"},{"line_number":127,"context_line":"        self._logger.info(_(\"Started %(name)s on %(host)s:%(port)s in process\")"},{"line_number":128,"context_line":"                    % self.__dict__)"},{"line_number":129,"context_line":"        return None"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def run_server_in_process(self):"},{"line_number":132,"context_line":"        \"\"\"Run a WSGI server.\"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9M4%3D","line":129,"updated":"2012-06-05 01:33:41.000000000","message":"This is unnecessary","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.master_worker.start()"},{"line_number":127,"context_line":"        self._logger.info(_(\"Started %(name)s on %(host)s:%(port)s in process\")"},{"line_number":128,"context_line":"                    % self.__dict__)"},{"line_number":129,"context_line":"        return None"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def run_server_in_process(self):"},{"line_number":132,"context_line":"        \"\"\"Run a WSGI server.\"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9Ek%3D","line":129,"in_reply_to":"AAAAHn%2F%2F9M4%3D","updated":"2012-06-06 08:54:26.000000000","message":"Done","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            self._pool.spawn_n(self._start)"},{"line_number":140,"context_line":"        except socket.error, err:"},{"line_number":141,"context_line":"            if err[0] !\u003d errno.EINVAL:"},{"line_number":142,"context_line":"                raise"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self._pool.waitall()"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9MU%3D","line":142,"updated":"2012-06-05 01:33:41.000000000","message":"Why is EINVAL ignored here?","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            self._pool.spawn_n(self._start)"},{"line_number":140,"context_line":"        except socket.error, err:"},{"line_number":141,"context_line":"            if err[0] !\u003d errno.EINVAL:"},{"line_number":142,"context_line":"                raise"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self._pool.waitall()"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9Ec%3D","line":142,"in_reply_to":"AAAAHn%2F%2F9MU%3D","updated":"2012-06-06 08:54:26.000000000","message":"No, it shouldn\u0027t be.  I\u0027ll fix it.","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            signal.signal(signal.SIGINT, signal.SIG_IGN)"},{"line_number":154,"context_line":"            self.running \u003d False"},{"line_number":155,"context_line":"            for pid in self.children:"},{"line_number":156,"context_line":"                os.kill(pid, signal.SIGTERM)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        def hup(*args):"},{"line_number":159,"context_line":"            \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9Mw%3D","line":156,"updated":"2012-06-05 01:33:41.000000000","message":"If a child exits for some reason, the kill will raise an exception that the pid doesn\u0027t exist. That exception should be handled more gracefully","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            signal.signal(signal.SIGINT, signal.SIG_IGN)"},{"line_number":154,"context_line":"            self.running \u003d False"},{"line_number":155,"context_line":"            for pid in self.children:"},{"line_number":156,"context_line":"                os.kill(pid, signal.SIGTERM)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        def hup(*args):"},{"line_number":159,"context_line":"            \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F8nE%3D","line":156,"in_reply_to":"AAAAHn%2F%2F9Mw%3D","updated":"2012-06-06 08:54:26.000000000","message":"Done","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"b6e1ec0890248fd425a3273eb7fd0088264eb8a7","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        signal.signal(signal.SIGINT, kill_children)"},{"line_number":168,"context_line":"        signal.signal(signal.SIGHUP, hup)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        while len(self.children) \u003c self.workers:"},{"line_number":171,"context_line":"            self.run_child()"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        self._logger.info(_(\"Started %(children_count)d worker for %(name)s\")"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9Kk%3D","line":170,"updated":"2012-06-05 02:37:20.000000000","message":"I think this is the culprit of the issues.  If you get a SIGTERM in the middle of setting up these workers... you\u0027ll end up in an endless loop here... never reaching the number of workers.  I think this needs a \u0027self.running\u0027 check to make sure we still want to be running.","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        signal.signal(signal.SIGINT, kill_children)"},{"line_number":168,"context_line":"        signal.signal(signal.SIGHUP, hup)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        while len(self.children) \u003c self.workers:"},{"line_number":171,"context_line":"            self.run_child()"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        self._logger.info(_(\"Started %(children_count)d worker for %(name)s\")"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F8nA%3D","line":170,"in_reply_to":"AAAAHn%2F%2F9Kk%3D","updated":"2012-06-06 08:54:26.000000000","message":"Done","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            pid \u003d os.fork()"},{"line_number":182,"context_line":"        except KeyboardInterrupt:"},{"line_number":183,"context_line":"            pass"},{"line_number":184,"context_line":"        if pid \u003d\u003d 0:"},{"line_number":185,"context_line":"            signal.signal(signal.SIGHUP, signal.SIG_DFL)"},{"line_number":186,"context_line":"            signal.signal(signal.SIGTERM, signal.SIG_DFL)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9NQ%3D","line":183,"updated":"2012-06-05 01:33:41.000000000","message":"This can leave pid undefined","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            pid \u003d os.fork()"},{"line_number":182,"context_line":"        except KeyboardInterrupt:"},{"line_number":183,"context_line":"            pass"},{"line_number":184,"context_line":"        if pid \u003d\u003d 0:"},{"line_number":185,"context_line":"            signal.signal(signal.SIGHUP, signal.SIG_DFL)"},{"line_number":186,"context_line":"            signal.signal(signal.SIGTERM, signal.SIG_DFL)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F8m4%3D","line":183,"in_reply_to":"AAAAHn%2F%2F9NQ%3D","updated":"2012-06-06 08:54:26.000000000","message":"Done","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                self.run_server_in_process()"},{"line_number":192,"context_line":"            except KeyboardInterrupt:"},{"line_number":193,"context_line":"                pass"},{"line_number":194,"context_line":"            self._logger.info(_(\u0027Child %d exiting normally\u0027) % os.getpid())"},{"line_number":195,"context_line":"            return None"},{"line_number":196,"context_line":"        else:"},{"line_number":197,"context_line":"            self._logger.info(_(\u0027[%(name)s] Started worker (pid: %(pid)s)\u0027) %"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9Ms%3D","line":194,"updated":"2012-06-05 01:33:41.000000000","message":"I wouldn\u0027t really call KeyboardInterrupt \"normal\"","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                self.run_server_in_process()"},{"line_number":192,"context_line":"            except KeyboardInterrupt:"},{"line_number":193,"context_line":"                pass"},{"line_number":194,"context_line":"            self._logger.info(_(\u0027Child %d exiting normally\u0027) % os.getpid())"},{"line_number":195,"context_line":"            return None"},{"line_number":196,"context_line":"        else:"},{"line_number":197,"context_line":"            self._logger.info(_(\u0027[%(name)s] Started worker (pid: %(pid)s)\u0027) %"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F8m0%3D","line":194,"in_reply_to":"AAAAHn%2F%2F9Ms%3D","updated":"2012-06-06 08:54:26.000000000","message":"Done","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            except KeyboardInterrupt:"},{"line_number":193,"context_line":"                pass"},{"line_number":194,"context_line":"            self._logger.info(_(\u0027Child %d exiting normally\u0027) % os.getpid())"},{"line_number":195,"context_line":"            return None"},{"line_number":196,"context_line":"        else:"},{"line_number":197,"context_line":"            self._logger.info(_(\u0027[%(name)s] Started worker (pid: %(pid)s)\u0027) %"},{"line_number":198,"context_line":"                              {\u0027name\u0027: self.name,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9Mo%3D","line":195,"updated":"2012-06-05 01:33:41.000000000","message":"Unnecessary","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            except KeyboardInterrupt:"},{"line_number":193,"context_line":"                pass"},{"line_number":194,"context_line":"            self._logger.info(_(\u0027Child %d exiting normally\u0027) % os.getpid())"},{"line_number":195,"context_line":"            return None"},{"line_number":196,"context_line":"        else:"},{"line_number":197,"context_line":"            self._logger.info(_(\u0027[%(name)s] Started worker (pid: %(pid)s)\u0027) %"},{"line_number":198,"context_line":"                              {\u0027name\u0027: self.name,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F8m8%3D","line":195,"in_reply_to":"AAAAHn%2F%2F9Mo%3D","updated":"2012-06-06 08:54:26.000000000","message":"Done","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"a785a89906c2b70fd8cd2e9d561e0fb51203248b","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            # set running state to false and kill all workers"},{"line_number":234,"context_line":"            self.running \u003d False"},{"line_number":235,"context_line":"            for pid in self.children:"},{"line_number":236,"context_line":"                os.kill(pid, signal.SIGTERM)"},{"line_number":237,"context_line":"                self.children.remove(pid)"},{"line_number":238,"context_line":"            # now terminate master_worker"},{"line_number":239,"context_line":"            if self.master_worker.is_alive():"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F9NM%3D","line":236,"updated":"2012-06-05 01:33:41.000000000","message":"If the child dies for another reason, then this can raise an exception. Exception should be caught and handled.","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"55bd4dbc3f70cda2cbca1808909bbf2e07bb3ed5","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            # set running state to false and kill all workers"},{"line_number":234,"context_line":"            self.running \u003d False"},{"line_number":235,"context_line":"            for pid in self.children:"},{"line_number":236,"context_line":"                os.kill(pid, signal.SIGTERM)"},{"line_number":237,"context_line":"                self.children.remove(pid)"},{"line_number":238,"context_line":"            # now terminate master_worker"},{"line_number":239,"context_line":"            if self.master_worker.is_alive():"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAHn%2F%2F8mw%3D","line":236,"in_reply_to":"AAAAHn%2F%2F9NM%3D","updated":"2012-06-06 08:54:26.000000000","message":"Done","commit_id":"e599636d09755f635604f64f17e9f56cac14575e"}]}
