)]}'
{"os_brick/privileged/rootwrap.py":[{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"df3a3aab59a3ad5fd5361761d9390a3174cdcb2d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            # helper_command isn\u0027t configured and setup."},{"line_number":62,"context_line":"            # This will effectively run everything locally"},{"line_number":63,"context_line":"            if utils.is_privsep_enabled():"},{"line_number":64,"context_line":"                LOG.debug(\"We have a helper_command, using privsep\")"},{"line_number":65,"context_line":"                kwargs.pop(\u0027root_helper\u0027, None)"},{"line_number":66,"context_line":"                kwargs.pop(\u0027run_as_root\u0027, False)"},{"line_number":67,"context_line":"                return execute_root(*cmd, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_21589130","line":64,"range":{"start_line":64,"start_character":20,"end_line":64,"end_character":25},"updated":"2016-06-14 18:04:52.000000000","message":"I know this is lame, but could we use a bit more \"formal\" debug message here?  Maybe something like:\n\"Issuing cmd using privsep\"\n\nand \n\n\"Issuing cmd using putils\"\n\nI get logging this, but I\u0027m concerned that it\u0027s going to be a bit noisy... I guess I was thinking maybe there was a way to detect/log this on init and not have to check it for every cmd?","commit_id":"ffe4eaf3c25d7d74f578853836c65ca513f5d49c"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"06c11c5d725705f2a62e08690731d511a3e0f60a","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            # helper_command isn\u0027t configured and setup."},{"line_number":62,"context_line":"            # This will effectively run everything locally"},{"line_number":63,"context_line":"            if utils.is_privsep_enabled():"},{"line_number":64,"context_line":"                LOG.debug(\"We have a helper_command, using privsep\")"},{"line_number":65,"context_line":"                kwargs.pop(\u0027root_helper\u0027, None)"},{"line_number":66,"context_line":"                kwargs.pop(\u0027run_as_root\u0027, False)"},{"line_number":67,"context_line":"                return execute_root(*cmd, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_a1e00127","line":64,"range":{"start_line":64,"start_character":20,"end_line":64,"end_character":25},"in_reply_to":"7aa08908_21589130","updated":"2016-06-14 18:07:13.000000000","message":"I completely agree.  I\u0027ll be removing this once we get agreement that this patch is the right direction to go with fixing this.  It\u0027s a lame message meant just for dev/debugging this in the mean time.","commit_id":"ffe4eaf3c25d7d74f578853836c65ca513f5d49c"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"f33220ca0bb9f4bad8facd73a5051e056fe5c420","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    try:"},{"line_number":59,"context_line":"        if run_as_root:"},{"line_number":60,"context_line":"            # Don\u0027t try and run the remote command if the"},{"line_number":61,"context_line":"            # helper_command isn\u0027t configured and setup."},{"line_number":62,"context_line":"            # This will effectively run everything locally"},{"line_number":63,"context_line":"            if utils.is_privsep_enabled():"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_0e0e4b32","line":60,"updated":"2016-06-15 06:43:13.000000000","message":"An alternative would be to just try, and then adapt if it wasn\u0027t successful for whatever reason:\n\n from oslo_privsep import daemon as privsep_daemon\n\n _privsep_is_functional \u003d None\n\n def execute(..):\n   ...\n   if run_as_root:\n      # Some explanatory comment here\n      if _privsep_is_functional is None:\n         try:\n            privileged.default.start()\n            _privsep_is_functional \u003d True\n         except privsep_daemon.FailedToDropPrivileges:\n            _privsep_is_functional \u003d False\n      if _privsep_is_functional:\n         kwargs.pop(\u0027root_helper\u0027, None)\n         kwargs.pop(\u0027run_as_root\u0027, False)\n         return execute_root(*cmd, **kwargs)\n      else:\n         return putils.execute(*cmd, **kwargs)\n\n\nSpecifically, my concern is that the version you have proposed will need to be removed before we can test a new version of the privsep code that no longer requires this workaround.  With my version, if it works, then we\u0027ll start using privsep again and we can remove the workaround outside the critical path.","commit_id":"1df31339d8d328e19db8b7015970429fcd0ce42d"}],"os_brick/utils.py":[{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"f69f1197cb84761fe79de69e3dbf5ea2a91e96b1","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            privileged.default.start()"},{"line_number":113,"context_line":"            _privsep_is_functional \u003d True"},{"line_number":114,"context_line":"        except privsep_daemon.FailedToDropPrivileges:"},{"line_number":115,"context_line":"            _privsep_is_functional \u003d False"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    return _privsep_is_functional"}],"source_content_type":"text/x-python","patch_set":5,"id":"7aa08908_5bf0a866","line":115,"updated":"2016-06-16 23:15:00.000000000","message":"Should I also catch the generic Exception here as well and set to False ?","commit_id":"001468ded2951e6ae9e53ee209b78e8fe67a69f7"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"5afa6791fe8a72a15f5d671ecea0a87c6603b0f9","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            privileged.default.start()"},{"line_number":113,"context_line":"            _privsep_is_functional \u003d True"},{"line_number":114,"context_line":"        except privsep_daemon.FailedToDropPrivileges:"},{"line_number":115,"context_line":"            _privsep_is_functional \u003d False"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    return _privsep_is_functional"}],"source_content_type":"text/x-python","patch_set":5,"id":"7aa08908_9ff2f299","line":115,"in_reply_to":"7aa08908_5bf0a866","updated":"2016-06-17 05:34:11.000000000","message":"I don\u0027t think so.  There are of course other things that might go wrong, but (eg) a python syntax error should probably actually raise a SyntaxError rather than get silently swallowed here.","commit_id":"001468ded2951e6ae9e53ee209b78e8fe67a69f7"}]}
