)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bbc5aec3846fee4df1b9158c1b9b1c806de4525d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"              sudo ip a :  11.531ms  13.538ms  19.685ms   1.525ms"},{"line_number":14,"context_line":"sudo rootwrap conf ip a :  92.253ms 119.431ms 211.236ms  17.948ms"},{"line_number":15,"context_line":"     daemon.run(\u0027ip a\u0027) :   6.718ms   9.914ms 189.873ms  18.201ms"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Iace26738f910a18a5d1d3479fad949027e5a3816"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAWH%2F%2BJdI%3D","line":16,"updated":"2014-03-28 20:32:16.000000000","message":"Please create a blueprint and link it.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"79003c1dd4cef6a2240c30998a7fd4f06c6d04b0","unresolved":false,"context_lines":[{"line_number":13,"context_line":"              sudo ip a :  11.531ms  13.538ms  19.685ms   1.525ms"},{"line_number":14,"context_line":"sudo rootwrap conf ip a :  92.253ms 119.431ms 211.236ms  17.948ms"},{"line_number":15,"context_line":"     daemon.run(\u0027ip a\u0027) :   6.718ms   9.914ms 189.873ms  18.201ms"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Iace26738f910a18a5d1d3479fad949027e5a3816"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAWH%2F%2BI1Q%3D","line":16,"in_reply_to":"AAAAWH%2F%2BJdI%3D","updated":"2014-03-28 21:43:20.000000000","message":"Will do.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"}],"benchmark/benchmark.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"457eddb45e30d2a4e80acef4dfdebba476c033f6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 Mirantis Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2FBe4%3D","line":1,"updated":"2014-03-20 21:08:29.000000000","message":"2013?","commit_id":"f916c9f3e65ead82b1cc20ad009abbff95408641"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"47f41d36a0cf60d1cf812bf0d79e380d9dda0c35","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 Mirantis Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B%2FjQ%3D","line":1,"in_reply_to":"AAAAWH%2F%2FBe4%3D","updated":"2014-03-21 04:58:17.000000000","message":"Copypasted it all around. Will fix.","commit_id":"f916c9f3e65ead82b1cc20ad009abbff95408641"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"b54ad29f7ac4474d082bf4731a3017eecb8017dc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 Mirantis Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B89s%3D","line":1,"in_reply_to":"AAAAWH%2F%2FBe4%3D","updated":"2014-03-21 12:39:21.000000000","message":"Done","commit_id":"f916c9f3e65ead82b1cc20ad009abbff95408641"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"457eddb45e30d2a4e80acef4dfdebba476c033f6","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        return \"{0:7.3f}us\".format(sec * 1000000.0)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def run_bench(cmd, runners):"},{"line_number":75,"context_line":"    strcmd \u003d \u0027 \u0027.join(cmd)"},{"line_number":76,"context_line":"    print(\"Running \u0027{0}\u0027:\".format(strcmd))"},{"line_number":77,"context_line":"    for name, runner in runners:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2FBbo%3D","line":74,"updated":"2014-03-20 21:08:29.000000000","message":"this should have a loop to get better average numbers\n\nalso this should report the variance of the result.","commit_id":"f916c9f3e65ead82b1cc20ad009abbff95408641"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"b54ad29f7ac4474d082bf4731a3017eecb8017dc","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        return \"{0:7.3f}us\".format(sec * 1000000.0)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def run_bench(cmd, runners):"},{"line_number":75,"context_line":"    strcmd \u003d \u0027 \u0027.join(cmd)"},{"line_number":76,"context_line":"    print(\"Running \u0027{0}\u0027:\".format(strcmd))"},{"line_number":77,"context_line":"    for name, runner in runners:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B89w%3D","line":74,"in_reply_to":"AAAAWH%2F%2FBbo%3D","updated":"2014-03-21 12:39:21.000000000","message":"Done","commit_id":"f916c9f3e65ead82b1cc20ad009abbff95408641"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"47f41d36a0cf60d1cf812bf0d79e380d9dda0c35","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        return \"{0:7.3f}us\".format(sec * 1000000.0)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def run_bench(cmd, runners):"},{"line_number":75,"context_line":"    strcmd \u003d \u0027 \u0027.join(cmd)"},{"line_number":76,"context_line":"    print(\"Running \u0027{0}\u0027:\".format(strcmd))"},{"line_number":77,"context_line":"    for name, runner in runners:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B%2Fiw%3D","line":74,"in_reply_to":"AAAAWH%2F%2FBbo%3D","updated":"2014-03-21 04:58:17.000000000","message":"It already runs timeit that runs the command num_iterations times. Why do we need another loop?","commit_id":"f916c9f3e65ead82b1cc20ad009abbff95408641"}],"benchmark/filters.d/ip.filters":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"60577c77a67297c09ad74baa624c92166ceaed43","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[Filters]"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"ip: IpFilter, ip, root"},{"line_number":4,"context_line":"ip_exec: IpNetnsExecFilter, ip, root"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAWH%2F%2FBbQ%3D","line":1,"updated":"2014-03-20 21:10:01.000000000","message":"the number of filters changes rootwraps performance\n\nso this isn\u0027t a very realistic file","commit_id":"f916c9f3e65ead82b1cc20ad009abbff95408641"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"47f41d36a0cf60d1cf812bf0d79e380d9dda0c35","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[Filters]"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"ip: IpFilter, ip, root"},{"line_number":4,"context_line":"ip_exec: IpNetnsExecFilter, ip, root"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAWH%2F%2B%2Fhg%3D","line":1,"in_reply_to":"AAAAWH%2F%2FBbQ%3D","updated":"2014-03-21 04:58:17.000000000","message":"Pulling in all Neutron filters changes results insignificantly. I don\u0027t think we need whole bunch of unrelated filters here.","commit_id":"f916c9f3e65ead82b1cc20ad009abbff95408641"}],"oslo/rootwrap/client.py":[{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"b4c750e1e476415c1ca58214c56fa77657594da5","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class Client(object):"},{"line_number":35,"context_line":"    def __init__(self, config_path, rootwrap_cmd\u003dNone):"},{"line_number":36,"context_line":"        if rootwrap_cmd is None:"},{"line_number":37,"context_line":"            rootwrap_cmd \u003d [\"sudo\", _which(\"rootwrap\")]"},{"line_number":38,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":39,"context_line":"        self._credentials \u003d None"},{"line_number":40,"context_line":"        self._manager \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2B9Zk%3D","line":37,"updated":"2014-03-21 11:37:47.000000000","message":"NB: Whatever _which comes up with will needs to match what your sudoers file has in store. Looks brittle, especially with the os.environ[\"PATH\"]  not being sanitized","commit_id":"870bee69e581f500420ce7ffba1dbf922b47f9c9"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ef235146008cdc64d5de3085ad1d0465501d7883","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class Client(object):"},{"line_number":35,"context_line":"    def __init__(self, config_path, rootwrap_cmd\u003dNone):"},{"line_number":36,"context_line":"        if rootwrap_cmd is None:"},{"line_number":37,"context_line":"            rootwrap_cmd \u003d [\"sudo\", _which(\"rootwrap\")]"},{"line_number":38,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":39,"context_line":"        self._credentials \u003d None"},{"line_number":40,"context_line":"        self._manager \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2B8%2BQ%3D","line":37,"in_reply_to":"AAAAWH%2F%2B9Zk%3D","updated":"2014-03-21 12:38:30.000000000","message":"Done","commit_id":"870bee69e581f500420ce7ffba1dbf922b47f9c9"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"1a889131d470694b84aac8334765963817fdf0b5","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class Client(object):"},{"line_number":35,"context_line":"    def __init__(self, config_path, rootwrap_cmd\u003dNone):"},{"line_number":36,"context_line":"        if rootwrap_cmd is None:"},{"line_number":37,"context_line":"            rootwrap_cmd \u003d [\"sudo\", _which(\"rootwrap\")]"},{"line_number":38,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":39,"context_line":"        self._credentials \u003d None"},{"line_number":40,"context_line":"        self._manager \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2B9FQ%3D","line":37,"in_reply_to":"AAAAWH%2F%2B9Zk%3D","updated":"2014-03-21 12:26:39.000000000","message":"This is temporary to ease testing. I\u0027ll revert changes to setup.cfg and remove this assumption.","commit_id":"870bee69e581f500420ce7ffba1dbf922b47f9c9"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"b4c750e1e476415c1ca58214c56fa77657594da5","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def __init__(self, config_path, rootwrap_cmd\u003dNone):"},{"line_number":36,"context_line":"        if rootwrap_cmd is None:"},{"line_number":37,"context_line":"            rootwrap_cmd \u003d [\"sudo\", _which(\"rootwrap\")]"},{"line_number":38,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":39,"context_line":"        self._credentials \u003d None"},{"line_number":40,"context_line":"        self._manager \u003d None"},{"line_number":41,"context_line":"        self._proxy \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2B9Y4%3D","line":38,"updated":"2014-03-21 11:37:47.000000000","message":"This would be rejected by the sudoers rule (which only accepts \"rootwrap CONFIG *\")","commit_id":"870bee69e581f500420ce7ffba1dbf922b47f9c9"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"893873ab95644c0f5d91d38ce2fecb750a0354be","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def __init__(self, config_path, rootwrap_cmd\u003dNone):"},{"line_number":36,"context_line":"        if rootwrap_cmd is None:"},{"line_number":37,"context_line":"            rootwrap_cmd \u003d [\"sudo\", _which(\"rootwrap\")]"},{"line_number":38,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":39,"context_line":"        self._credentials \u003d None"},{"line_number":40,"context_line":"        self._manager \u003d None"},{"line_number":41,"context_line":"        self._proxy \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2B8%2FM%3D","line":38,"in_reply_to":"AAAAWH%2F%2B9E8%3D","updated":"2014-03-21 12:41:38.000000000","message":"I think the two cases trigger very different functionality, so it would make sense to define two entry points in the consuming app: one neutron-rootwrap that points to cmd:main() and one neutron-rootwrap-daemon that points to, say, cmd.daemon(). That way we don\u0027t create weird parameters that need to be first to be accepted (not very unixy) and keep neutron-rootwrap command-line format untouched.","commit_id":"870bee69e581f500420ce7ffba1dbf922b47f9c9"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"1a889131d470694b84aac8334765963817fdf0b5","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def __init__(self, config_path, rootwrap_cmd\u003dNone):"},{"line_number":36,"context_line":"        if rootwrap_cmd is None:"},{"line_number":37,"context_line":"            rootwrap_cmd \u003d [\"sudo\", _which(\"rootwrap\")]"},{"line_number":38,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":39,"context_line":"        self._credentials \u003d None"},{"line_number":40,"context_line":"        self._manager \u003d None"},{"line_number":41,"context_line":"        self._proxy \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2B9E8%3D","line":38,"in_reply_to":"AAAAWH%2F%2B9Y4%3D","updated":"2014-03-21 12:26:39.000000000","message":"I\u0027m not sure which is better - to change sudoers adding another line or to have not very obvious special \"--daemon\" command.","commit_id":"870bee69e581f500420ce7ffba1dbf922b47f9c9"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"893873ab95644c0f5d91d38ce2fecb750a0354be","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Client(object):"},{"line_number":26,"context_line":"    def __init__(self, config_path, rootwrap_cmd):"},{"line_number":27,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":28,"context_line":"        self._credentials \u003d None"},{"line_number":29,"context_line":"        self._manager \u003d None"},{"line_number":30,"context_line":"        self._proxy \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B88c%3D","line":27,"updated":"2014-03-21 12:44:09.000000000","message":"(cont\u0027d from patchset 4)\n\nI think the two cases trigger very different functionality, so it would make sense to define two entry points in the consuming app: one neutron-rootwrap that points to cmd:main() and one neutron-rootwrap-daemon that points to, say, cmd.daemon(). That way we don\u0027t create weird parameters that need to be first to be accepted (not very unixy) and keep neutron-rootwrap command-line format untouched.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"126871b10268fc243ca6cfe72f4ad22f237b7163","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Client(object):"},{"line_number":26,"context_line":"    def __init__(self, config_path, rootwrap_cmd):"},{"line_number":27,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":28,"context_line":"        self._credentials \u003d None"},{"line_number":29,"context_line":"        self._manager \u003d None"},{"line_number":30,"context_line":"        self._proxy \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B5EQ%3D","line":27,"in_reply_to":"AAAAWH%2F%2B7VQ%3D","updated":"2014-03-21 22:43:49.000000000","message":"It seems that we had a \"race condition\" while writing comments here \u0027:D :-)","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"607f846b8ae377772b941083e90bda5a4ce5d217","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Client(object):"},{"line_number":26,"context_line":"    def __init__(self, config_path, rootwrap_cmd):"},{"line_number":27,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":28,"context_line":"        self._credentials \u003d None"},{"line_number":29,"context_line":"        self._manager \u003d None"},{"line_number":30,"context_line":"        self._proxy \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B8dI%3D","line":27,"in_reply_to":"AAAAWH%2F%2B82I%3D","updated":"2014-03-21 13:55:34.000000000","message":"Note that all the other projects consuming rootwrap (Nova, Cinder) deprecated use of root_helper. They only have \u0027rootwrap_config\u0027 (which prepends a hardcoded executable). In that case having \"only\" use_rootwrap_daemon\u003dTrue makes the most sense. In all cases, that config lives in the consuming project, not in rootwrap.\n\nI just think that from a rootwrap perspective, a separate executable makes the most sense. They trigger IMHO very different things.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"69c6f00516089c2f1f5fbf219227620be3f9a846","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Client(object):"},{"line_number":26,"context_line":"    def __init__(self, config_path, rootwrap_cmd):"},{"line_number":27,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":28,"context_line":"        self._credentials \u003d None"},{"line_number":29,"context_line":"        self._manager \u003d None"},{"line_number":30,"context_line":"        self._proxy \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B82I%3D","line":27,"in_reply_to":"AAAAWH%2F%2B88c%3D","updated":"2014-03-21 13:08:06.000000000","message":"Then we\u0027ll have to add something like this in the manual:\n\nIf you want to use rootwrap daemon mode, change in your config:\n\n    root_helper\u003dsudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf\n    use_rootwrap_daemon\u003dTrue\n\nvs.\n\nIf you want to use rootwrap daemon mode, let root_helper as is and add:\n\n    use_rootwrap_daemon\u003dTrue\n\nCurrent approach requires less changes to the configuration. I\u0027m not sure which I personally like better, but your unix-way argument tends to win in my heart.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4d7dc4fb671f562d132ab45c3916beb1007df887","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Client(object):"},{"line_number":26,"context_line":"    def __init__(self, config_path, rootwrap_cmd):"},{"line_number":27,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":28,"context_line":"        self._credentials \u003d None"},{"line_number":29,"context_line":"        self._manager \u003d None"},{"line_number":30,"context_line":"        self._proxy \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B7VQ%3D","line":27,"in_reply_to":"AAAAWH%2F%2B8dI%3D","updated":"2014-03-21 16:41:39.000000000","message":"I think use_rootwrap_daemon \u003d True could override the \"root_helper\" in neutron, which, in the end needs us to add the \u0027--daemon\u0027 flag in the command line.\n\nSo Thierry\u0027s proposal doesn\u0027t look bad.\n\nI\u0027d, maybe:\n\n1) Override the root_helper command line if the flag is set\n2) Add the rootwrap_config together with the use_rootwrap_daemon\n2) WARN in the logs, if root_helper had a non-default setting and we set any of the above flags.\n\n\nbut no strong opinion here.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"0d7ecfdcc1368d3f2b826398a04feb9d3ec1178c","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Client(object):"},{"line_number":26,"context_line":"    def __init__(self, config_path, rootwrap_cmd):"},{"line_number":27,"context_line":"        self._start_command \u003d rootwrap_cmd + [\"--daemon\", config_path]"},{"line_number":28,"context_line":"        self._credentials \u003d None"},{"line_number":29,"context_line":"        self._manager \u003d None"},{"line_number":30,"context_line":"        self._proxy \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B7QE%3D","line":27,"in_reply_to":"AAAAWH%2F%2B8dI%3D","updated":"2014-03-21 16:36:22.000000000","message":"Ok. Switched to a separate method in cmd.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4d7dc4fb671f562d132ab45c3916beb1007df887","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # TODO(yorik-sar): Collapse these methods into one?"},{"line_number":58,"context_line":"    def _get_credentials(self):"},{"line_number":59,"context_line":"        if not self._credentials:"},{"line_number":60,"context_line":"            self._spawn_server()"},{"line_number":61,"context_line":"        return self._credentials"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B7bo%3D","line":59,"updated":"2014-03-21 16:41:39.000000000","message":"Not sure if we need some kind of mutex around this to avoid a race condition like\n\n0) no credentials\n1) greenthread A asks for execute, get\u0027s credentials, spawns process, blocks on read\n2) greenthread B asks for execute, get\u0027s credentials, spawns process, blocks on read\n3) greenthread A is back, get\u0027s read \u0026 credentials, sets credentials, returns...\n4) greenthread B is back, get\u0027s read \u0026 credentials, sets credentials, returns....\n   at this point, point 3 credentials are lost, and the running rootwrap daemon will get no commands.\n\n\nI\u0027m unsure, do we have only one green thread processing RPC?, anyway it could be good to mutex, as we\u0027re creating a generic client for rootwrap daemons.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4d7dc4fb671f562d132ab45c3916beb1007df887","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        return self._proxy"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def execute(self, cmd, env\u003dNone):"},{"line_number":76,"context_line":"        return self._get_proxy().run_one_command(cmd, env)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B7aY%3D","line":76,"updated":"2014-03-21 16:41:39.000000000","message":"Shall we provide a pool of rootwrap-daemons?, \n(same thing with multiple/single green threads)\n\nI think that we would be adding a bottle neck if we have a single pipeline of executing commands.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bbc5aec3846fee4df1b9158c1b9b1c806de4525d","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Client(object):"},{"line_number":26,"context_line":"    def __init__(self, rootwrap_daemon_cmd):"},{"line_number":27,"context_line":"        self._start_command \u003d rootwrap_daemon_cmd"},{"line_number":28,"context_line":"        self._credentials \u003d None"},{"line_number":29,"context_line":"        self._manager \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BJe0%3D","line":26,"updated":"2014-03-28 20:32:16.000000000","message":"In the benchmark code, you pass in sys.executable for python.  The reason that I don\u0027t like that is because of the sudo configuration needed to run it that way under sudo.\n\nI think it would be better to define a console script for rootwrap-daemon (in setup.cfg) so that deployers can reference that script in sudo configuration.  (Update:  I see you did add a console script, I hadn\u0027t noticed that)\n\nThen, use an option patterned after neutron\u0027s root_helper option to specify the cmd.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"79003c1dd4cef6a2240c30998a7fd4f06c6d04b0","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Client(object):"},{"line_number":26,"context_line":"    def __init__(self, rootwrap_daemon_cmd):"},{"line_number":27,"context_line":"        self._start_command \u003d rootwrap_daemon_cmd"},{"line_number":28,"context_line":"        self._credentials \u003d None"},{"line_number":29,"context_line":"        self._manager \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BIz0%3D","line":26,"in_reply_to":"AAAAWH%2F%2BJe0%3D","updated":"2014-03-28 21:43:20.000000000","message":"I pass sys.executable only for benchmark since it will point to .tox/benchmark/bin/python or smth like that. Every project using rootwrap should provide its own binary (like Neutron, Nova and Cinder do) and pass its name here. oslo.rootwrap should not have any scripts, I\u0027ll remove what I added earlier to setup.cfg.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bbc5aec3846fee4df1b9158c1b9b1c806de4525d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        atexit.register(self._kill_server)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def _spawn_server(self):"},{"line_number":35,"context_line":"        obj \u003d subprocess.Popen(self._start_command,"},{"line_number":36,"context_line":"                               stdin\u003dsubprocess.PIPE,"},{"line_number":37,"context_line":"                               stdout\u003dsubprocess.PIPE,"},{"line_number":38,"context_line":"                               stderr\u003dsubprocess.PIPE)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BbgA%3D","line":35,"updated":"2014-03-28 20:32:16.000000000","message":"Could you name this something a little more descriptive for readability?","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"79003c1dd4cef6a2240c30998a7fd4f06c6d04b0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        atexit.register(self._kill_server)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def _spawn_server(self):"},{"line_number":35,"context_line":"        obj \u003d subprocess.Popen(self._start_command,"},{"line_number":36,"context_line":"                               stdin\u003dsubprocess.PIPE,"},{"line_number":37,"context_line":"                               stdout\u003dsubprocess.PIPE,"},{"line_number":38,"context_line":"                               stderr\u003dsubprocess.PIPE)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BIzg%3D","line":35,"in_reply_to":"AAAAWH%2F%2BbgA%3D","updated":"2014-03-28 21:43:20.000000000","message":"Just following oslo.rootwrap style. :)\n\nWill do.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bbc5aec3846fee4df1b9158c1b9b1c806de4525d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            managers.dispatch(c, None, \u0027shutdown\u0027)"},{"line_number":55,"context_line":"            self._manager \u003d None"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # TODO(yorik-sar): Collapse these methods into one?"},{"line_number":58,"context_line":"    def _get_credentials(self):"},{"line_number":59,"context_line":"        if not self._credentials:"},{"line_number":60,"context_line":"            self._spawn_server()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BJXQ%3D","line":57,"updated":"2014-03-28 20:32:16.000000000","message":"I could go either way but I think you\u0027re right, dividing this in to multiple methods adds little value given their nature.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"79003c1dd4cef6a2240c30998a7fd4f06c6d04b0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            managers.dispatch(c, None, \u0027shutdown\u0027)"},{"line_number":55,"context_line":"            self._manager \u003d None"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # TODO(yorik-sar): Collapse these methods into one?"},{"line_number":58,"context_line":"    def _get_credentials(self):"},{"line_number":59,"context_line":"        if not self._credentials:"},{"line_number":60,"context_line":"            self._spawn_server()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BIyg%3D","line":57,"in_reply_to":"AAAAWH%2F%2BJXQ%3D","updated":"2014-03-28 21:43:20.000000000","message":"I\u0027ll reorganize methods here to clearly separate two levels: processes and proxies. If proxy doesn\u0027t work, we should either start new proxy (e.g. if socket somehow died off) or run new process.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"93355f580ebf7b8ff70d6b6eea5f2ed2003b2d26","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def _get_credentials(self):"},{"line_number":59,"context_line":"        if not self._credentials:"},{"line_number":60,"context_line":"            self._spawn_server()"},{"line_number":61,"context_line":"        return self._credentials"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_manager(self):"},{"line_number":64,"context_line":"        if not self._manager:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B4%2FQ%3D","line":61,"updated":"2014-03-21 22:49:18.000000000","message":"Copying comments from patch set 6\nNot sure if we need some kind of mutex around this to avoid a race condition like\n0) no credentials\n1) greenthread A asks for execute, get\u0027s credentials, spawns process, blocks on read\n2) greenthread B asks for execute, get\u0027s credentials, spawns process, blocks on read\n3) greenthread A is back, get\u0027s read \u0026 credentials, sets credentials, returns...\n4) greenthread B is back, get\u0027s read \u0026 credentials, sets credentials, returns....\n   at this point, point 3 credentials are lost, and the running rootwrap daemon will get no commands.\nI\u0027m unsure, do we have only one green thread processing RPC?, anyway it could be good to mutex, as we\u0027re creating a generic client for rootwrap daemons.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bbc5aec3846fee4df1b9158c1b9b1c806de4525d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def _get_credentials(self):"},{"line_number":59,"context_line":"        if not self._credentials:"},{"line_number":60,"context_line":"            self._spawn_server()"},{"line_number":61,"context_line":"        return self._credentials"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_manager(self):"},{"line_number":64,"context_line":"        if not self._manager:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BJac%3D","line":61,"in_reply_to":"AAAAWH%2F%2B3kE%3D","updated":"2014-03-28 20:32:16.000000000","message":"Good catch, ajo.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"8d285cf5d27ae09d3e3df0a7e001ab32c5fd1ade","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def _get_credentials(self):"},{"line_number":59,"context_line":"        if not self._credentials:"},{"line_number":60,"context_line":"            self._spawn_server()"},{"line_number":61,"context_line":"        return self._credentials"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_manager(self):"},{"line_number":64,"context_line":"        if not self._manager:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B4CU%3D","line":61,"in_reply_to":"AAAAWH%2F%2B4%2FQ%3D","updated":"2014-03-22 05:57:46.000000000","message":"Yes, you\u0027re right, there is a race here. As I stated in the comment I\u0027m thinking about collapsing some of these methods. I\u0027ll add some mutex here then.\n\nbtw, I\u0027d think about usual threads, not the green ones. This module should not depend on greenlet.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"dbb8c2cd15f81a0a69d60e8dad2dc25bf7664fd9","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def _get_credentials(self):"},{"line_number":59,"context_line":"        if not self._credentials:"},{"line_number":60,"context_line":"            self._spawn_server()"},{"line_number":61,"context_line":"        return self._credentials"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_manager(self):"},{"line_number":64,"context_line":"        if not self._manager:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B3kE%3D","line":61,"in_reply_to":"AAAAWH%2F%2B4CU%3D","updated":"2014-03-27 13:39:08.000000000","message":"Yes, you\u0027re right, the usual threading interface is the right one as it covers greenlets (monkey patching) and normal threads.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"93355f580ebf7b8ff70d6b6eea5f2ed2003b2d26","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        return self._proxy"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def execute(self, cmd, env\u003dNone):"},{"line_number":76,"context_line":"        return self._get_proxy().run_one_command(cmd, env)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B4%2BM%3D","line":76,"updated":"2014-03-21 22:49:18.000000000","message":"Copying from patch set 6, \n\nShall we provide a pool of rootwrap-daemons?, (same thing with multiple/single green threads)\nI think that we would be adding a bottle neck if we have a single pipeline of executing commands.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"8d285cf5d27ae09d3e3df0a7e001ab32c5fd1ade","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        return self._proxy"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def execute(self, cmd, env\u003dNone):"},{"line_number":76,"context_line":"        return self._get_proxy().run_one_command(cmd, env)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B4Cc%3D","line":76,"in_reply_to":"AAAAWH%2F%2B4%2BM%3D","updated":"2014-03-22 05:57:46.000000000","message":"Pooling shouldn\u0027t be an issue. Under the hood proxy uses threadlocal connections, so we\u0027re good for both clean and eventlet-monkeypatched world.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bbc5aec3846fee4df1b9158c1b9b1c806de4525d","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        return self._proxy"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def execute(self, cmd, env\u003dNone):"},{"line_number":76,"context_line":"        return self._get_proxy().run_one_command(cmd, env)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BJa0%3D","line":76,"in_reply_to":"AAAAWH%2F%2B4Cc%3D","updated":"2014-03-28 20:32:16.000000000","message":"Agreed, pooling shouldn\u0027t be an issue.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"a37c1afa1c9b17b46584a69ee59f732555d10dc7","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                         self._process.pid)"},{"line_number":73,"context_line":"                address, authkey \u003d self._credentials"},{"line_number":74,"context_line":"                try:"},{"line_number":75,"context_line":"                    c \u003d self._manager._Client(address, authkey\u003dauthkey)"},{"line_number":76,"context_line":"                    try:"},{"line_number":77,"context_line":"                        managers.dispatch(c, None, \u0027shutdown\u0027)"},{"line_number":78,"context_line":"                    finally:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_00bbdf72","line":75,"updated":"2014-07-09 13:26:57.000000000","message":"Are we ok to use non-public internal details (_Client)?","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"2adcbf9fb3cf53b8f737934c494368b2c59335ee","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                         self._process.pid)"},{"line_number":73,"context_line":"                address, authkey \u003d self._credentials"},{"line_number":74,"context_line":"                try:"},{"line_number":75,"context_line":"                    c \u003d self._manager._Client(address, authkey\u003dauthkey)"},{"line_number":76,"context_line":"                    try:"},{"line_number":77,"context_line":"                        managers.dispatch(c, None, \u0027shutdown\u0027)"},{"line_number":78,"context_line":"                    finally:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_b97086dd","line":75,"in_reply_to":"baada198_00bbdf72","updated":"2014-07-10 11:35:48.000000000","message":"I\u0027ll remove this call in coming patchset with some rewrite.","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"8576826d74fe0e028a95beb42a81bfe37e7da915","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                         self._process.pid)"},{"line_number":73,"context_line":"                address, authkey \u003d self._credentials"},{"line_number":74,"context_line":"                try:"},{"line_number":75,"context_line":"                    c \u003d self._manager._Client(address, authkey\u003dauthkey)"},{"line_number":76,"context_line":"                    try:"},{"line_number":77,"context_line":"                        managers.dispatch(c, None, \u0027shutdown\u0027)"},{"line_number":78,"context_line":"                    finally:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_4bf022fd","line":75,"in_reply_to":"baada198_b97086dd","updated":"2014-07-13 07:10:01.000000000","message":"Done","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"a37c1afa1c9b17b46584a69ee59f732555d10dc7","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                # can\u0027t provide sane timeout on 2.x and we most likely don\u0027t"},{"line_number":84,"context_line":"                # have permisions to do so"},{"line_number":85,"context_line":"            # Invalidate manager\u0027s state so that proxy won\u0027t try to do decref"},{"line_number":86,"context_line":"            self._manager._state.value \u003d managers.State.SHUTDOWN"},{"line_number":87,"context_line":"            self._manager \u003d None"},{"line_number":88,"context_line":"            self._initialized \u003d False"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_a0623314","line":86,"updated":"2014-07-09 13:26:57.000000000","message":"Ditto","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"2adcbf9fb3cf53b8f737934c494368b2c59335ee","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                # can\u0027t provide sane timeout on 2.x and we most likely don\u0027t"},{"line_number":84,"context_line":"                # have permisions to do so"},{"line_number":85,"context_line":"            # Invalidate manager\u0027s state so that proxy won\u0027t try to do decref"},{"line_number":86,"context_line":"            self._manager._state.value \u003d managers.State.SHUTDOWN"},{"line_number":87,"context_line":"            self._manager \u003d None"},{"line_number":88,"context_line":"            self._initialized \u003d False"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_59312a0a","line":86,"in_reply_to":"baada198_a0623314","updated":"2014-07-10 11:35:48.000000000","message":"But not this one. Unfortunately there\u0027s no way to cleanly shutdown proxy with dead manager. This will be one of undocumented features of multiprocessing we\u0027ll have to use. Note that multiprocessing itself is insanely stable. Most of the code never changed since the day it got imported.","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _initialize(self):"},{"line_number":47,"context_line":"        if self._process is not None and self._process.poll() is not None:"},{"line_number":48,"context_line":"            LOG.warning(\"Leaving behind already spawned process with pid %d\","},{"line_number":49,"context_line":"                        self._process.pid)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        process_obj \u003d subprocess.Popen(self._start_command,"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_786012a4","line":48,"updated":"2014-08-06 16:40:16.000000000","message":"As on operator, I\u0027m not sure I\u0027d know what to do with this warning.  What action should be taken when reading this warning, kill it?  It might help to suggest an action or a better explanation why this warning is showing up.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _initialize(self):"},{"line_number":47,"context_line":"        if self._process is not None and self._process.poll() is not None:"},{"line_number":48,"context_line":"            LOG.warning(\"Leaving behind already spawned process with pid %d\","},{"line_number":49,"context_line":"                        self._process.pid)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        process_obj \u003d subprocess.Popen(self._start_command,"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_d959ba5d","line":48,"in_reply_to":"baada198_786012a4","updated":"2014-08-07 10:12:17.000000000","message":"Yes, it should be killed if it\u0027s still around. I\u0027ll add this to log message.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _initialize(self):"},{"line_number":47,"context_line":"        if self._process is not None and self._process.poll() is not None:"},{"line_number":48,"context_line":"            LOG.warning(\"Leaving behind already spawned process with pid %d\","},{"line_number":49,"context_line":"                        self._process.pid)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        process_obj \u003d subprocess.Popen(self._start_command,"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_63d2f0d0","line":48,"in_reply_to":"baada198_d959ba5d","updated":"2014-08-13 12:21:48.000000000","message":"Done","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # Invalidate manager\u0027s state so that proxy won\u0027t try to do decref"},{"line_number":91,"context_line":"        manager._state.value \u003d managers.State.SHUTDOWN"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _do_shutdown(self):"},{"line_number":94,"context_line":"        if self._initialized:"},{"line_number":95,"context_line":"            self._finalize()"},{"line_number":96,"context_line":"            self._manager \u003d None"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_a5eed788","line":93,"updated":"2014-08-06 16:40:16.000000000","message":"suggestion:  Maybe inline this to avoid extra indirection and to make it clear this is under _mutex.  It is only used in one place.  I see that it is called directly from the test code but I\u0027m not sure this is a compelling reason.  Test code could provide its own method or just call _finalize for the places where I see it called.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # Invalidate manager\u0027s state so that proxy won\u0027t try to do decref"},{"line_number":91,"context_line":"        manager._state.value \u003d managers.State.SHUTDOWN"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _do_shutdown(self):"},{"line_number":94,"context_line":"        if self._initialized:"},{"line_number":95,"context_line":"            self._finalize()"},{"line_number":96,"context_line":"            self._manager \u003d None"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_fc166cf2","line":93,"in_reply_to":"baada198_a5eed788","updated":"2014-08-07 10:12:17.000000000","message":"You\u0027re right. I guess it\u0027s around since before I switched to finalizers.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # Invalidate manager\u0027s state so that proxy won\u0027t try to do decref"},{"line_number":91,"context_line":"        manager._state.value \u003d managers.State.SHUTDOWN"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _do_shutdown(self):"},{"line_number":94,"context_line":"        if self._initialized:"},{"line_number":95,"context_line":"            self._finalize()"},{"line_number":96,"context_line":"            self._manager \u003d None"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_c3449c78","line":93,"in_reply_to":"baada198_fc166cf2","updated":"2014-08-13 12:21:48.000000000","message":"Done","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            res \u003d proxy.run_one_command(cmd, env, stdin)"},{"line_number":119,"context_line":"        except (EOFError, IOError):"},{"line_number":120,"context_line":"            retry \u003d True"},{"line_number":121,"context_line":"        # res can be None if we received final None sent by dying server thread"},{"line_number":122,"context_line":"        # instead of response to our request. Process is most likely to be dead"},{"line_number":123,"context_line":"        # at this point."},{"line_number":124,"context_line":"        if retry or res is None:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_c0557953","line":121,"updated":"2014-08-06 16:40:16.000000000","message":"The return value of \"run_one_command\" is a 3-tuple in all cases, right?  (daemon.py:L60).  Is this saying that a dying thread could cause that code to return None when the code isn\u0027t written in a way to allow that?  That is unexpected.\n\nThe local variables \"res\", and \"retry\" could be avoided and this method could just return on L118 if this weren\u0027t the case.  The except clause would simply be self._restart(...) and a second \"return proxy.run_one_command(...)\"","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            res \u003d proxy.run_one_command(cmd, env, stdin)"},{"line_number":119,"context_line":"        except (EOFError, IOError):"},{"line_number":120,"context_line":"            retry \u003d True"},{"line_number":121,"context_line":"        # res can be None if we received final None sent by dying server thread"},{"line_number":122,"context_line":"        # instead of response to our request. Process is most likely to be dead"},{"line_number":123,"context_line":"        # at this point."},{"line_number":124,"context_line":"        if retry or res is None:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_dcd8c882","line":121,"in_reply_to":"baada198_c0557953","updated":"2014-08-07 10:12:17.000000000","message":"It\u0027s a bug (or missing feature) in multiprocessing. Basically it does smth like this:\n\n    def accept_loop(self):\n        while True:\n            s, _ \u003d sock.accept()\n            spawn_thread(handle_client, s)\n\n    def handle_client(self, sock):\n        cmd, args \u003d sock.recv()\n        res \u003d getattr(self, cmd)(*args)\n        sock.send(res)\n\n    def client_loop(self):\n        sock.send(None)\n        while True:\n            \u003c...\u003e # handle all requests in this socket separately\n\nAnd so when you manage to send another call through you proxy that\u0027s supposed to land in client_loop, but client_loop is dying, you immediately receive None from handle_client and server thread dies.\n\nIt\u0027s a very rare case but it appears rather regularly (1 test run out of 20 failed for me).","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # at this point."},{"line_number":124,"context_line":"        if retry or res is None:"},{"line_number":125,"context_line":"            self._restart(proxy)"},{"line_number":126,"context_line":"            res \u003d self._proxy.run_one_command(cmd, env, stdin)"},{"line_number":127,"context_line":"        return res"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_850d5395","line":126,"updated":"2014-08-06 16:40:16.000000000","message":"nit:  Inconsistent use of self._proxy and local proxy.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # at this point."},{"line_number":124,"context_line":"        if retry or res is None:"},{"line_number":125,"context_line":"            self._restart(proxy)"},{"line_number":126,"context_line":"            res \u003d self._proxy.run_one_command(cmd, env, stdin)"},{"line_number":127,"context_line":"        return res"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_6355901e","line":126,"in_reply_to":"baada198_3cde246b","updated":"2014-08-13 12:21:48.000000000","message":"Done","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"032e93f8bb1c839b1885132e312061279336490e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # at this point."},{"line_number":124,"context_line":"        if retry or res is None:"},{"line_number":125,"context_line":"            self._restart(proxy)"},{"line_number":126,"context_line":"            res \u003d self._proxy.run_one_command(cmd, env, stdin)"},{"line_number":127,"context_line":"        return res"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_15b67589","line":126,"in_reply_to":"baada198_3cde246b","updated":"2014-08-08 04:18:31.000000000","message":"Right, I see that now.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # at this point."},{"line_number":124,"context_line":"        if retry or res is None:"},{"line_number":125,"context_line":"            self._restart(proxy)"},{"line_number":126,"context_line":"            res \u003d self._proxy.run_one_command(cmd, env, stdin)"},{"line_number":127,"context_line":"        return res"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_3cde246b","line":126,"in_reply_to":"baada198_850d5395","updated":"2014-08-07 10:12:17.000000000","message":"It\u0027s very intentional. We\u0027ll get new self._proxy after self._restart. I\u0027ll add a comment on this. I probably should return self._proxy from _restart to make it very clear though...","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"}],"oslo/rootwrap/cmd.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4d7dc4fb671f562d132ab45c3916beb1007df887","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        run_daemon \u003d True"},{"line_number":65,"context_line":"        sys.argv.pop(0)"},{"line_number":66,"context_line":"    else:"},{"line_number":67,"context_line":"        run_daemon \u003d False"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    configfile \u003d sys.argv.pop(0)"},{"line_number":70,"context_line":"    userargs \u003d sys.argv[:]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B7UQ%3D","line":67,"updated":"2014-03-21 16:41:39.000000000","message":"+1 for the  neutron-rootwrap-daemon  reading here, because processing settings this way, it\u0027d stop working if people use settings out of order, or we add more settings.\n\nAnd, I\u0027d avoid any config parser as much as possible to avoid any inherited security vulnerability or extra load times in the classical rootwrap mode.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"585bf250198a1bd76e5edc1d098135aa15994957","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        run_daemon \u003d True"},{"line_number":65,"context_line":"        sys.argv.pop(0)"},{"line_number":66,"context_line":"    else:"},{"line_number":67,"context_line":"        run_daemon \u003d False"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    configfile \u003d sys.argv.pop(0)"},{"line_number":70,"context_line":"    userargs \u003d sys.argv[:]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B6rg%3D","line":67,"in_reply_to":"AAAAWH%2F%2B7UQ%3D","updated":"2014-03-21 17:53:28.000000000","message":"Done","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"63a050189451a6dd2cc0f62e3def48ec2a3346f0","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def daemon():"},{"line_number":58,"context_line":"    return main(True)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def main(run_daemon\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_85dec5d8","line":58,"updated":"2014-07-18 13:04:31.000000000","message":"minor nit: should be return main(run_daemon\u003dTrue)\n(only change if you do another patchset for some reason)","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c70e5278b5df6c02a9bee63f8dccb30f4985f803","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def daemon():"},{"line_number":58,"context_line":"    return main(True)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def main(run_daemon\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_6389a2c9","line":58,"in_reply_to":"baada198_3ae98fb7","updated":"2014-07-18 18:29:13.000000000","message":"Done","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c6cf0b01934cfb3e9fad6ec4ce8f858dd2abf404","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def daemon():"},{"line_number":58,"context_line":"    return main(True)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def main(run_daemon\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_3ae98fb7","line":58,"in_reply_to":"baada198_85dec5d8","updated":"2014-07-18 15:18:16.000000000","message":"Good point.","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"129b396490920f0d5f19aba2b243ea61478080e4","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                        log\u003dFalse)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    configfile \u003d sys.argv.pop(0)"},{"line_number":72,"context_line":"    userargs \u003d sys.argv[:]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    # Load configuration"},{"line_number":75,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_9298701c","line":72,"updated":"2014-07-28 15:33:54.000000000","message":"nit: how about moving list copying to where it\u0027s used (if run_daemon\u003dFalse only at line 98)?","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"8d02282c640bf3ba1cd86bcff13caba01b2645ca","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                        log\u003dFalse)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    configfile \u003d sys.argv.pop(0)"},{"line_number":72,"context_line":"    userargs \u003d sys.argv[:]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    # Load configuration"},{"line_number":75,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_a2d99b57","line":72,"in_reply_to":"baada198_9298701c","updated":"2014-07-28 16:55:32.000000000","message":"I don\u0027t think we need it at all here. I\u0027ll look into it.","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"74e106bdf454aead75d46cdb20175a72890ac57e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                        log\u003dFalse)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    configfile \u003d sys.argv.pop(0)"},{"line_number":72,"context_line":"    userargs \u003d sys.argv[:]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    # Load configuration"},{"line_number":75,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_d19898ce","line":72,"in_reply_to":"baada198_a2d99b57","updated":"2014-07-31 13:50:48.000000000","message":"Done","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"129b396490920f0d5f19aba2b243ea61478080e4","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    filters \u003d wrapper.load_filters(config.filters_path)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    if run_daemon:"},{"line_number":94,"context_line":"        from oslo.rootwrap import daemon"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        daemon.daemon_start(config, filters)"},{"line_number":97,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_b27f34de","line":94,"updated":"2014-07-28 15:33:54.000000000","message":"any specific reason for local import? if not, please move to the top.","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"74e106bdf454aead75d46cdb20175a72890ac57e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    filters \u003d wrapper.load_filters(config.filters_path)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    if run_daemon:"},{"line_number":94,"context_line":"        from oslo.rootwrap import daemon"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        daemon.daemon_start(config, filters)"},{"line_number":97,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f19bdcc5","line":94,"in_reply_to":"baada198_22ed8bf0","updated":"2014-07-31 13:50:48.000000000","message":"Done","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"8d02282c640bf3ba1cd86bcff13caba01b2645ca","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    filters \u003d wrapper.load_filters(config.filters_path)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    if run_daemon:"},{"line_number":94,"context_line":"        from oslo.rootwrap import daemon"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        daemon.daemon_start(config, filters)"},{"line_number":97,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_22ed8bf0","line":94,"in_reply_to":"baada198_b27f34de","updated":"2014-07-28 16:55:32.000000000","message":"I guess it was the same reason as for wrapper. Will do.","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        _exit_error(execname, \"No command specified\", RC_NOCOMMAND, log\u003dFalse)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    configfile \u003d sys.argv.pop(0)"},{"line_number":62,"context_line":"    userargs \u003d sys.argv[:]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    # Load configuration"},{"line_number":65,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_98cc0636","side":"PARENT","line":62,"updated":"2014-08-06 16:40:16.000000000","message":"This change seems to be out of the scope of this work.","commit_id":"e6c39e8370148e0350a8f3cdc3367a7766ef7fa3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"523f3b3e8f069eccbcb7560536398a069512c078","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        _exit_error(execname, \"No command specified\", RC_NOCOMMAND, log\u003dFalse)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    configfile \u003d sys.argv.pop(0)"},{"line_number":62,"context_line":"    userargs \u003d sys.argv[:]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    # Load configuration"},{"line_number":65,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":28,"id":"7ac7a964_86a3644e","side":"PARENT","line":62,"in_reply_to":"baada198_3cbf04cc","updated":"2014-08-15 16:26:53.000000000","message":"Since using this value is now conditional on run_daemon then it does have some relevance to this patch.  Disregard my comment.","commit_id":"e6c39e8370148e0350a8f3cdc3367a7766ef7fa3"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        _exit_error(execname, \"No command specified\", RC_NOCOMMAND, log\u003dFalse)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    configfile \u003d sys.argv.pop(0)"},{"line_number":62,"context_line":"    userargs \u003d sys.argv[:]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    # Load configuration"},{"line_number":65,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_3cbf04cc","side":"PARENT","line":62,"in_reply_to":"baada198_98cc0636","updated":"2014-08-07 10:12:17.000000000","message":"See comment from Ihar in patchset #25. It\u0027s not very relevant to this commit, but it\u0027s not a big deal though, itsn\u0027t it?","commit_id":"e6c39e8370148e0350a8f3cdc3367a7766ef7fa3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                             config.syslog_log_level)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    filters \u003d wrapper.load_filters(config.filters_path)"},{"line_number":82,"context_line":"    run_one_command(execname, config, filters, userargs)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def run_one_command(execname, config, filters, userargs):"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_05aa23d3","side":"PARENT","line":82,"updated":"2014-08-06 16:40:16.000000000","message":"part of out-of-scope change.","commit_id":"e6c39e8370148e0350a8f3cdc3367a7766ef7fa3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    return main(run_daemon\u003dTrue)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def main(run_daemon\u003dFalse):"},{"line_number":61,"context_line":"    # Split arguments, require at least a command"},{"line_number":62,"context_line":"    execname \u003d sys.argv.pop(0)"},{"line_number":63,"context_line":"    if run_daemon:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_85e47343","line":60,"updated":"2014-08-06 16:40:16.000000000","message":"Suggestion:  Refactor this so that the main method is not overloaded by passing run_daemon to it?  You could factor out the code in the middle in to a new common method and make daemon and main separate.  (load configuration, use_syslog, and load_filters.)","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    return main(run_daemon\u003dTrue)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def main(run_daemon\u003dFalse):"},{"line_number":61,"context_line":"    # Split arguments, require at least a command"},{"line_number":62,"context_line":"    execname \u003d sys.argv.pop(0)"},{"line_number":63,"context_line":"    if run_daemon:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_fcc02c2e","line":60,"in_reply_to":"baada198_85e47343","updated":"2014-08-07 10:12:17.000000000","message":"I don\u0027t have a strong preference here. I just wanted to keep plain rootwrap codepath as close to what it were before this change as possible. I guess I\u0027ll have to extend previous change request.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"}],"oslo/rootwrap/daemon.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4d7dc4fb671f562d132ab45c3916beb1007df887","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    # allow everybody to find the socket"},{"line_number":68,"context_line":"    os.chmod(temp_dir, (stat.S_IRWXU |"},{"line_number":69,"context_line":"                        stat.S_IRGRP | stat.S_IWGRP |"},{"line_number":70,"context_line":"                        stat.S_IROTH | stat.S_IXOTH))"},{"line_number":71,"context_line":"    address \u003d os.path.join(temp_dir, \"rootwrap.sock\")"},{"line_number":72,"context_line":"    manager_cls \u003d get_manager(config, filters)"},{"line_number":73,"context_line":"    manager \u003d manager_cls(address\u003daddress)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B7YQ%3D","line":70,"updated":"2014-03-21 16:41:39.000000000","message":"I believe it could be good to chown to some user, and set others rwx to 0, in the case\n of a vulnerability found (for example, a method to guess the authkey), you\u0027d also \nneed to gain neutron/nova/* user execution before exploiting the vulnerability.\n\nfor example --agent-user neutron --agent-group neutron","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"126871b10268fc243ca6cfe72f4ad22f237b7163","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    # allow everybody to find the socket"},{"line_number":68,"context_line":"    os.chmod(temp_dir, (stat.S_IRWXU |"},{"line_number":69,"context_line":"                        stat.S_IRGRP | stat.S_IWGRP |"},{"line_number":70,"context_line":"                        stat.S_IROTH | stat.S_IXOTH))"},{"line_number":71,"context_line":"    address \u003d os.path.join(temp_dir, \"rootwrap.sock\")"},{"line_number":72,"context_line":"    manager_cls \u003d get_manager(config, filters)"},{"line_number":73,"context_line":"    manager \u003d manager_cls(address\u003daddress)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B5Bs%3D","line":70,"in_reply_to":"AAAAWH%2F%2B6qk%3D","updated":"2014-03-21 22:43:49.000000000","message":"Yes, probably the authkey is enough, but the extra permission settings are very cheap to implement. I\u0027ll be glad to help/experiment there at a later patch (paranoid hat on...), you\u0027re right there are more important things at this moment. :-)\n\nCan you take a look on the client.py / lines 59 to the end?","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"585bf250198a1bd76e5edc1d098135aa15994957","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    # allow everybody to find the socket"},{"line_number":68,"context_line":"    os.chmod(temp_dir, (stat.S_IRWXU |"},{"line_number":69,"context_line":"                        stat.S_IRGRP | stat.S_IWGRP |"},{"line_number":70,"context_line":"                        stat.S_IROTH | stat.S_IXOTH))"},{"line_number":71,"context_line":"    address \u003d os.path.join(temp_dir, \"rootwrap.sock\")"},{"line_number":72,"context_line":"    manager_cls \u003d get_manager(config, filters)"},{"line_number":73,"context_line":"    manager \u003d manager_cls(address\u003daddress)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B6qk%3D","line":70,"in_reply_to":"AAAAWH%2F%2B7YQ%3D","updated":"2014-03-21 17:53:28.000000000","message":"We can add such feature later. I don\u0027t think it\u0027ll give much security benefit because we\u0027re protected by authkey that exists only in the calling process\u0027 memory.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4d7dc4fb671f562d132ab45c3916beb1007df887","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    manager \u003d manager_cls(address\u003daddress)"},{"line_number":74,"context_line":"    server \u003d manager.get_server()"},{"line_number":75,"context_line":"    # allow everybody to connect to the socket"},{"line_number":76,"context_line":"    os.chmod(address, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)"},{"line_number":77,"context_line":"    print(address)"},{"line_number":78,"context_line":"    print(server.authkey, end\u003d\u0027\u0027)"},{"line_number":79,"context_line":"    sys.stdin.close()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B7YM%3D","line":76,"updated":"2014-03-21 16:41:39.000000000","message":"Same here.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4d7dc4fb671f562d132ab45c3916beb1007df887","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    # allow everybody to connect to the socket"},{"line_number":76,"context_line":"    os.chmod(address, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)"},{"line_number":77,"context_line":"    print(address)"},{"line_number":78,"context_line":"    print(server.authkey, end\u003d\u0027\u0027)"},{"line_number":79,"context_line":"    sys.stdin.close()"},{"line_number":80,"context_line":"    sys.stdout.close()"},{"line_number":81,"context_line":"    sys.stderr.close()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B7X0%3D","line":78,"updated":"2014-03-21 16:41:39.000000000","message":"Any idea on how\u0027s the authkey generated?","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"126871b10268fc243ca6cfe72f4ad22f237b7163","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    # allow everybody to connect to the socket"},{"line_number":76,"context_line":"    os.chmod(address, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)"},{"line_number":77,"context_line":"    print(address)"},{"line_number":78,"context_line":"    print(server.authkey, end\u003d\u0027\u0027)"},{"line_number":79,"context_line":"    sys.stdin.close()"},{"line_number":80,"context_line":"    sys.stdout.close()"},{"line_number":81,"context_line":"    sys.stderr.close()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B5BE%3D","line":78,"in_reply_to":"AAAAWH%2F%2B6qA%3D","updated":"2014-03-21 22:43:49.000000000","message":"linux /dev/urandom, It should be good enough.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"585bf250198a1bd76e5edc1d098135aa15994957","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    # allow everybody to connect to the socket"},{"line_number":76,"context_line":"    os.chmod(address, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)"},{"line_number":77,"context_line":"    print(address)"},{"line_number":78,"context_line":"    print(server.authkey, end\u003d\u0027\u0027)"},{"line_number":79,"context_line":"    sys.stdin.close()"},{"line_number":80,"context_line":"    sys.stdout.close()"},{"line_number":81,"context_line":"    sys.stderr.close()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B6qA%3D","line":78,"in_reply_to":"AAAAWH%2F%2B7X0%3D","updated":"2014-03-21 17:53:28.000000000","message":"http://hg.python.org/cpython/file/2.7/Lib/multiprocessing/process.py#l309\n\n    os.urandom(32)","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"b0cc53d9d5636084b2df39fcd21b89b6843d882b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BWZo%3D","line":54,"updated":"2014-03-27 13:19:44.000000000","message":"AFAICT BaseManager doesn\u0027t support the \u0027serializer\u0027 parameter, so this will be ignored. Since BaseManager uses pickle, this lets the calling user execute any code as root.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"03c1708b61a5579c9cacf42fac22583bd4d4b9c3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F95hg%3D","line":54,"in_reply_to":"AAAAWH%2F%2BIxo%3D","updated":"2014-04-01 11:22:12.000000000","message":"It\u0027s a good start. :)","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"79003c1dd4cef6a2240c30998a7fd4f06c6d04b0","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BIxo%3D","line":54,"in_reply_to":"AAAAWH%2F%2BJNE%3D","updated":"2014-03-28 21:43:20.000000000","message":"I\u0027ve created an issue there: http://bugs.python.org/issue21078\n\nI think it doesn\u0027t need any pushing right now. Let the community take its time.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bbc5aec3846fee4df1b9158c1b9b1c806de4525d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BJNE%3D","line":54,"in_reply_to":"AAAAWH%2F%2BUuA%3D","updated":"2014-03-28 20:32:16.000000000","message":"If the python community will commit to this option then that will be enough for me.  Do you want me to help out at all with engaging them?  Not that I have any credibility there...","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"a23c210029776f77672a9956dab0e1ec37991bbb","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BUuA%3D","line":54,"in_reply_to":"AAAAWH%2F%2BUv8%3D","updated":"2014-03-27 16:14:30.000000000","message":"Oh, Miguel got here first :)\n\nI\u0027ve checked it one more time. The parameter has been there since the very first checkin of multiprocessing package in 2008.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"881b6ff4decc15c48ec982b34b602958b2ed4ed7","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F98UE%3D","line":54,"in_reply_to":"AAAAWH%2F%2BWL8%3D","updated":"2014-04-01 03:36:05.000000000","message":"Assuming I read the code correctly...,\n\nunpickling doesn\u0027t happen at the initial challenge-responce stages, so root-code-execution won\u0027t happen unless authkey is stolen.\nThe bad thing is that the multiprocessing module allows any python function to be called at the server (as root, in this case), which nullifies any protection rootwrap.py provides if authkey is stolen or neutron server process is overridden.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6bdc5aa832c2c9af55737493b954b819fd1f5530","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BU98%3D","line":54,"in_reply_to":"AAAAWH%2F%2BWL8%3D","updated":"2014-03-27 15:52:01.000000000","message":"It seems the feature exists, but it\u0027s undocumented.\n\nIt does exist for py26, py27, and py3x.\n\nYuriy is asking in the python@ mail lists to get a response about this feature and future plans.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"9d2485b370f936d866e945777e071986ec51bedc","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BUv8%3D","line":54,"in_reply_to":"AAAAWH%2F%2BWZo%3D","updated":"2014-03-27 16:11:21.000000000","message":"It\u0027s an undocumented argument I found in the code. It\u0027s very stable since it have been there in 2.6 and is still there in tip: http://hg.python.org/cpython/file/tip/Lib/multiprocessing/managers.py#l442\n\nI\u0027ll work with Python community to try to add it to documentation to ensure it won\u0027t go away in foreseeable future.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"dbb8c2cd15f81a0a69d60e8dad2dc25bf7664fd9","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BWL8%3D","line":54,"in_reply_to":"AAAAWH%2F%2BWZo%3D","updated":"2014-03-27 13:39:08.000000000","message":"Thierry is right:\n\nhttp://docs.python.org/2/library/multiprocessing.html\n\nWarning The Connection.recv() method automatically unpickles the data it receives, which can be a security risk unless you can trust the process which sent the message.\nTherefore, unless the connection object was produced using Pipe() you should only use the recv() and send() methods after performing some sort of authentication. See Authentication keys.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":9200,"name":"IWAMOTO Toshihiro","email":"iwamoto@valinux.co.jp","username":"toshii"},"change_message_id":"fe87e1e901c5c55da534495e8d67a982bb2528f7","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F97NU%3D","line":54,"in_reply_to":"AAAAWH%2F975M%3D","updated":"2014-04-01 06:44:31.000000000","message":"I overlooked checks against registry.  There\u0027s no apparent security hole. Sorry.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"7198777662d2e2c8862d5dbbce22fcab31eb9a61","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":52,"context_line":"            # Force xmlrpclib because pickle is not secure"},{"line_number":53,"context_line":"            super(RootwrapManager, self).__init__(address, authkey,"},{"line_number":54,"context_line":"                                                  serializer\u003d\u0027xmlrpclib\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if config is not None:"},{"line_number":57,"context_line":"        partial_class \u003d functools.partial(RootwrapClass, config, filters)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F975M%3D","line":54,"in_reply_to":"AAAAWH%2F98UE%3D","updated":"2014-04-01 05:05:01.000000000","message":"Can you please provide some example of how is that possible or link to some research? It sounds strange.\n\nYou can run any code if we\u0027d use pickle module because it\u0027s unsafe to unpickle arbitrary data. But since we don\u0027t use pickle here and BaseManager allow calls only to registered classes and their methods, how can client call any function in daemon?","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":6593,"name":"Dirk Mueller","email":"dirk@dmllr.de","username":"dmllr"},"change_message_id":"2feddabcca084ca649308ea2df35921b4e24dd7c","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    print(server.authkey, end\u003d\u0027\u0027)"},{"line_number":154,"context_line":"    sys.stdin.close()"},{"line_number":155,"context_line":"    sys.stdout.close()"},{"line_number":156,"context_line":"    sys.stderr.close()"},{"line_number":157,"context_line":"    server.serve_forever()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5adbc538_c72cb64d","line":156,"updated":"2014-05-26 20:16:45.000000000","message":"Any particular reason for closing stderr? this makes debugging rather hard. \n\nAlso no other file descriptors that might be inherited are being closed here. Perhaps we should do the proper daemonizing here and closing all passed-in filedescriptors. \n\nAlso a chdir(\u0027/\u0027) seems to be missing here..","commit_id":"2d3785f13a7726596862e45aed1bd51e19fcdfe4"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"a803fc31d621ae337740fa97359d91e9b83ddc7d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    print(server.authkey, end\u003d\u0027\u0027)"},{"line_number":154,"context_line":"    sys.stdin.close()"},{"line_number":155,"context_line":"    sys.stdout.close()"},{"line_number":156,"context_line":"    sys.stderr.close()"},{"line_number":157,"context_line":"    server.serve_forever()"}],"source_content_type":"text/x-python","patch_set":11,"id":"3ae8d1ca_639a1116","line":156,"in_reply_to":"5adbc538_c72cb64d","updated":"2014-05-27 08:00:28.000000000","message":"\u003e Any particular reason for closing stderr? this makes debugging rather hard.\n\nLogging through stderr would be hard since it will be routed to the pipe in client and we can hang if we write too much there. syslog can be used for logging. And if you need interactive debugger you\u0027ll have to attach it from another terminal.\n\n\u003e Also no other file descriptors that might be inherited are being closed here. Perhaps we should do the proper daemonizing here and closing all passed-in filedescriptors.\n\nAll fds are closed when child process is being started (see line 116) so any extra fds that might be passed from the caller won\u0027t get to the commands that are to be run.\n\nWhen rootwrap is run under sudo (as it is intended), sudo itself closes all descriptors but stdin, stdout and stderr.\n\n\u003e Also a chdir(\u0027/\u0027) seems to be missing here..\n\nIn normal mode rootwrap runs in the current directory of the caller. I don\u0027t see any reason to change this in daemon mode.","commit_id":"2d3785f13a7726596862e45aed1bd51e19fcdfe4"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3b9028525d9db3ace2d42ad1b2e1b2c0ebf80527","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import base64"},{"line_number":19,"context_line":"import fcntl"},{"line_number":20,"context_line":"import functools"},{"line_number":21,"context_line":"import json"},{"line_number":22,"context_line":"from multiprocessing import connection"},{"line_number":23,"context_line":"from multiprocessing import managers"},{"line_number":24,"context_line":"from multiprocessing import util as mp_util"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_41306901","line":21,"updated":"2014-06-02 09:09:00.000000000","message":"Take a look here about json\nhttps://review.openstack.org/#/c/97039/1\n\nDo you think it\u0027s possible to use oslo jsonutils from within here? not sure if that part is available as an standalone library...","commit_id":"9f48a4de48c29fa3d189dd97785e427cbd24bdb0"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"879e90d86adc01661d719515a01699a9452456d5","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import base64"},{"line_number":19,"context_line":"import fcntl"},{"line_number":20,"context_line":"import functools"},{"line_number":21,"context_line":"import json"},{"line_number":22,"context_line":"from multiprocessing import connection"},{"line_number":23,"context_line":"from multiprocessing import managers"},{"line_number":24,"context_line":"from multiprocessing import util as mp_util"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_6856982b","line":21,"in_reply_to":"1ae5cdf2_3a2a9b7e","updated":"2014-06-13 13:25:57.000000000","message":"Yeah, i would rather use only Python stdlib if possible. That code runs as root :)","commit_id":"9f48a4de48c29fa3d189dd97785e427cbd24bdb0"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"417c6ab55c781d7554fd9cf90e975988751b176e","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import base64"},{"line_number":19,"context_line":"import fcntl"},{"line_number":20,"context_line":"import functools"},{"line_number":21,"context_line":"import json"},{"line_number":22,"context_line":"from multiprocessing import connection"},{"line_number":23,"context_line":"from multiprocessing import managers"},{"line_number":24,"context_line":"from multiprocessing import util as mp_util"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_3a2a9b7e","line":21,"in_reply_to":"1ae5cdf2_41306901","updated":"2014-06-02 12:19:00.000000000","message":"I honestly don\u0027t quite get the issue that takes place if one mixes simplejson with builtin json. I don\u0027t like the idea of bringing oslo.jsonutils here just because of that conflict. I guess I can default to simplejson here then.","commit_id":"9f48a4de48c29fa3d189dd97785e427cbd24bdb0"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7d11da372f217b758b1b3e5abbe15da0d3ab3900","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import base64"},{"line_number":19,"context_line":"import fcntl"},{"line_number":20,"context_line":"import functools"},{"line_number":21,"context_line":"import json"},{"line_number":22,"context_line":"from multiprocessing import connection"},{"line_number":23,"context_line":"from multiprocessing import managers"},{"line_number":24,"context_line":"from multiprocessing import util as mp_util"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_b870c0dd","line":21,"in_reply_to":"1ae5cdf2_6856982b","updated":"2014-06-16 08:29:24.000000000","message":"Your concerns sound reasonable to me :)","commit_id":"9f48a4de48c29fa3d189dd97785e427cbd24bdb0"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"a37c1afa1c9b17b46584a69ee59f732555d10dc7","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.filters \u003d filters"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def run_one_command(self, userargs, env\u003dNone, stdin\u003dNone):"},{"line_number":144,"context_line":"        if env is None:"},{"line_number":145,"context_line":"            env \u003d {}"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        obj \u003d wrapper.start_subprocess("}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_06ff7802","line":144,"updated":"2014-07-09 13:26:57.000000000","message":"do we need/use env anywhere?","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"2adcbf9fb3cf53b8f737934c494368b2c59335ee","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.filters \u003d filters"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def run_one_command(self, userargs, env\u003dNone, stdin\u003dNone):"},{"line_number":144,"context_line":"        if env is None:"},{"line_number":145,"context_line":"            env \u003d {}"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        obj \u003d wrapper.start_subprocess("}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_dc128857","line":144,"in_reply_to":"baada198_06ff7802","updated":"2014-07-10 11:35:48.000000000","message":"Yes. It is used at least by DHCP agent in Neutron.","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"a37c1afa1c9b17b46584a69ee59f732555d10dc7","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    return RootwrapManager"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def daemon_start(execname, config, filters):"},{"line_number":176,"context_line":"    temp_dir \u003d tempfile.mkdtemp(prefix\u003d\u0027rootwrap-\u0027)"},{"line_number":177,"context_line":"    LOG.debug(\"Created temporary directory %s\", temp_dir)"},{"line_number":178,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_20d0e3f6","line":175,"updated":"2014-07-09 13:26:57.000000000","message":"execname seems unused","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"8576826d74fe0e028a95beb42a81bfe37e7da915","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    return RootwrapManager"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def daemon_start(execname, config, filters):"},{"line_number":176,"context_line":"    temp_dir \u003d tempfile.mkdtemp(prefix\u003d\u0027rootwrap-\u0027)"},{"line_number":177,"context_line":"    LOG.debug(\"Created temporary directory %s\", temp_dir)"},{"line_number":178,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_8bddda72","line":175,"in_reply_to":"baada198_1c3400dd","updated":"2014-07-13 07:10:01.000000000","message":"Done","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"2adcbf9fb3cf53b8f737934c494368b2c59335ee","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    return RootwrapManager"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def daemon_start(execname, config, filters):"},{"line_number":176,"context_line":"    temp_dir \u003d tempfile.mkdtemp(prefix\u003d\u0027rootwrap-\u0027)"},{"line_number":177,"context_line":"    LOG.debug(\"Created temporary directory %s\", temp_dir)"},{"line_number":178,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_1c3400dd","line":175,"in_reply_to":"baada198_20d0e3f6","updated":"2014-07-10 11:35:48.000000000","message":"Will remove that.","commit_id":"62a9f509ccb06b786ba25e83c8a571fd0a7388ec"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"63a050189451a6dd2cc0f62e3def48ec2a3346f0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            close_fds\u003dTrue,"},{"line_number":55,"context_line":"            stdin\u003dsubprocess.PIPE,"},{"line_number":56,"context_line":"            stdout\u003dsubprocess.PIPE,"},{"line_number":57,"context_line":"            stderr\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        out, err \u003d obj.communicate(stdin)"},{"line_number":59,"context_line":"        return obj.returncode, out, err"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_080bac24","line":57,"updated":"2014-07-18 13:04:31.000000000","message":"env is not being used in the call ? What\u0027s the point of adding the env parameter to wrapper.start_subprocess() function then ?","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c6cf0b01934cfb3e9fad6ec4ce8f858dd2abf404","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            close_fds\u003dTrue,"},{"line_number":55,"context_line":"            stdin\u003dsubprocess.PIPE,"},{"line_number":56,"context_line":"            stdout\u003dsubprocess.PIPE,"},{"line_number":57,"context_line":"            stderr\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        out, err \u003d obj.communicate(stdin)"},{"line_number":59,"context_line":"        return obj.returncode, out, err"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_da041380","line":57,"in_reply_to":"baada198_080bac24","updated":"2014-07-18 15:18:16.000000000","message":"Agrh... Must\u0027ve lost it during these 20 patchsets. Will bring it back.","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c70e5278b5df6c02a9bee63f8dccb30f4985f803","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            close_fds\u003dTrue,"},{"line_number":55,"context_line":"            stdin\u003dsubprocess.PIPE,"},{"line_number":56,"context_line":"            stdout\u003dsubprocess.PIPE,"},{"line_number":57,"context_line":"            stderr\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        out, err \u003d obj.communicate(stdin)"},{"line_number":59,"context_line":"        return obj.returncode, out, err"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_2fadcb9b","line":57,"in_reply_to":"baada198_da041380","updated":"2014-07-18 18:29:13.000000000","message":"Done. Also added a test to never miss this again.","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"63a050189451a6dd2cc0f62e3def48ec2a3346f0","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    try:"},{"line_number":86,"context_line":"        # allow everybody to find the socket"},{"line_number":87,"context_line":"        os.chmod(temp_dir, (stat.S_IRWXU |"},{"line_number":88,"context_line":"                            stat.S_IRGRP | stat.S_IWGRP |"},{"line_number":89,"context_line":"                            stat.S_IROTH | stat.S_IXOTH))"},{"line_number":90,"context_line":"        address \u003d os.path.join(temp_dir, \"rootwrap.sock\")"},{"line_number":91,"context_line":"        LOG.debug(\"Will listen on socket %s\", address)"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_c8a614c1","line":88,"updated":"2014-07-18 13:04:31.000000000","message":"shouldn\u0027t that be stat.S_IRGRP | stat.S_IXGRP (i.e. g+rx ?) rw would allow group to write in the dir but not list its content...","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c70e5278b5df6c02a9bee63f8dccb30f4985f803","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    try:"},{"line_number":86,"context_line":"        # allow everybody to find the socket"},{"line_number":87,"context_line":"        os.chmod(temp_dir, (stat.S_IRWXU |"},{"line_number":88,"context_line":"                            stat.S_IRGRP | stat.S_IWGRP |"},{"line_number":89,"context_line":"                            stat.S_IROTH | stat.S_IXOTH))"},{"line_number":90,"context_line":"        address \u003d os.path.join(temp_dir, \"rootwrap.sock\")"},{"line_number":91,"context_line":"        LOG.debug(\"Will listen on socket %s\", address)"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_4e13e55b","line":88,"in_reply_to":"baada198_c8a614c1","updated":"2014-07-18 18:29:13.000000000","message":"Oh, missed these two comments. Nice catch.\n\nDone.","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"63a050189451a6dd2cc0f62e3def48ec2a3346f0","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        manager \u003d manager_cls(address\u003daddress)"},{"line_number":94,"context_line":"        server \u003d manager.get_server()"},{"line_number":95,"context_line":"        # allow everybody to connect to the socket"},{"line_number":96,"context_line":"        os.chmod(address, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            # In Python 3 we have to use buffer to push in bytes directly"},{"line_number":99,"context_line":"            stdout \u003d sys.stdout.buffer"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_c87e14e4","line":96,"updated":"2014-07-18 13:04:31.000000000","message":"nitpick: not sure X is needed (connecting to socket should only require RW)","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c70e5278b5df6c02a9bee63f8dccb30f4985f803","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        manager \u003d manager_cls(address\u003daddress)"},{"line_number":94,"context_line":"        server \u003d manager.get_server()"},{"line_number":95,"context_line":"        # allow everybody to connect to the socket"},{"line_number":96,"context_line":"        os.chmod(address, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            # In Python 3 we have to use buffer to push in bytes directly"},{"line_number":99,"context_line":"            stdout \u003d sys.stdout.buffer"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_8e197d7c","line":96,"in_reply_to":"baada198_c87e14e4","updated":"2014-07-18 18:29:13.000000000","message":"Done","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"129b396490920f0d5f19aba2b243ea61478080e4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# Since multiprocessing supports only pickle and xmlrpclib for serialization of"},{"line_number":36,"context_line":"# RPC requests and responses, we declare anoter \u0027jsonrpc\u0027 serializer"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"managers.listener_client[\u0027jsonrpc\u0027] \u003d jsonrpc.JsonListener, jsonrpc.JsonClient"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_e9345ee0","line":36,"updated":"2014-07-28 15:33:54.000000000","message":"nit: another","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"74e106bdf454aead75d46cdb20175a72890ac57e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# Since multiprocessing supports only pickle and xmlrpclib for serialization of"},{"line_number":36,"context_line":"# RPC requests and responses, we declare anoter \u0027jsonrpc\u0027 serializer"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"managers.listener_client[\u0027jsonrpc\u0027] \u003d jsonrpc.JsonListener, jsonrpc.JsonClient"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_11f13001","line":36,"in_reply_to":"baada198_e9345ee0","updated":"2014-07-31 13:50:48.000000000","message":"Done","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"129b396490920f0d5f19aba2b243ea61478080e4","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            except Exception:"},{"line_number":130,"context_line":"                # Most likely the socket have already been closed"},{"line_number":131,"context_line":"                LOG.debug(\"Failed to close connection\")"},{"line_number":132,"context_line":"        LOG.info(\"Waiting for all client threads to finish.\")"},{"line_number":133,"context_line":"        for thread in threading.enumerate():"},{"line_number":134,"context_line":"            if thread.daemon:"},{"line_number":135,"context_line":"                LOG.debug(\"Joining thread %s\", thread)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_49370ab0","line":132,"updated":"2014-07-28 15:33:54.000000000","message":"info? shouldn\u0027t we translate it then?","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"8d02282c640bf3ba1cd86bcff13caba01b2645ca","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            except Exception:"},{"line_number":130,"context_line":"                # Most likely the socket have already been closed"},{"line_number":131,"context_line":"                LOG.debug(\"Failed to close connection\")"},{"line_number":132,"context_line":"        LOG.info(\"Waiting for all client threads to finish.\")"},{"line_number":133,"context_line":"        for thread in threading.enumerate():"},{"line_number":134,"context_line":"            if thread.daemon:"},{"line_number":135,"context_line":"                LOG.debug(\"Joining thread %s\", thread)"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_42bb5fbd","line":132,"in_reply_to":"baada198_49370ab0","updated":"2014-07-28 16:55:32.000000000","message":"We don\u0027t have localization in rootwrap at all... I guess that should be added separately.","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":38,"context_line":"managers.listener_client[\u0027jsonrpc\u0027] \u003d jsonrpc.JsonListener, jsonrpc.JsonClient"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class RootwrapClass(object):"},{"line_number":42,"context_line":"    def __init__(self, config, filters):"},{"line_number":43,"context_line":"        self.config \u003d config"},{"line_number":44,"context_line":"        self.filters \u003d filters"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_25c6476a","line":41,"updated":"2014-08-06 16:40:16.000000000","message":"Should this be declared in the get_manager scope below like RootwrapManager?","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":38,"context_line":"managers.listener_client[\u0027jsonrpc\u0027] \u003d jsonrpc.JsonListener, jsonrpc.JsonClient"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class RootwrapClass(object):"},{"line_number":42,"context_line":"    def __init__(self, config, filters):"},{"line_number":43,"context_line":"        self.config \u003d config"},{"line_number":44,"context_line":"        self.filters \u003d filters"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_1cf88049","line":41,"in_reply_to":"baada198_25c6476a","updated":"2014-08-07 10:12:17.000000000","message":"I like to declare things as global as it makes sense. Here RootwrapManager has to be declared in a factory because it\u0027s modified differently depending on factory\u0027s arguments. It\u0027s not the case for RootwrapClass.\n\nI understand that get_manager is actually called only once in daemon and only without arguments on client (yielding the same class), but I don\u0027t want this implied knowledge to hang around.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.config \u003d config"},{"line_number":44,"context_line":"        self.filters \u003d filters"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def run_one_command(self, userargs, env\u003dNone, stdin\u003dNone):"},{"line_number":47,"context_line":"        if env is None:"},{"line_number":48,"context_line":"            env \u003d {}"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_81fa8742","line":46,"updated":"2014-08-06 16:40:16.000000000","message":"This method is quite different from the one by the same name in cmd.py.  I wonder if the name should also be different to reflect this and make it clearer to the reader which one is being used.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7493210dee9034e6fbbbdb35f51c14ce3cb7b16b","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.config \u003d config"},{"line_number":44,"context_line":"        self.filters \u003d filters"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def run_one_command(self, userargs, env\u003dNone, stdin\u003dNone):"},{"line_number":47,"context_line":"        if env is None:"},{"line_number":48,"context_line":"            env \u003d {}"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_abd19330","line":46,"in_reply_to":"baada198_1c8fa0ce","updated":"2014-08-11 19:10:16.000000000","message":"Their call signatures are different, their return values are different, and they\u0027re meant for use in different contexts.  I just thought a slightly different name might help distinguish.  But, okay.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.config \u003d config"},{"line_number":44,"context_line":"        self.filters \u003d filters"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def run_one_command(self, userargs, env\u003dNone, stdin\u003dNone):"},{"line_number":47,"context_line":"        if env is None:"},{"line_number":48,"context_line":"            env \u003d {}"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_1c8fa0ce","line":46,"in_reply_to":"baada198_81fa8742","updated":"2014-08-07 10:12:17.000000000","message":"Oh, they are actually the same - they just wrap wrapper.start_subprocess calls and do necessary error and return value handling.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        os.kill(os.getpid(), signal.SIGINT)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_manager(config\u003dNone, filters\u003dNone):"},{"line_number":68,"context_line":"    class RootwrapManager(managers.BaseManager):"},{"line_number":69,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":70,"context_line":"            # Force jsonrpc because neither pickle nor xmlrpclib is secure"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_2518071f","line":67,"updated":"2014-08-06 16:40:16.000000000","message":"nit:  Could this be called get_manager_class or something since it returns a class and not an instance?","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        os.kill(os.getpid(), signal.SIGINT)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_manager(config\u003dNone, filters\u003dNone):"},{"line_number":68,"context_line":"    class RootwrapManager(managers.BaseManager):"},{"line_number":69,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":70,"context_line":"            # Force jsonrpc because neither pickle nor xmlrpclib is secure"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_7c17bc53","line":67,"in_reply_to":"baada198_2518071f","updated":"2014-08-07 10:12:17.000000000","message":"Yes, it should. Will rename.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8ea58478eddf1b70ff0d1f0f4abace4b1e3506ab","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        os.kill(os.getpid(), signal.SIGINT)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_manager(config\u003dNone, filters\u003dNone):"},{"line_number":68,"context_line":"    class RootwrapManager(managers.BaseManager):"},{"line_number":69,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":70,"context_line":"            # Force jsonrpc because neither pickle nor xmlrpclib is secure"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_bd0ad275","line":67,"in_reply_to":"baada198_7c17bc53","updated":"2014-08-11 07:43:49.000000000","message":"+1","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        os.kill(os.getpid(), signal.SIGINT)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_manager(config\u003dNone, filters\u003dNone):"},{"line_number":68,"context_line":"    class RootwrapManager(managers.BaseManager):"},{"line_number":69,"context_line":"        def __init__(self, address\u003dNone, authkey\u003dNone):"},{"line_number":70,"context_line":"            # Force jsonrpc because neither pickle nor xmlrpclib is secure"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_4e1a731a","line":67,"in_reply_to":"baada198_7c17bc53","updated":"2014-08-13 12:21:48.000000000","message":"Done","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                     stat.S_IRGRP | stat.S_IXGRP |"},{"line_number":90,"context_line":"                     stat.S_IROTH | stat.S_IXOTH)"},{"line_number":91,"context_line":"        os.chmod(temp_dir, rwxr_xr_x)"},{"line_number":92,"context_line":"        address \u003d os.path.join(temp_dir, \"rootwrap.sock\")"},{"line_number":93,"context_line":"        LOG.debug(\"Will listen on socket %s\", address)"},{"line_number":94,"context_line":"        manager_cls \u003d get_manager(config, filters)"},{"line_number":95,"context_line":"        manager \u003d manager_cls(address\u003daddress)"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_bee5330b","line":92,"updated":"2014-08-06 16:40:16.000000000","message":"nit:  I would have used path here rather than address just to hint that it is in the filesystem.  But, I\u0027m okay with this.\n\nIn this code context, it is clear.  However, in some other contexts it might help to read path or socket_path instead of address.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8ea58478eddf1b70ff0d1f0f4abace4b1e3506ab","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                     stat.S_IRGRP | stat.S_IXGRP |"},{"line_number":90,"context_line":"                     stat.S_IROTH | stat.S_IXOTH)"},{"line_number":91,"context_line":"        os.chmod(temp_dir, rwxr_xr_x)"},{"line_number":92,"context_line":"        address \u003d os.path.join(temp_dir, \"rootwrap.sock\")"},{"line_number":93,"context_line":"        LOG.debug(\"Will listen on socket %s\", address)"},{"line_number":94,"context_line":"        manager_cls \u003d get_manager(config, filters)"},{"line_number":95,"context_line":"        manager \u003d manager_cls(address\u003daddress)"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_3d16c2a1","line":92,"in_reply_to":"baada198_6ffe2006","updated":"2014-08-11 07:43:49.000000000","message":"+1","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                     stat.S_IRGRP | stat.S_IXGRP |"},{"line_number":90,"context_line":"                     stat.S_IROTH | stat.S_IXOTH)"},{"line_number":91,"context_line":"        os.chmod(temp_dir, rwxr_xr_x)"},{"line_number":92,"context_line":"        address \u003d os.path.join(temp_dir, \"rootwrap.sock\")"},{"line_number":93,"context_line":"        LOG.debug(\"Will listen on socket %s\", address)"},{"line_number":94,"context_line":"        manager_cls \u003d get_manager(config, filters)"},{"line_number":95,"context_line":"        manager \u003d manager_cls(address\u003daddress)"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_0e0ddb40","line":92,"in_reply_to":"baada198_6ffe2006","updated":"2014-08-13 12:21:48.000000000","message":"Done","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                     stat.S_IRGRP | stat.S_IXGRP |"},{"line_number":90,"context_line":"                     stat.S_IROTH | stat.S_IXOTH)"},{"line_number":91,"context_line":"        os.chmod(temp_dir, rwxr_xr_x)"},{"line_number":92,"context_line":"        address \u003d os.path.join(temp_dir, \"rootwrap.sock\")"},{"line_number":93,"context_line":"        LOG.debug(\"Will listen on socket %s\", address)"},{"line_number":94,"context_line":"        manager_cls \u003d get_manager(config, filters)"},{"line_number":95,"context_line":"        manager \u003d manager_cls(address\u003daddress)"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_6ffe2006","line":92,"in_reply_to":"baada198_bee5330b","updated":"2014-08-07 10:12:17.000000000","message":"socket_path is a great choice :)","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                LOG.debug(\"Joining thread %s\", thread)"},{"line_number":136,"context_line":"                thread.join()"},{"line_number":137,"context_line":"        LOG.debug(\"Removing temporary directory %s\", temp_dir)"},{"line_number":138,"context_line":"        shutil.rmtree(temp_dir)  # shutil.rmtree doesn\u0027t work in atexit"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def daemon_stop(server, signal, frame):"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_7eab9b70","line":138,"updated":"2014-08-06 16:40:16.000000000","message":"How about deleting the file and then the directory with rmdir?  Would that make a difference for atexit?","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                LOG.debug(\"Joining thread %s\", thread)"},{"line_number":136,"context_line":"                thread.join()"},{"line_number":137,"context_line":"        LOG.debug(\"Removing temporary directory %s\", temp_dir)"},{"line_number":138,"context_line":"        shutil.rmtree(temp_dir)  # shutil.rmtree doesn\u0027t work in atexit"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def daemon_stop(server, signal, frame):"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_6e03b711","line":138,"in_reply_to":"baada198_6f2540ac","updated":"2014-08-13 12:21:48.000000000","message":"Done","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                LOG.debug(\"Joining thread %s\", thread)"},{"line_number":136,"context_line":"                thread.join()"},{"line_number":137,"context_line":"        LOG.debug(\"Removing temporary directory %s\", temp_dir)"},{"line_number":138,"context_line":"        shutil.rmtree(temp_dir)  # shutil.rmtree doesn\u0027t work in atexit"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def daemon_stop(server, signal, frame):"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_6f2540ac","line":138,"in_reply_to":"baada198_7eab9b70","updated":"2014-08-07 10:12:17.000000000","message":"Yes, it would. But this comment has been added here in times when finally: clause was needed just for it. Now there\u0027s no difference between using rmtree here or something else in atexit. Will remove this comment.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"}],"oslo/rootwrap/filters.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bbc5aec3846fee4df1b9158c1b9b1c806de4525d","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            return [\u0027sudo\u0027, \u0027-u\u0027, self.run_as, to_exec] + userargs[1:]"},{"line_number":56,"context_line":"        return [to_exec] + userargs[1:]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def get_environment(self, userargs, env\u003dNone):"},{"line_number":59,"context_line":"        \"\"\"Returns specific environment to set, None if none.\"\"\""},{"line_number":60,"context_line":"        return None"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BJLI%3D","line":58,"updated":"2014-03-28 20:32:16.000000000","message":"Should this one return env.copy() if it is passed?","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"79003c1dd4cef6a2240c30998a7fd4f06c6d04b0","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            return [\u0027sudo\u0027, \u0027-u\u0027, self.run_as, to_exec] + userargs[1:]"},{"line_number":56,"context_line":"        return [to_exec] + userargs[1:]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def get_environment(self, userargs, env\u003dNone):"},{"line_number":59,"context_line":"        \"\"\"Returns specific environment to set, None if none.\"\"\""},{"line_number":60,"context_line":"        return None"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BItM%3D","line":58,"in_reply_to":"AAAAWH%2F%2BJLI%3D","updated":"2014-03-28 21:43:20.000000000","message":"There\u0027s no need for copy() here but you\u0027re right, it should return env instead of None by default.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"}],"oslo/rootwrap/jsonrpc.py":[{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"63a050189451a6dd2cc0f62e3def48ec2a3346f0","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    def recvall(self, size):"},{"line_number":142,"context_line":"        remaining \u003d size"},{"line_number":143,"context_line":"        # Unfortunatelly Python 2.6 doesn\u0027t support memoryview, so we\u0027ll have"},{"line_number":144,"context_line":"        # to to it the slow way"},{"line_number":145,"context_line":"        res \u003d []"},{"line_number":146,"context_line":"        while remaining:"},{"line_number":147,"context_line":"            piece \u003d self._socket.recv(remaining)"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_c89a9413","line":144,"updated":"2014-07-18 13:04:31.000000000","message":"Could we implement the two code paths ? python 2.6 support is not there to stay...","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c70e5278b5df6c02a9bee63f8dccb30f4985f803","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    def recvall(self, size):"},{"line_number":142,"context_line":"        remaining \u003d size"},{"line_number":143,"context_line":"        # Unfortunatelly Python 2.6 doesn\u0027t support memoryview, so we\u0027ll have"},{"line_number":144,"context_line":"        # to to it the slow way"},{"line_number":145,"context_line":"        res \u003d []"},{"line_number":146,"context_line":"        while remaining:"},{"line_number":147,"context_line":"            piece \u003d self._socket.recv(remaining)"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_612277a4","line":144,"in_reply_to":"baada198_3a00af65","updated":"2014-07-18 18:29:13.000000000","message":"Done","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c6cf0b01934cfb3e9fad6ec4ce8f858dd2abf404","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    def recvall(self, size):"},{"line_number":142,"context_line":"        remaining \u003d size"},{"line_number":143,"context_line":"        # Unfortunatelly Python 2.6 doesn\u0027t support memoryview, so we\u0027ll have"},{"line_number":144,"context_line":"        # to to it the slow way"},{"line_number":145,"context_line":"        res \u003d []"},{"line_number":146,"context_line":"        while remaining:"},{"line_number":147,"context_line":"            piece \u003d self._socket.recv(remaining)"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_3a00af65","line":144,"in_reply_to":"baada198_c89a9413","updated":"2014-07-18 15:18:16.000000000","message":"Ok, will do.","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"129b396490920f0d5f19aba2b243ea61478080e4","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class RpcJSONEncoder(json.JSONEncoder):"},{"line_number":36,"context_line":"    def default(self, o):"},{"line_number":37,"context_line":"        # We need to pass bytes unchanges as they are expected in arguments for"},{"line_number":38,"context_line":"        # and are result of Popen.communicate()"},{"line_number":39,"context_line":"        if isinstance(o, bytes):"},{"line_number":40,"context_line":"            return {\"__bytes__\": base64.b64encode(o).decode(\u0027ascii\u0027)}"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_a957c6c7","line":37,"updated":"2014-07-28 15:33:54.000000000","message":"nit: unchanged","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"74e106bdf454aead75d46cdb20175a72890ac57e","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class RpcJSONEncoder(json.JSONEncoder):"},{"line_number":36,"context_line":"    def default(self, o):"},{"line_number":37,"context_line":"        # We need to pass bytes unchanges as they are expected in arguments for"},{"line_number":38,"context_line":"        # and are result of Popen.communicate()"},{"line_number":39,"context_line":"        if isinstance(o, bytes):"},{"line_number":40,"context_line":"            return {\"__bytes__\": base64.b64encode(o).decode(\u0027ascii\u0027)}"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_d1cdf8bb","line":37,"in_reply_to":"baada198_a957c6c7","updated":"2014-07-31 13:50:48.000000000","message":"Done","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"129b396490920f0d5f19aba2b243ea61478080e4","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    if not has_memoryview or patched_socket:"},{"line_number":157,"context_line":"        # Unfortunatelly Python 2.6 doesn\u0027t support memoryview, so we\u0027ll have"},{"line_number":158,"context_line":"        # to to it the slow way. We have to use it with eventlet as well"},{"line_number":159,"context_line":"        # because of a bug in GreenSocket.recv_into:"},{"line_number":160,"context_line":"        # https://bitbucket.org/eventlet/eventlet/pull-request/41"},{"line_number":161,"context_line":"        def recvall(self, size):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_a90ee6e1","line":158,"updated":"2014-07-28 15:33:54.000000000","message":"s/to to/to do","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"74e106bdf454aead75d46cdb20175a72890ac57e","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    if not has_memoryview or patched_socket:"},{"line_number":157,"context_line":"        # Unfortunatelly Python 2.6 doesn\u0027t support memoryview, so we\u0027ll have"},{"line_number":158,"context_line":"        # to to it the slow way. We have to use it with eventlet as well"},{"line_number":159,"context_line":"        # because of a bug in GreenSocket.recv_into:"},{"line_number":160,"context_line":"        # https://bitbucket.org/eventlet/eventlet/pull-request/41"},{"line_number":161,"context_line":"        def recvall(self, size):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_f1d03c54","line":158,"in_reply_to":"baada198_a90ee6e1","updated":"2014-07-31 13:50:48.000000000","message":"Done","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"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 base64"},{"line_number":17,"context_line":"import errno"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_7c1d1877","line":14,"updated":"2014-08-06 16:40:16.000000000","message":"Any thoughts of contributing this upstream?","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"032e93f8bb1c839b1885132e312061279336490e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"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 base64"},{"line_number":17,"context_line":"import errno"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_f56901f9","line":14,"in_reply_to":"baada198_2fb0a83f","updated":"2014-08-08 04:18:31.000000000","message":"Just wondering if a json encoder would be useful in the multiprocessing code upstream as a serializer.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"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 base64"},{"line_number":17,"context_line":"import errno"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_2fb0a83f","line":14,"in_reply_to":"baada198_7c1d1877","updated":"2014-08-07 10:12:17.000000000","message":"Huh?","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"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 base64"},{"line_number":17,"context_line":"import errno"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_03abf471","line":14,"in_reply_to":"baada198_f56901f9","updated":"2014-08-13 12:21:48.000000000","message":"It might. But it would be an very different code I\u0027m afraid. There are a lot of work to be done with multiprocessing before we can actually use different abstract methods (and bearing eventlet). For example, there\u0027s a huge piece of multiprocessing written in C instead of Python (reasons for that should\u0027ve die off long time ago). So... Yeah, may be later :)","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"27a0bf44691e9b6e98fbc83d6a6a3f501bb244f6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import weakref"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"try:"},{"line_number":27,"context_line":"    import eventlet.patcher"},{"line_number":28,"context_line":"except ImportError:"},{"line_number":29,"context_line":"    patched_socket \u003d False"},{"line_number":30,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_233d438f","line":27,"updated":"2014-08-06 14:53:15.000000000","message":"This results in eventlet being imported by rootwrap on most systems. This defeats one of rootwrap design purposes, which is to only run stdlib modules as root. This sounds like this is only needed for client code, so if this eventlet import is really needed, separate client and server code paths to avoid the non-stdlib import from daemon/rootwrap code.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import weakref"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"try:"},{"line_number":27,"context_line":"    import eventlet.patcher"},{"line_number":28,"context_line":"except ImportError:"},{"line_number":29,"context_line":"    patched_socket \u003d False"},{"line_number":30,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_f7d06154","line":27,"in_reply_to":"baada198_233d438f","updated":"2014-08-06 16:40:16.000000000","message":"+1","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import weakref"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"try:"},{"line_number":27,"context_line":"    import eventlet.patcher"},{"line_number":28,"context_line":"except ImportError:"},{"line_number":29,"context_line":"    patched_socket \u003d False"},{"line_number":30,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_ef8cf083","line":27,"in_reply_to":"baada198_233d438f","updated":"2014-08-07 10:12:17.000000000","message":"Will do that.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import weakref"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"try:"},{"line_number":27,"context_line":"    import eventlet.patcher"},{"line_number":28,"context_line":"except ImportError:"},{"line_number":29,"context_line":"    patched_socket \u003d False"},{"line_number":30,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_a3e968ad","line":27,"in_reply_to":"baada198_3d44029e","updated":"2014-08-13 12:21:48.000000000","message":"In fact, I already use environment variable for testing. But we need to verify if eventlet had spoiled stdlib in any process that runs client code.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8ea58478eddf1b70ff0d1f0f4abace4b1e3506ab","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import weakref"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"try:"},{"line_number":27,"context_line":"    import eventlet.patcher"},{"line_number":28,"context_line":"except ImportError:"},{"line_number":29,"context_line":"    patched_socket \u003d False"},{"line_number":30,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_3d44029e","line":27,"in_reply_to":"baada198_ef8cf083","updated":"2014-08-11 07:43:49.000000000","message":"+1\n\nMay be adding a flag to \"run with evenlet\" (thinking of testing)","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import weakref"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"try:"},{"line_number":27,"context_line":"    import eventlet.patcher"},{"line_number":28,"context_line":"except ImportError:"},{"line_number":29,"context_line":"    patched_socket \u003d False"},{"line_number":30,"context_line":"else:"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_a3bb28bd","line":27,"in_reply_to":"baada198_ef8cf083","updated":"2014-08-13 12:21:48.000000000","message":"Done","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"}],"oslo/rootwrap/wrapper.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4d7dc4fb671f562d132ab45c3916beb1007df887","unresolved":false,"context_lines":[{"line_number":190,"context_line":"def start_subprocess(filter_list, userargs, exec_dirs\u003d[], log\u003dFalse,"},{"line_number":191,"context_line":"                     env\u003dNone, **kwargs):"},{"line_number":192,"context_line":"    filtermatch \u003d match_filter(filter_list, userargs, exec_dirs)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    command \u003d filtermatch.get_command(userargs, exec_dirs)"},{"line_number":195,"context_line":"    if log:"},{"line_number":196,"context_line":"        logging.info(\"(%s \u003e %s) Executing %s (filter match \u003d %s)\" % ("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B7Nw%3D","line":193,"updated":"2014-03-21 16:41:39.000000000","message":"if filtermatch:\n   ....\n   ....\n\nOtherwise we will try to call on filtermatch.get_command even for filtermatch \u003d\u003d None","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"126871b10268fc243ca6cfe72f4ad22f237b7163","unresolved":false,"context_lines":[{"line_number":190,"context_line":"def start_subprocess(filter_list, userargs, exec_dirs\u003d[], log\u003dFalse,"},{"line_number":191,"context_line":"                     env\u003dNone, **kwargs):"},{"line_number":192,"context_line":"    filtermatch \u003d match_filter(filter_list, userargs, exec_dirs)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    command \u003d filtermatch.get_command(userargs, exec_dirs)"},{"line_number":195,"context_line":"    if log:"},{"line_number":196,"context_line":"        logging.info(\"(%s \u003e %s) Executing %s (filter match \u003d %s)\" % ("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B4%2F0%3D","line":193,"in_reply_to":"AAAAWH%2F%2B6pU%3D","updated":"2014-03-21 22:43:49.000000000","message":"You\u0027re absolutely right +1 for the refactor, sorry for the noise.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"585bf250198a1bd76e5edc1d098135aa15994957","unresolved":false,"context_lines":[{"line_number":190,"context_line":"def start_subprocess(filter_list, userargs, exec_dirs\u003d[], log\u003dFalse,"},{"line_number":191,"context_line":"                     env\u003dNone, **kwargs):"},{"line_number":192,"context_line":"    filtermatch \u003d match_filter(filter_list, userargs, exec_dirs)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    command \u003d filtermatch.get_command(userargs, exec_dirs)"},{"line_number":195,"context_line":"    if log:"},{"line_number":196,"context_line":"        logging.info(\"(%s \u003e %s) Executing %s (filter match \u003d %s)\" % ("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2B6pU%3D","line":193,"in_reply_to":"AAAAWH%2F%2B7Nw%3D","updated":"2014-03-21 17:53:28.000000000","message":"That was some legacy code. match_filter never returns None, only raises errors.","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bbc5aec3846fee4df1b9158c1b9b1c806de4525d","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    signal.signal(signal.SIGPIPE, signal.SIG_DFL)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"def _getlogin():"},{"line_number":182,"context_line":"    try:"},{"line_number":183,"context_line":"        return os.getlogin()"},{"line_number":184,"context_line":"    except OSError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BJIw%3D","line":181,"updated":"2014-03-28 20:32:16.000000000","message":"Does this method make any sense when this is running as a daemon process.  The documentation for os.getlogin says it is getting the \"name of the user logged in on the controlling terminal of the process\"\n\nAlso, I don\u0027t expect $USER, $USERNAME, or $LOGIN to be set in a daemon context.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"79003c1dd4cef6a2240c30998a7fd4f06c6d04b0","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    signal.signal(signal.SIGPIPE, signal.SIG_DFL)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"def _getlogin():"},{"line_number":182,"context_line":"    try:"},{"line_number":183,"context_line":"        return os.getlogin()"},{"line_number":184,"context_line":"    except OSError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BItk%3D","line":181,"in_reply_to":"AAAAWH%2F%2BJIw%3D","updated":"2014-03-28 21:43:20.000000000","message":"If they are set in the usual rootwrap call they will be set in daemon as well. It is used only for logging anyway, so I don\u0027t think it is an issue.","commit_id":"b88700ddb3ce16c3b3343c9dbebcb084a6ae19cc"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"63a050189451a6dd2cc0f62e3def48ec2a3346f0","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    obj \u003d subprocess.Popen(command,"},{"line_number":201,"context_line":"                           preexec_fn\u003d_subprocess_setup,"},{"line_number":202,"context_line":"                           env\u003dfiltermatch.get_environment(userargs, env),"},{"line_number":203,"context_line":"                           **kwargs)"},{"line_number":204,"context_line":"    return obj"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_a8e9e01b","line":202,"updated":"2014-07-18 13:04:31.000000000","message":"Minor nit: should be env\u003dfiltermatch.get_environment(userargs, env\u003denv)","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c70e5278b5df6c02a9bee63f8dccb30f4985f803","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    obj \u003d subprocess.Popen(command,"},{"line_number":201,"context_line":"                           preexec_fn\u003d_subprocess_setup,"},{"line_number":202,"context_line":"                           env\u003dfiltermatch.get_environment(userargs, env),"},{"line_number":203,"context_line":"                           **kwargs)"},{"line_number":204,"context_line":"    return obj"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_4e412538","line":202,"in_reply_to":"baada198_7af5c781","updated":"2014-07-18 18:29:13.000000000","message":"Done","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c6cf0b01934cfb3e9fad6ec4ce8f858dd2abf404","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    obj \u003d subprocess.Popen(command,"},{"line_number":201,"context_line":"                           preexec_fn\u003d_subprocess_setup,"},{"line_number":202,"context_line":"                           env\u003dfiltermatch.get_environment(userargs, env),"},{"line_number":203,"context_line":"                           **kwargs)"},{"line_number":204,"context_line":"    return obj"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_7af5c781","line":202,"in_reply_to":"baada198_a8e9e01b","updated":"2014-07-18 15:18:16.000000000","message":"Agree","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"}],"tests/run_daemon.py":[{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"63a050189451a6dd2cc0f62e3def48ec2a3346f0","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        to.write(line)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def forwrading_popen(f, old_popen\u003dsubprocess.Popen):"},{"line_number":33,"context_line":"    def popen(*args, **kwargs):"},{"line_number":34,"context_line":"        p \u003d old_popen(*args, **kwargs)"},{"line_number":35,"context_line":"        t \u003d threading.Thread(target\u003dforward_stream, args\u003d(p.stderr, f))"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_45ad8d30","line":32,"updated":"2014-07-18 13:04:31.000000000","message":"typo: forwarding_popen","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c70e5278b5df6c02a9bee63f8dccb30f4985f803","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        to.write(line)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def forwrading_popen(f, old_popen\u003dsubprocess.Popen):"},{"line_number":33,"context_line":"    def popen(*args, **kwargs):"},{"line_number":34,"context_line":"        p \u003d old_popen(*args, **kwargs)"},{"line_number":35,"context_line":"        t \u003d threading.Thread(target\u003dforward_stream, args\u003d(p.stderr, f))"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_0e6badb9","line":32,"in_reply_to":"baada198_45ad8d30","updated":"2014-07-18 18:29:13.000000000","message":"Done","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"}],"tests/test_functional.py":[{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"63a050189451a6dd2cc0f62e3def48ec2a3346f0","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # Collect daemon logs"},{"line_number":102,"context_line":"        daemon_log \u003d io.BytesIO()"},{"line_number":103,"context_line":"        p \u003d mock.patch(\u0027subprocess.Popen\u0027,"},{"line_number":104,"context_line":"                       run_daemon.forwrading_popen(daemon_log))"},{"line_number":105,"context_line":"        p.start()"},{"line_number":106,"context_line":"        self.addCleanup(p.stop)"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_e5406161","line":104,"updated":"2014-07-18 13:04:31.000000000","message":"typo: forwarding_popen","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c70e5278b5df6c02a9bee63f8dccb30f4985f803","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # Collect daemon logs"},{"line_number":102,"context_line":"        daemon_log \u003d io.BytesIO()"},{"line_number":103,"context_line":"        p \u003d mock.patch(\u0027subprocess.Popen\u0027,"},{"line_number":104,"context_line":"                       run_daemon.forwrading_popen(daemon_log))"},{"line_number":105,"context_line":"        p.start()"},{"line_number":106,"context_line":"        self.addCleanup(p.stop)"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_ce9b75c7","line":104,"in_reply_to":"baada198_e5406161","updated":"2014-07-18 18:29:13.000000000","message":"Done","commit_id":"97a1394624acde88075aa1fd10d7cd06d5d021fb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"129b396490920f0d5f19aba2b243ea61478080e4","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        code, out, err \u003d self._thread_res"},{"line_number":171,"context_line":"        self.assertEqual(0, code)"},{"line_number":172,"context_line":"        self.assertEqual(b\u0027OK\\n\u0027, out)"},{"line_number":173,"context_line":"        self.assertEqual(b\u0027\u0027, err)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @contextlib.contextmanager"},{"line_number":176,"context_line":"    def _test_daemon_cleanup(self):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_521178f6","line":173,"updated":"2014-07-28 15:33:54.000000000","message":"Though I\u0027ve managed to understand what\u0027s the intent of most of the lines in those tests, I doubt it\u0027s ok to leave those without comments. Please add some comments describing your intent when e.g. calling readline() on an empty file, or using FIFO.\n\nNot everyone is great at UNIX systems programming. :)","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"8d02282c640bf3ba1cd86bcff13caba01b2645ca","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        code, out, err \u003d self._thread_res"},{"line_number":171,"context_line":"        self.assertEqual(0, code)"},{"line_number":172,"context_line":"        self.assertEqual(b\u0027OK\\n\u0027, out)"},{"line_number":173,"context_line":"        self.assertEqual(b\u0027\u0027, err)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @contextlib.contextmanager"},{"line_number":176,"context_line":"    def _test_daemon_cleanup(self):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_8215779c","line":173,"in_reply_to":"baada198_521178f6","updated":"2014-07-28 16:55:32.000000000","message":"Just wanted to start elite functional test\u0027s readers (and writers) club :)\n\nWill add some comments here and everywhere around :)","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"74e106bdf454aead75d46cdb20175a72890ac57e","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        code, out, err \u003d self._thread_res"},{"line_number":171,"context_line":"        self.assertEqual(0, code)"},{"line_number":172,"context_line":"        self.assertEqual(b\u0027OK\\n\u0027, out)"},{"line_number":173,"context_line":"        self.assertEqual(b\u0027\u0027, err)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @contextlib.contextmanager"},{"line_number":176,"context_line":"    def _test_daemon_cleanup(self):"}],"source_content_type":"text/x-python","patch_set":25,"id":"baada198_31ff1468","line":173,"in_reply_to":"baada198_8215779c","updated":"2014-07-31 13:50:48.000000000","message":"Done","commit_id":"8c32f9ca368c92d20f00ca6d3a2bedb4f4d24a2d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"568471943e38788ecafc047efa28d4051632f0ce","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # Run _test_daemon_cleanup stopping daemon as Client instance would"},{"line_number":216,"context_line":"        # normally do"},{"line_number":217,"context_line":"        with self._test_daemon_cleanup():"},{"line_number":218,"context_line":"            self.client._do_shutdown()"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def test_daemon_cleanup_signal(self):"},{"line_number":221,"context_line":"        # Run _test_daemon_cleanup stopping daemon with SIGTERM signal"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_573cadc0","line":218,"updated":"2014-08-06 16:40:16.000000000","message":"What does this test?  There are no asserts.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"ead35eb41d042486cd401d6dcbeed94b4b146559","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # Run _test_daemon_cleanup stopping daemon as Client instance would"},{"line_number":216,"context_line":"        # normally do"},{"line_number":217,"context_line":"        with self._test_daemon_cleanup():"},{"line_number":218,"context_line":"            self.client._do_shutdown()"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def test_daemon_cleanup_signal(self):"},{"line_number":221,"context_line":"        # Run _test_daemon_cleanup stopping daemon with SIGTERM signal"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_5c33d8c3","line":218,"in_reply_to":"baada198_573cadc0","updated":"2014-08-07 10:12:17.000000000","message":"All asserts are in _test_daemon_cleanup. These two tests only provide different methods for client to die.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7493210dee9034e6fbbbdb35f51c14ce3cb7b16b","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # Run _test_daemon_cleanup stopping daemon as Client instance would"},{"line_number":216,"context_line":"        # normally do"},{"line_number":217,"context_line":"        with self._test_daemon_cleanup():"},{"line_number":218,"context_line":"            self.client._do_shutdown()"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def test_daemon_cleanup_signal(self):"},{"line_number":221,"context_line":"        # Run _test_daemon_cleanup stopping daemon with SIGTERM signal"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_6bbe9bb0","line":218,"in_reply_to":"baada198_5c33d8c3","updated":"2014-08-11 19:10:16.000000000","message":"My bad.  Disregard.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"}],"tests/test_functional_eventlet.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8ea58478eddf1b70ff0d1f0f4abace4b1e3506ab","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    class RootwrapDaemonTest(test_functional.RootwrapDaemonTest):"},{"line_number":25,"context_line":"        def test_graceful_death(self):"},{"line_number":26,"context_line":"            self.skip(\"Eventlet doesn\u0027t like FIFOs\")"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_146de59a","line":26,"updated":"2014-08-11 07:43:49.000000000","message":"Why do we have an empty test?, what\u0027s the problem with FIFOs exactly?","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"9befdcec35402a456321c7805ac2d6b36467ed2b","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    class RootwrapDaemonTest(test_functional.RootwrapDaemonTest):"},{"line_number":25,"context_line":"        def test_graceful_death(self):"},{"line_number":26,"context_line":"            self.skip(\"Eventlet doesn\u0027t like FIFOs\")"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_62eb20dd","line":26,"in_reply_to":"baada198_146de59a","updated":"2014-08-11 17:42:47.000000000","message":"This test overrides inherited test with the same name. IIRC eventlet somehow hangs on FIFO operations.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"2cc1c358d716105a77fc7f9734b66e39a517bcc3","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    class RootwrapDaemonTest(test_functional.RootwrapDaemonTest):"},{"line_number":25,"context_line":"        def test_graceful_death(self):"},{"line_number":26,"context_line":"            self.skip(\"Eventlet doesn\u0027t like FIFOs\")"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_45c1692f","line":26,"in_reply_to":"baada198_49a98ddd","updated":"2014-08-13 16:10:25.000000000","message":"OK, it can be reproduced on CentOS and py26. I\u0027ll have to keep this stub.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"62bf481ca9e574cea3bff2d37ab3b8ea2e5aa1d3","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    class RootwrapDaemonTest(test_functional.RootwrapDaemonTest):"},{"line_number":25,"context_line":"        def test_graceful_death(self):"},{"line_number":26,"context_line":"            self.skip(\"Eventlet doesn\u0027t like FIFOs\")"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_49a98ddd","line":26,"in_reply_to":"baada198_62eb20dd","updated":"2014-08-13 12:21:48.000000000","message":"It looks like I can not reproduce that. Will remove this stub.","commit_id":"9a26cecb2995dcbfc91c8e68059e4301ae8f30b1"}],"tox.ini":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4d7dc4fb671f562d132ab45c3916beb1007df887","unresolved":false,"context_lines":[{"line_number":25,"context_line":"builtins \u003d _"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"[testenv:benchmark]"},{"line_number":28,"context_line":"commands \u003d python benchmark/benchmark.py"}],"source_content_type":"text/x-properties","patch_set":6,"id":"AAAAWH%2F%2B7NA%3D","line":28,"updated":"2014-03-21 16:41:39.000000000","message":"+1 ;-)","commit_id":"d0108ea9257641b4ad28130b7a575c3063a226de"}]}
