)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"994a7b9d783d73aeda17473bad8aefc924e73869","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Flaper Fesp \u003cflaper87@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-04-05 18:05:14 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Call os.killpg for each child instead of the process group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch replaces `os.killpg(0, signal.SIGTERM)` with an os.killpg"},{"line_number":10,"context_line":"call for each child still running / present in the instance\u0027s children"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAOX%2F%2F7Wg%3D","line":7,"updated":"2013-04-05 17:23:28.000000000","message":"We probably change this to os.kill() to match the code as well.","commit_id":"211904f482aff642ed6085df9112ed8880a73f7f"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8f2d27727e7cf437f11513b10301b0c4d12c6189","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Flaper Fesp \u003cflaper87@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-04-05 18:05:14 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Call os.killpg for each child instead of the process group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch replaces `os.killpg(0, signal.SIGTERM)` with an os.killpg"},{"line_number":10,"context_line":"call for each child still running / present in the instance\u0027s children"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAOX%2F%2F7QI%3D","line":7,"in_reply_to":"AAAAOX%2F%2F7Wg%3D","updated":"2013-04-05 18:23:43.000000000","message":"Done","commit_id":"211904f482aff642ed6085df9112ed8880a73f7f"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"994a7b9d783d73aeda17473bad8aefc924e73869","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Call os.killpg for each child instead of the process group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch replaces `os.killpg(0, signal.SIGTERM)` with an os.killpg"},{"line_number":10,"context_line":"call for each child still running / present in the instance\u0027s children"},{"line_number":11,"context_line":"list."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAOX%2F%2F7Wc%3D","line":9,"updated":"2013-04-05 17:23:28.000000000","message":"and this.","commit_id":"211904f482aff642ed6085df9112ed8880a73f7f"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8f2d27727e7cf437f11513b10301b0c4d12c6189","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Call os.killpg for each child instead of the process group"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch replaces `os.killpg(0, signal.SIGTERM)` with an os.killpg"},{"line_number":10,"context_line":"call for each child still running / present in the instance\u0027s children"},{"line_number":11,"context_line":"list."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAOX%2F%2F7QE%3D","line":9,"in_reply_to":"AAAAOX%2F%2F7Wc%3D","updated":"2013-04-05 18:23:43.000000000","message":"Done","commit_id":"211904f482aff642ed6085df9112ed8880a73f7f"}],"glance/common/wsgi.py":[{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"2ce0d15d6aa0aea33f3691a1f3931afd67044cd9","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            self.running \u003d False"},{"line_number":180,"context_line":"            for pid in self.children:"},{"line_number":181,"context_line":"                try:"},{"line_number":182,"context_line":"                    os.killpg(pid, signal.SIGTERM)"},{"line_number":183,"context_line":"                except OSError as exc:"},{"line_number":184,"context_line":"                    if exc.errno !\u003d errno.ESRCH:"},{"line_number":185,"context_line":"                        raise"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOX%2F%2F8K4%3D","line":182,"updated":"2013-04-05 02:42:14.000000000","message":"You want os.kill not os.killpg","commit_id":"7b408979633643a29653ef88d78edc2cb6b66efc"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e5d8d593b56efd57be44eeaf56476ce73e17d041","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            self.running \u003d False"},{"line_number":180,"context_line":"            for pid in self.children:"},{"line_number":181,"context_line":"                try:"},{"line_number":182,"context_line":"                    os.killpg(pid, signal.SIGTERM)"},{"line_number":183,"context_line":"                except OSError as exc:"},{"line_number":184,"context_line":"                    if exc.errno !\u003d errno.ESRCH:"},{"line_number":185,"context_line":"                        raise"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOX%2F%2F7xI%3D","line":182,"in_reply_to":"AAAAOX%2F%2F8K4%3D","updated":"2013-04-05 13:47:45.000000000","message":"ooooooooooopsssssssss, forgot to change that!","commit_id":"7b408979633643a29653ef88d78edc2cb6b66efc"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"5726f8cb0595e29619d4fd91ba41768ce136b9b6","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                    os.kill(pid, signal.SIGTERM)"},{"line_number":183,"context_line":"                except OSError as exc:"},{"line_number":184,"context_line":"                    if exc.errno !\u003d errno.ESRCH:"},{"line_number":185,"context_line":"                        raise"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        def hup(*args):"},{"line_number":188,"context_line":"            \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOX%2F%2F7SY%3D","line":185,"updated":"2013-04-05 17:55:53.000000000","message":"I think we should probably log this error and perhaps any exception that comes in this handler.  If an exception is raised in the signal handler of the process it will still be killed and thus any problems could be lost.","commit_id":"211904f482aff642ed6085df9112ed8880a73f7f"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8f2d27727e7cf437f11513b10301b0c4d12c6189","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                    os.kill(pid, signal.SIGTERM)"},{"line_number":183,"context_line":"                except OSError as exc:"},{"line_number":184,"context_line":"                    if exc.errno !\u003d errno.ESRCH:"},{"line_number":185,"context_line":"                        raise"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        def hup(*args):"},{"line_number":188,"context_line":"            \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOX%2F%2F7QA%3D","line":185,"in_reply_to":"AAAAOX%2F%2F7SY%3D","updated":"2013-04-05 18:23:43.000000000","message":"Done","commit_id":"211904f482aff642ed6085df9112ed8880a73f7f"},{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"2a921842d14c6ccf60d8c1bcf04299294e1c25b9","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            self.running \u003d False"},{"line_number":180,"context_line":"            for pid in self.children:"},{"line_number":181,"context_line":"                try:"},{"line_number":182,"context_line":"                    os.kill(pid, signal.SIGTERM)"},{"line_number":183,"context_line":"                except OSError as exc:"},{"line_number":184,"context_line":"                    if exc.errno !\u003d errno.ESRCH:"},{"line_number":185,"context_line":"                        msg \u003d (_(\"Error occurred during children termination: \""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOX%2F%2F6To%3D","line":182,"updated":"2013-04-07 20:09:03.000000000","message":"why not just os.setpgid on the process to \u0027detach\u0027 it from parents and then keep the killpg to kill all children?","commit_id":"52446bcb6c5c32d1dfeecb829c5add4fb5cf6baa"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"9474b9fd254e5bff2e2d130c13a5a9aea86e8324","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            self.running \u003d False"},{"line_number":180,"context_line":"            for pid in self.children:"},{"line_number":181,"context_line":"                try:"},{"line_number":182,"context_line":"                    os.kill(pid, signal.SIGTERM)"},{"line_number":183,"context_line":"                except OSError as exc:"},{"line_number":184,"context_line":"                    if exc.errno !\u003d errno.ESRCH:"},{"line_number":185,"context_line":"                        msg \u003d (_(\"Error occurred during children termination: \""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F6kY%3D","line":182,"in_reply_to":"AAAAOX%2F%2F6To%3D","updated":"2013-04-11 18:56:25.000000000","message":"Hey, \n\nThat\u0027s a valid option as well, however, since the whole issue came up because killpg was killing not just its children but its whole genealogical groups, I preferred to use kill, which is what, IIRC, nova does as well.","commit_id":"52446bcb6c5c32d1dfeecb829c5add4fb5cf6baa"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"4ec117bd95df6a90086f19bfb3f9400df3c439dd","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        :param application: The application to be run in the WSGI server"},{"line_number":191,"context_line":"        :param default_port: Port to bind to if none is specified in conf"},{"line_number":192,"context_line":"        \"\"\""},{"line_number":193,"context_line":"        pgid \u003d os.getpid()"},{"line_number":194,"context_line":"        try:"},{"line_number":195,"context_line":"            # NOTE(flaper87): Make sure this process"},{"line_number":196,"context_line":"            # runs in its own process group."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fv28%3D","line":193,"updated":"2013-04-24 23:42:54.000000000","message":"Why not move this block into the kill_children function?","commit_id":"7f259d93619400a3d820db9e22e9c64ec07eac16"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4517df90ca5fa2f3991a0be30a13a9bcbddb0f19","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        :param application: The application to be run in the WSGI server"},{"line_number":191,"context_line":"        :param default_port: Port to bind to if none is specified in conf"},{"line_number":192,"context_line":"        \"\"\""},{"line_number":193,"context_line":"        pgid \u003d os.getpid()"},{"line_number":194,"context_line":"        try:"},{"line_number":195,"context_line":"            # NOTE(flaper87): Make sure this process"},{"line_number":196,"context_line":"            # runs in its own process group."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FvEY%3D","line":193,"in_reply_to":"AAAAOn%2F%2Fv28%3D","updated":"2013-04-25 16:57:54.000000000","message":"Don\u0027t think so.  setpgid should be called before starting other processes","commit_id":"7f259d93619400a3d820db9e22e9c64ec07eac16"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"4ec117bd95df6a90086f19bfb3f9400df3c439dd","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            # NOTE(flaper87): Make sure this process"},{"line_number":196,"context_line":"            # runs in its own process group."},{"line_number":197,"context_line":"            os.setpgid(pgid, pgid)"},{"line_number":198,"context_line":"        except OSError:"},{"line_number":199,"context_line":"            # NOTE(flaper87): When running glance-control,"},{"line_number":200,"context_line":"            # (glance\u0027s functional tests, for example)"},{"line_number":201,"context_line":"            # under subprocess.Popen, setpgid raises an"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fv1E%3D","line":198,"updated":"2013-04-24 23:42:54.000000000","message":"Are there any more details on what happens/why?  I am concerned that the use case for this patch (running under eclipse) will be in the same situation.","commit_id":"7f259d93619400a3d820db9e22e9c64ec07eac16"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4517df90ca5fa2f3991a0be30a13a9bcbddb0f19","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            # NOTE(flaper87): Make sure this process"},{"line_number":196,"context_line":"            # runs in its own process group."},{"line_number":197,"context_line":"            os.setpgid(pgid, pgid)"},{"line_number":198,"context_line":"        except OSError:"},{"line_number":199,"context_line":"            # NOTE(flaper87): When running glance-control,"},{"line_number":200,"context_line":"            # (glance\u0027s functional tests, for example)"},{"line_number":201,"context_line":"            # under subprocess.Popen, setpgid raises an"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FvBA%3D","line":198,"in_reply_to":"AAAAOn%2F%2Fv1E%3D","updated":"2013-04-25 16:57:54.000000000","message":"TBH, I don\u0027t know the \"exact\" reason why this happens. My assumption is that it fails because glance-control changes the process\u0027 session id and then it fails when execlp is called. I tested it running glance-api and glance-registry directly and it worked. (OSError is raised by execpl)\n\nI also asked the reporter to give this a try before we merge it, dunno if he has had the chance. \n\nAlso, TBH, it seems like a very unique case, I wonder if there are other people running glance under eclipse / pydev (or at least using pydev\u0027s debuuger) that have had this same issue. My concern is that we might be trying to fix in Glance a bug that actually belongs to eclipse. \n\nHope the above makes sense.","commit_id":"7f259d93619400a3d820db9e22e9c64ec07eac16"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"17ddeacfefa3f6cc5ad9b8b39d649e2b4766166c","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            # NOTE(flaper87): Make sure this process"},{"line_number":196,"context_line":"            # runs in its own process group."},{"line_number":197,"context_line":"            os.setpgid(pgid, pgid)"},{"line_number":198,"context_line":"        except OSError:"},{"line_number":199,"context_line":"            # NOTE(flaper87): When running glance-control,"},{"line_number":200,"context_line":"            # (glance\u0027s functional tests, for example)"},{"line_number":201,"context_line":"            # under subprocess.Popen, setpgid raises an"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fs5E%3D","line":198,"in_reply_to":"AAAAOn%2F%2FvBA%3D","updated":"2013-04-26 23:38:56.000000000","message":"I re-factored the test suite to not use glance control and I ran into the same thing that was reported in the eclipse bug.  You patch here fixed that so we should be good.","commit_id":"7f259d93619400a3d820db9e22e9c64ec07eac16"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d0b715aa78031d51213622ff074ecbd0143c32fb","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            # (glance\u0027s functional tests, for example)"},{"line_number":201,"context_line":"            # under subprocess.Popen, setpgid raises an"},{"line_number":202,"context_line":"            # OSError \u0027Operation not permitted\u0027. (Nasty"},{"line_number":203,"context_line":"            # things happen in the middle)."},{"line_number":204,"context_line":"            # If that happens, pgid \u003d 0 will be"},{"line_number":205,"context_line":"            # used."},{"line_number":206,"context_line":"            #"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FrsE%3D","line":203,"updated":"2013-04-29 10:08:54.000000000","message":"Not sure subprocess.Popen is really relevant here.\n\nHow about something like:\n\n  s/# under subprocess.Popen, setpgid raises an\n    # OSError \u0027Operation not permitted\u0027. (Nasty\n    # things happen in the middle)./\n    # setpgid fails with EPERM as glance-control\n    # creates a fresh session, of which the newly\n    # launched service becomes the leader (session\n    # leaders may not change process groups)./","commit_id":"7f259d93619400a3d820db9e22e9c64ec07eac16"}]}
