)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"8dac0641b0049bbd3f3683b7232400e69b32ace1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Assaf Muller \u003camuller@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-23 19:15:44 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow async process to start and stop process synchronously"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Move utility functions from test tree to non-test tree"},{"line_number":10,"context_line":"* Add tests for newly moved functions"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba7be1f8_14bd5cb7","line":7,"updated":"2015-02-25 16:42:51.000000000","message":"Would like to point out that \u0027synchronously\u0027 implies a queue (for example), not a \u0027wait until this is done and in the mean time block everything else in this thread\u0027 approach.\n\nAlso, I\u0027m not too familiar with the inner works of eventlet, but couldn\u0027t there be 2 different green threads running at the same time, both of which use async_process for some reason? What if one of them has blocking\u003dTrue and the other has blocking\u003dFalse? Is this still synchronous? What if both has blocking\u003dTrue?\n\nI think the term should be clarified following the answers. If the code does behave as I expect, it should be clarified that it\u0027s synchronous only within the green thread.","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9b6e7ce439e3f77263ba18974281d0837d8dccc3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Assaf Muller \u003camuller@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-23 19:15:44 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow async process to start and stop process synchronously"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Move utility functions from test tree to non-test tree"},{"line_number":10,"context_line":"* Add tests for newly moved functions"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba7be1f8_1af1cc6a","line":7,"in_reply_to":"ba7be1f8_14bd5cb7","updated":"2015-02-26 18:56:42.000000000","message":"synchronously has another usage which would be akin to \u0027blocking\u0027. As for the eventlet case, per our offline discussion this cannot happen. You wouldn\u0027t have two greenthreads both invoking \u0027start\u0027 on the *same* AsyncProcess. This would indicate that something is horribly broken in your agent and I would expect absolutely everything else to fall apart as well.","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"193bc0ddf0115704a48ea1ff99e48aed8b71cef4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Assaf Muller \u003camuller@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-23 19:15:44 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow async process to start and stop process synchronously"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Move utility functions from test tree to non-test tree"},{"line_number":10,"context_line":"* Add tests for newly moved functions"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba7be1f8_28b9e0ec","line":7,"in_reply_to":"ba7be1f8_17b99eec","updated":"2015-02-27 00:33:45.000000000","message":"Done","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"704fa6ff0b475ac94f2641e458bfbfc38bce8dda","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Assaf Muller \u003camuller@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-23 19:15:44 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow async process to start and stop process synchronously"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Move utility functions from test tree to non-test tree"},{"line_number":10,"context_line":"* Add tests for newly moved functions"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba7be1f8_17b99eec","line":7,"in_reply_to":"ba7be1f8_1af1cc6a","updated":"2015-02-26 21:31:59.000000000","message":"Consider rewording to \u0027Allow async process to block on process start and stop\u0027","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"}],"neutron/agent/linux/async_process.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"8dac0641b0049bbd3f3683b7232400e69b32ace1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self._stderr_lines \u003d eventlet.queue.LightQueue()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    @classmethod"},{"line_number":79,"context_line":"    def _strip_netns(cls, cmd):"},{"line_number":80,"context_line":"        return cmd[4:] if cmd[0:3] \u003d\u003d [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027] else cmd"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def is_active(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_f4bfe85e","line":79,"updated":"2015-02-25 16:42:51.000000000","message":"https://review.openstack.org/#/c/149647/24/neutron/agent/linux/ip_monitor.py L75 manually adds the \u0027ip netns exec\u0027. When I first had a read through that patch it made sense as I reckoned that async_proccess shouldn\u0027t be made aware of the \u0027ip netns exec\u0027 wrapping stuff.\n\nI think that if this code should be made aware of this in the smaller, \u0027/proc/%s/cmdline\u0027 scope, it should also be made aware of this in the larger, adding the prefix, scope. That\u0027s just me, though.","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"193bc0ddf0115704a48ea1ff99e48aed8b71cef4","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self._stderr_lines \u003d eventlet.queue.LightQueue()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    @classmethod"},{"line_number":79,"context_line":"    def _strip_netns(cls, cmd):"},{"line_number":80,"context_line":"        return cmd[4:] if cmd[0:3] \u003d\u003d [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027] else cmd"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def is_active(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_482ff4f6","line":79,"in_reply_to":"ba7be1f8_3a9bf018","updated":"2015-02-27 00:33:45.000000000","message":"On second thought adding an optional parameter should not be a problem at all...","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9b6e7ce439e3f77263ba18974281d0837d8dccc3","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self._stderr_lines \u003d eventlet.queue.LightQueue()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    @classmethod"},{"line_number":79,"context_line":"    def _strip_netns(cls, cmd):"},{"line_number":80,"context_line":"        return cmd[4:] if cmd[0:3] \u003d\u003d [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027] else cmd"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def is_active(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_3a9bf018","line":79,"in_reply_to":"ba7be1f8_f4bfe85e","updated":"2015-02-26 18:56:42.000000000","message":"Per our offline conversation, I agree. AsyncProcess should accept a command and a namespace. I\u0027ll have to look into the significance of changing the signature since this code could be used by other repositories now \u003d/ But maybe that\u0027s not the case, we\u0027ll see.","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"704fa6ff0b475ac94f2641e458bfbfc38bce8dda","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        return utils.pid_invoked_with_cmdline("},{"line_number":87,"context_line":"            self._get_pid(), self._strip_netns(self.cmd))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def start(self, blocking\u003dFalse):"},{"line_number":90,"context_line":"        \"\"\"Launch a process and monitor it asynchronously.\"\"\""},{"line_number":91,"context_line":"        if self._kill_event:"},{"line_number":92,"context_line":"            raise AsyncProcessException(_(\u0027Process is already started\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_9724ae0f","line":89,"updated":"2015-02-26 21:31:59.000000000","message":"In keeping with the convention of this class (parameters of all public methods should be documented in the docstring), please add a parameter doc for blocking.  I think it also makes sense to document the fact that eventlet.timeout.Timeout will be raised if blocking\u003dTrue and the default timeout is reached.\n\nIt\u0027s possible that the timeout should be configurable at some point, but YAGNI for now.","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"193bc0ddf0115704a48ea1ff99e48aed8b71cef4","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        return utils.pid_invoked_with_cmdline("},{"line_number":87,"context_line":"            self._get_pid(), self._strip_netns(self.cmd))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def start(self, blocking\u003dFalse):"},{"line_number":90,"context_line":"        \"\"\"Launch a process and monitor it asynchronously.\"\"\""},{"line_number":91,"context_line":"        if self._kill_event:"},{"line_number":92,"context_line":"            raise AsyncProcessException(_(\u0027Process is already started\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_88ec8c91","line":89,"in_reply_to":"ba7be1f8_9724ae0f","updated":"2015-02-27 00:33:45.000000000","message":"Done","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"8dac0641b0049bbd3f3683b7232400e69b32ace1","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            LOG.debug(\u0027Launching async process [%s].\u0027, self.cmd)"},{"line_number":95,"context_line":"            self._spawn()"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if blocking:"},{"line_number":98,"context_line":"            utils.wait_until_true(self.is_active)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def stop(self, blocking\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_69b32598","line":97,"updated":"2015-02-25 16:42:51.000000000","message":"Correct me if I\u0027m wrong, but if this times out for some reason (the process is created but instantly dies, so no pid can be found now) - this will actually crash the l3 agent!\n\nWe probably want to put a try-except block on all wait_until_true calls (or modify the actual function to not behave so harshly).","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9b6e7ce439e3f77263ba18974281d0837d8dccc3","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            LOG.debug(\u0027Launching async process [%s].\u0027, self.cmd)"},{"line_number":95,"context_line":"            self._spawn()"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if blocking:"},{"line_number":98,"context_line":"            utils.wait_until_true(self.is_active)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def stop(self, blocking\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_9a793cca","line":97,"in_reply_to":"ba7be1f8_69b32598","updated":"2015-02-26 18:56:42.000000000","message":"The L3 agent will catch the exception and yell that the router was not configured properly, and happily configure other routers. That is the intended behavior, that router configuration should blow up as a (Presumably critical?) process did not start!","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"8dac0641b0049bbd3f3683b7232400e69b32ace1","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                     self._kill_event)"},{"line_number":125,"context_line":"            self._watchers.append(watcher)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_pid(self):"},{"line_number":128,"context_line":"        if self._process:"},{"line_number":129,"context_line":"            return utils.get_root_helper_child_pid("},{"line_number":130,"context_line":"                self._process.pid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_14547cfd","line":127,"updated":"2015-02-25 16:42:51.000000000","message":"Can we change pid to be a class property instead? See https://review.openstack.org/#/c/128259/24/neutron/agent/linux/async_process.py for examples ;-)","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9b6e7ce439e3f77263ba18974281d0837d8dccc3","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                     self._kill_event)"},{"line_number":125,"context_line":"            self._watchers.append(watcher)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_pid(self):"},{"line_number":128,"context_line":"        if self._process:"},{"line_number":129,"context_line":"            return utils.get_root_helper_child_pid("},{"line_number":130,"context_line":"                self._process.pid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_1a4d4c9a","line":127,"in_reply_to":"ba7be1f8_14547cfd","updated":"2015-02-26 18:56:42.000000000","message":"I remember I defined it was a property in the beginning and had some issue during testing, I\u0027ll revisit this.","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"193bc0ddf0115704a48ea1ff99e48aed8b71cef4","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                     self._kill_event)"},{"line_number":125,"context_line":"            self._watchers.append(watcher)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_pid(self):"},{"line_number":128,"context_line":"        if self._process:"},{"line_number":129,"context_line":"            return utils.get_root_helper_child_pid("},{"line_number":130,"context_line":"                self._process.pid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_a85cf04d","line":127,"in_reply_to":"ba7be1f8_17e8be15","updated":"2015-02-27 00:33:45.000000000","message":"Done","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"704fa6ff0b475ac94f2641e458bfbfc38bce8dda","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                     self._kill_event)"},{"line_number":125,"context_line":"            self._watchers.append(watcher)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_pid(self):"},{"line_number":128,"context_line":"        if self._process:"},{"line_number":129,"context_line":"            return utils.get_root_helper_child_pid("},{"line_number":130,"context_line":"                self._process.pid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_17e8be15","line":127,"in_reply_to":"ba7be1f8_1a4d4c9a","updated":"2015-02-26 21:31:59.000000000","message":"I\u0027d vote for a property as well.","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"412b548fa463e30e045c7fb3506eb502d73d0c6a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        :param namespace: Optional, start the command in the specified"},{"line_number":65,"context_line":"               namespace."},{"line_number":66,"context_line":"        \"\"\""},{"line_number":67,"context_line":"        self.cmd \u003d ([\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, namespace] +"},{"line_number":68,"context_line":"                    cmd if namespace is not None else cmd)"},{"line_number":69,"context_line":"        self.cmd_without_namespace \u003d cmd"},{"line_number":70,"context_line":"        self.run_as_root \u003d run_as_root"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_4317d554","line":67,"updated":"2015-02-27 00:45:10.000000000","message":"It\u0027s strange to see raw invocations of ip netns.  I see that ip_lib uses utils.execute, but maybe it\u0027s possible to refactor so that the creation of the command array can be reused here?","commit_id":"20d73f0317e2bb54ea5083434d537cb9b0cefe77"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"f00211aa491de3301f6c9ba2de9ac2409245bb0d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        :param namespace: Optional, start the command in the specified"},{"line_number":65,"context_line":"               namespace."},{"line_number":66,"context_line":"        \"\"\""},{"line_number":67,"context_line":"        self.cmd \u003d ([\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, namespace] +"},{"line_number":68,"context_line":"                    cmd if namespace is not None else cmd)"},{"line_number":69,"context_line":"        self.cmd_without_namespace \u003d cmd"},{"line_number":70,"context_line":"        self.run_as_root \u003d run_as_root"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_def47ad1","line":67,"in_reply_to":"ba7be1f8_4317d554","updated":"2015-02-27 00:55:57.000000000","message":"Done","commit_id":"20d73f0317e2bb54ea5083434d537cb9b0cefe77"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"412b548fa463e30e045c7fb3506eb502d73d0c6a","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if blocking:"},{"line_number":104,"context_line":"            utils.wait_until_true(self.is_active)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def stop(self, blocking\u003dFalse):"},{"line_number":107,"context_line":"        \"\"\"Halt the process and watcher threads.\"\"\""},{"line_number":108,"context_line":"        if self._kill_event:"},{"line_number":109,"context_line":"            LOG.debug(\u0027Halting async process [%s].\u0027, self.cmd)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_c31e650d","line":106,"updated":"2015-02-27 00:45:10.000000000","message":"Docstring additions are suggested here as well.","commit_id":"20d73f0317e2bb54ea5083434d537cb9b0cefe77"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"f00211aa491de3301f6c9ba2de9ac2409245bb0d","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if blocking:"},{"line_number":104,"context_line":"            utils.wait_until_true(self.is_active)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def stop(self, blocking\u003dFalse):"},{"line_number":107,"context_line":"        \"\"\"Halt the process and watcher threads.\"\"\""},{"line_number":108,"context_line":"        if self._kill_event:"},{"line_number":109,"context_line":"            LOG.debug(\u0027Halting async process [%s].\u0027, self.cmd)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_bef7c6d3","line":106,"in_reply_to":"ba7be1f8_c31e650d","updated":"2015-02-27 00:55:57.000000000","message":"Done","commit_id":"20d73f0317e2bb54ea5083434d537cb9b0cefe77"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f86f5296e6f09a03e63ef9f30126843f01d3f493","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return utils.pid_invoked_with_cmdline("},{"line_number":88,"context_line":"            self.pid, self.cmd_without_namespace)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def start(self, blocking\u003dFalse):"},{"line_number":91,"context_line":"        \"\"\"Launch a process and monitor it asynchronously."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        :param blocking: Block until the process has started."}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_7398f21b","line":90,"updated":"2015-02-28 00:10:40.000000000","message":"Consider adding a method called \"start_and_block\" or something like that.\n\n def start_and_block(self):\n     self.start()\n     utils.wait_until_true(self.is_active)","commit_id":"7907d40075de7528122b0e900a5699b280a04901"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f86f5296e6f09a03e63ef9f30126843f01d3f493","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if blocking:"},{"line_number":104,"context_line":"            utils.wait_until_true(self.is_active)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def stop(self, blocking\u003dFalse):"},{"line_number":107,"context_line":"        \"\"\"Halt the process and watcher threads."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        :param blocking: Block until the process has stopped."}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_939f2603","line":106,"updated":"2015-02-28 00:10:40.000000000","message":"ditto.","commit_id":"7907d40075de7528122b0e900a5699b280a04901"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"3a737d65954869f9ebc9b554ec34423a2b0f6a11","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            raise AsyncProcessException(_(\u0027Process is not running.\u0027))"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if blocking:"},{"line_number":120,"context_line":"            utils.wait_until_true(lambda: not self.is_active())"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _spawn(self):"},{"line_number":123,"context_line":"        \"\"\"Spawn a process and its watchers.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_3095dfe3","line":120,"updated":"2015-10-06 06:31:40.000000000","message":"Is this necessary?\n_kill_process already had a call to self._process.wait().","commit_id":"7907d40075de7528122b0e900a5699b280a04901"}],"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"35c68763e3a5de87d46b43eae62b062f29fb3bf7","unresolved":false,"context_lines":[{"line_number":692,"context_line":"    \"\"\"Add an optional namespace to the command.\"\"\""},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"    return ([\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, namespace] +"},{"line_number":695,"context_line":"            cmd if namespace is not None else cmd)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_141c2a6a","line":695,"updated":"2015-02-27 06:50:53.000000000","message":"(nit but for readability)\n\nI prefer to wrapping the line before \"if\" because \"cmd\" at the beginning is a part of the previous line.\n\nAn empty string as \"namespace\" is not valid, so I think it can be as follows (it is the way used previously).\n\n  if namespace:\n      return [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, namespace] + cmd\n  else:\n      return cmd","commit_id":"46564e1bacefa32dfa097309a5d2af98b7ed19d4"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"d78d2222f23a3be4d7a3f95adba68928e273d940","unresolved":false,"context_lines":[{"line_number":692,"context_line":"    \"\"\"Add an optional namespace to the command.\"\"\""},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"    return ([\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, namespace] +"},{"line_number":695,"context_line":"            cmd if namespace is not None else cmd)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_d909dbde","line":695,"in_reply_to":"ba7be1f8_141c2a6a","updated":"2015-02-27 13:47:16.000000000","message":"Done","commit_id":"46564e1bacefa32dfa097309a5d2af98b7ed19d4"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"2611f91dd90a7e0ae3df8433325bbb73711f3635","unresolved":false,"context_lines":[{"line_number":691,"context_line":"def add_namespace_to_cmd(cmd, namespace\u003dNone):"},{"line_number":692,"context_line":"    \"\"\"Add an optional namespace to the command.\"\"\""},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"    return [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, namespace] + cmd if namespace else cmd"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_b0ac2a8e","line":694,"updated":"2015-02-27 18:30:33.000000000","message":"(No action required) I\u0027m not sure I\u0027m used the ternary operator quite yet.  I find multi-line conditionals easier to read.","commit_id":"7907d40075de7528122b0e900a5699b280a04901"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f86f5296e6f09a03e63ef9f30126843f01d3f493","unresolved":false,"context_lines":[{"line_number":691,"context_line":"def add_namespace_to_cmd(cmd, namespace\u003dNone):"},{"line_number":692,"context_line":"    \"\"\"Add an optional namespace to the command.\"\"\""},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"    return [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, namespace] + cmd if namespace else cmd"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_d3243ec8","line":694,"in_reply_to":"ba7be1f8_b0ac2a8e","updated":"2015-02-28 00:10:40.000000000","message":"+1 I was going to make the same comment.  Then, I refreshed and there was Maru\u0027s comment.  That\u0027s what I get for leaving the review in a side tab all day long and not finishing my review.\n\n  if namespace:\n      reutrn [...] + cmd\n  return cmd","commit_id":"7907d40075de7528122b0e900a5699b280a04901"}],"neutron/agent/linux/utils.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"5900060388853db1073dcbfbc3866a03b5a02131","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    return cmdlines_are_equal(expected_cmd, cmdline)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"def wait_until_true(predicate, timeout\u003d60, sleep\u003d1, exception\u003dNone):"},{"line_number":261,"context_line":"    \"\"\""},{"line_number":262,"context_line":"    Wait until callable predicate is evaluated as True"},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_177a2cf1","line":260,"updated":"2015-02-23 15:23:28.000000000","message":"You should add some tests for this","commit_id":"04b04b7e32cd9933a264f58f8e9c2efc5dcd0ddf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"678248c747d77070bb4fc72f386997fbc494b18b","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    return cmdlines_are_equal(expected_cmd, cmdline)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"def wait_until_true(predicate, timeout\u003d60, sleep\u003d1, exception\u003dNone):"},{"line_number":261,"context_line":"    \"\"\""},{"line_number":262,"context_line":"    Wait until callable predicate is evaluated as True"},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_e96dc09a","line":260,"in_reply_to":"ba7be1f8_177a2cf1","updated":"2015-02-23 15:35:29.000000000","message":"Done","commit_id":"04b04b7e32cd9933a264f58f8e9c2efc5dcd0ddf"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"704fa6ff0b475ac94f2641e458bfbfc38bce8dda","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"def get_cmdline_from_pid(pid):"},{"line_number":235,"context_line":"    if pid is None or not os.path.exists(\u0027/proc/%s\u0027 % pid):"},{"line_number":236,"context_line":"        return list()"},{"line_number":237,"context_line":"    with open(\u0027/proc/%s/cmdline\u0027 % pid, \u0027r\u0027) as f:"},{"line_number":238,"context_line":"        return f.readline().split(\u0027\\0\u0027)[:-1]"},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_97c2ee84","line":236,"updated":"2015-02-26 21:31:59.000000000","message":"(No action required) Or as everyone prefers to say it, []","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"193bc0ddf0115704a48ea1ff99e48aed8b71cef4","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"def get_cmdline_from_pid(pid):"},{"line_number":235,"context_line":"    if pid is None or not os.path.exists(\u0027/proc/%s\u0027 % pid):"},{"line_number":236,"context_line":"        return list()"},{"line_number":237,"context_line":"    with open(\u0027/proc/%s/cmdline\u0027 % pid, \u0027r\u0027) as f:"},{"line_number":238,"context_line":"        return f.readline().split(\u0027\\0\u0027)[:-1]"},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_883f2cd6","line":236,"in_reply_to":"ba7be1f8_97c2ee84","updated":"2015-02-27 00:33:45.000000000","message":"Just copy/pasted this code but I\u0027ll change it. list() looks like it just landed after a 16 hours flight, all weird and funky smellin\u0027.","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"35c68763e3a5de87d46b43eae62b062f29fb3bf7","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import eventlet"},{"line_number":17,"context_line":"import fcntl"},{"line_number":18,"context_line":"import glob"},{"line_number":19,"context_line":"import os"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_742ac67f","line":16,"updated":"2015-02-27 06:50:53.000000000","message":"it is better to move eventlet to L.24","commit_id":"46564e1bacefa32dfa097309a5d2af98b7ed19d4"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"d78d2222f23a3be4d7a3f95adba68928e273d940","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import eventlet"},{"line_number":17,"context_line":"import fcntl"},{"line_number":18,"context_line":"import glob"},{"line_number":19,"context_line":"import os"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_59f5ebc9","line":16,"in_reply_to":"ba7be1f8_742ac67f","updated":"2015-02-27 13:47:16.000000000","message":"Done","commit_id":"46564e1bacefa32dfa097309a5d2af98b7ed19d4"}],"neutron/tests/functional/agent/linux/test_async_process.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"704fa6ff0b475ac94f2641e458bfbfc38bce8dda","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            eventlet.sleep(0.01)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class TestAsyncProcess(AsyncProcessTestFramework):"},{"line_number":44,"context_line":"    def test_stopping_async_process_lifecycle(self):"},{"line_number":45,"context_line":"        proc \u003d async_process.AsyncProcess([\u0027tail\u0027, \u0027-f\u0027,"},{"line_number":46,"context_line":"                                           self.test_file_path])"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_f7496ab8","line":43,"updated":"2015-02-26 21:31:59.000000000","message":"I think a lifecycle test that validates the blocking behavior is suggested.  I\u0027m undecided as to whether we need a test for both blocking and non-blocking, since blocking is a superset of non-blocking, so simply adding blocking\u003dTrue might be enough.  Thoughts?","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"193bc0ddf0115704a48ea1ff99e48aed8b71cef4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            eventlet.sleep(0.01)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class TestAsyncProcess(AsyncProcessTestFramework):"},{"line_number":44,"context_line":"    def test_stopping_async_process_lifecycle(self):"},{"line_number":45,"context_line":"        proc \u003d async_process.AsyncProcess([\u0027tail\u0027, \u0027-f\u0027,"},{"line_number":46,"context_line":"                                           self.test_file_path])"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_43fef506","line":43,"in_reply_to":"ba7be1f8_f7496ab8","updated":"2015-02-27 00:33:45.000000000","message":"blocking\u003dTrue here should be enough so that we exercise all code paths. I wasn\u0027t concerned about this because the next patch in the series uses the new functionality and it\u0027s tested with blocking\u003dTrue.","commit_id":"2d1dc47a3907884f5a39648c0bb0cbb5e5f298cf"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"543aa82bc4faa540a269365dc2b1ff1e49d13fc3","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def test_stopping_async_process_lifecycle(self):"},{"line_number":45,"context_line":"        proc \u003d async_process.AsyncProcess([\u0027tail\u0027, \u0027-f\u0027,"},{"line_number":46,"context_line":"                                           self.test_file_path])"},{"line_number":47,"context_line":"        proc.start(blocking\u003dTrue)"},{"line_number":48,"context_line":"        self._check_stdout(proc)"},{"line_number":49,"context_line":"        proc.stop(blocking\u003dTrue)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_be3d062f","line":47,"updated":"2015-02-27 01:03:23.000000000","message":"It occurs to me that there\u0027s a hole in this test (and yes, I was the original author).  Please add a call to addCleanup(proc.stop) for sanity\u0027s sake.","commit_id":"46564e1bacefa32dfa097309a5d2af98b7ed19d4"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"782d158b85c44e6dceac9bd9199c5df24ac956c8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def test_stopping_async_process_lifecycle(self):"},{"line_number":45,"context_line":"        proc \u003d async_process.AsyncProcess([\u0027tail\u0027, \u0027-f\u0027,"},{"line_number":46,"context_line":"                                           self.test_file_path])"},{"line_number":47,"context_line":"        proc.start(blocking\u003dTrue)"},{"line_number":48,"context_line":"        self._check_stdout(proc)"},{"line_number":49,"context_line":"        proc.stop(blocking\u003dTrue)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_e094388e","line":47,"in_reply_to":"ba7be1f8_be3d062f","updated":"2015-02-27 03:55:06.000000000","message":"Done","commit_id":"46564e1bacefa32dfa097309a5d2af98b7ed19d4"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"2611f91dd90a7e0ae3df8433325bbb73711f3635","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class TestAsyncProcess(AsyncProcessTestFramework):"},{"line_number":43,"context_line":"    def _safe_stop(self, proc):"},{"line_number":44,"context_line":"        try:"},{"line_number":45,"context_line":"            proc.stop()"},{"line_number":46,"context_line":"        except async_process.AsyncProcessException:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_d09b5e70","line":43,"updated":"2015-02-27 18:30:33.000000000","message":"(No action required) Maybe stop should accept an optional parameter, ignore_error\u003dTrue?  But maybe this is a one-off.","commit_id":"7907d40075de7528122b0e900a5699b280a04901"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"2611f91dd90a7e0ae3df8433325bbb73711f3635","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def test_stopping_async_process_lifecycle(self):"},{"line_number":50,"context_line":"        proc \u003d async_process.AsyncProcess([\u0027tail\u0027, \u0027-f\u0027,"},{"line_number":51,"context_line":"                                           self.test_file_path])"},{"line_number":52,"context_line":"        self.addCleanup(self._safe_stop, proc)"},{"line_number":53,"context_line":"        proc.start(blocking\u003dTrue)"},{"line_number":54,"context_line":"        self._check_stdout(proc)"},{"line_number":55,"context_line":"        proc.stop(blocking\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_108df631","line":52,"updated":"2015-02-27 18:30:33.000000000","message":"Thank you!","commit_id":"7907d40075de7528122b0e900a5699b280a04901"}],"neutron/tests/unit/agent/linux/test_async_process.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"5900060388853db1073dcbfbc3866a03b5a02131","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        with testtools.ExpectedException(async_process.AsyncProcessException):"},{"line_number":219,"context_line":"            self.proc.stop()"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def test_strip_netns_with_namespace(self):"},{"line_number":222,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, \u0027tmp\u0027, \u0027ping\u0027, \u00278.8.8.8\u0027]"},{"line_number":223,"context_line":"        self.assertEqual([\u0027ping\u0027, \u00278.8.8.8\u0027], self.proc._strip_netns(cmd))"},{"line_number":224,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_57e824b4","line":221,"updated":"2015-02-23 15:23:28.000000000","message":"nit: should be test__strip_netns_with_namespace","commit_id":"04b04b7e32cd9933a264f58f8e9c2efc5dcd0ddf"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"5900060388853db1073dcbfbc3866a03b5a02131","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, \u0027tmp\u0027, \u0027ping\u0027, \u00278.8.8.8\u0027]"},{"line_number":223,"context_line":"        self.assertEqual([\u0027ping\u0027, \u00278.8.8.8\u0027], self.proc._strip_netns(cmd))"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def test_strip_netns_without_namespace(self):"},{"line_number":226,"context_line":"        cmd \u003d [\u0027ping\u0027, \u0027-c\u0027, \u00271\u0027, \u00278.8.8.8\u0027]"},{"line_number":227,"context_line":"        self.assertEqual(cmd, self.proc._strip_netns(cmd))"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_f7d678f0","line":225,"updated":"2015-02-23 15:23:28.000000000","message":"nit: should be test__strip_netns_without_namespace","commit_id":"04b04b7e32cd9933a264f58f8e9c2efc5dcd0ddf"}],"neutron/tests/unit/agent/linux/test_utils.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"543aa82bc4faa540a269365dc2b1ff1e49d13fc3","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                         utils.remove_abs_path([\u0027/usr/bin/ping\u0027, \u00278.8.8.8\u0027]))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def test_cmdlines_are_equal(self):"},{"line_number":198,"context_line":"        self.assertTrue(utils.cmdlines_are_equal("},{"line_number":199,"context_line":"            [\u0027ping\u0027, \u00278.8.8.8\u0027],"},{"line_number":200,"context_line":"            [\u0027/usr/bin/ping\u0027, \u00278.8.8.8\u0027]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_5ee16acf","line":198,"updated":"2015-02-27 01:03:23.000000000","message":"(No action required) If I were being pedantic, I\u0027d ask for a negative test.  But, I\u0027m not :)","commit_id":"46564e1bacefa32dfa097309a5d2af98b7ed19d4"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"782d158b85c44e6dceac9bd9199c5df24ac956c8","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                         utils.remove_abs_path([\u0027/usr/bin/ping\u0027, \u00278.8.8.8\u0027]))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def test_cmdlines_are_equal(self):"},{"line_number":198,"context_line":"        self.assertTrue(utils.cmdlines_are_equal("},{"line_number":199,"context_line":"            [\u0027ping\u0027, \u00278.8.8.8\u0027],"},{"line_number":200,"context_line":"            [\u0027/usr/bin/ping\u0027, \u00278.8.8.8\u0027]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_c0ce54b4","line":198,"in_reply_to":"ba7be1f8_5ee16acf","updated":"2015-02-27 03:55:06.000000000","message":"While you\u0027re clearly not pedantic, I added one. It even passes :)","commit_id":"46564e1bacefa32dfa097309a5d2af98b7ed19d4"}]}
