)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8720ff5fe5742299810e6ff4a61ad6e057034363","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This change addresses some concerns about the Couchbase restore"},{"line_number":13,"context_line":"strategy. In particular, the concerns that are addressed include"},{"line_number":14,"context_line":"string injection in some execute calls, and issues around the"},{"line_number":15,"context_line":"permissions on the secret file used to store the password."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This change set aims to fully address the issue around the password"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa98f980_3bb9e02e","line":14,"updated":"2014-09-09 15:50:38.000000000","message":"these changes should be split into separate commits so that it\u0027s easier to review.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"78d7bcff17a52bae6f4b5da1218f25620936623e","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This change addresses some concerns about the Couchbase restore"},{"line_number":13,"context_line":"strategy. In particular, the concerns that are addressed include"},{"line_number":14,"context_line":"string injection in some execute calls, and issues around the"},{"line_number":15,"context_line":"permissions on the secret file used to store the password."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This change set aims to fully address the issue around the password"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa98f980_56467950","line":14,"in_reply_to":"fa98f980_3bb9e02e","updated":"2014-09-09 16:18:54.000000000","message":"All changes being proposed here related to a single bug. Multiple commits would be more confusing.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"}],"trove/guestagent/datastore/couchbase/service.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"2e477aac7652c646de9a2687de1078fee7bdd762","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        oldumask \u003d os.umask(stat.S_IRWXG | stat.S_IRWXO | stat.S_IEXEC)"},{"line_number":288,"context_line":"        tempfd, tempname \u003d tempfile.mkstemp()"},{"line_number":289,"context_line":"        os.write(tempfd, root_password)"},{"line_number":290,"context_line":"        os.close(tempfd)"},{"line_number":291,"context_line":"        os.umask(oldumask)"},{"line_number":292,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_7d825995","line":289,"updated":"2014-09-02 17:29:20.000000000","message":"it\u0027s possible the write will fail with an exception, then the close wouldn\u0027t happen and the umask wouldn\u0027t be restored. Code needs to be added so that this is exception safe.","commit_id":"29a0580dffaea63ea07b3d7b351258159fcbcb69"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"50f7dd540e96e83f85212e5b4d1b8990a1c8a0e6","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        oldumask \u003d os.umask(stat.S_IRWXG | stat.S_IRWXO | stat.S_IEXEC)"},{"line_number":288,"context_line":"        tempfd, tempname \u003d tempfile.mkstemp()"},{"line_number":289,"context_line":"        os.write(tempfd, root_password)"},{"line_number":290,"context_line":"        os.close(tempfd)"},{"line_number":291,"context_line":"        os.umask(oldumask)"},{"line_number":292,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_c37d22e9","line":289,"in_reply_to":"fa98f980_7d825995","updated":"2014-09-02 18:17:13.000000000","message":"Done","commit_id":"29a0580dffaea63ea07b3d7b351258159fcbcb69"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8720ff5fe5742299810e6ff4a61ad6e057034363","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        utils.execute_with_timeout(\u0027mkdir\u0027, \u0027-p\u0027, system.COUCHBASE_CONF_DIR,"},{"line_number":285,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\u0027sudo\u0027)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        oldumask \u003d os.umask(stat.S_IRWXG | stat.S_IRWXO | stat.S_IEXEC)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        try:"},{"line_number":290,"context_line":"            tempfd, tempname \u003d tempfile.mkstemp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_1b633cde","line":287,"updated":"2014-09-09 15:50:38.000000000","message":"there should be a comment that says why this is safe -- is the service single-threaded? Otherwise after the umask is set another thread might come along and reset it on you.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"78d7bcff17a52bae6f4b5da1218f25620936623e","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        utils.execute_with_timeout(\u0027mkdir\u0027, \u0027-p\u0027, system.COUCHBASE_CONF_DIR,"},{"line_number":285,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\u0027sudo\u0027)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        oldumask \u003d os.umask(stat.S_IRWXG | stat.S_IRWXO | stat.S_IEXEC)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        try:"},{"line_number":290,"context_line":"            tempfd, tempname \u003d tempfile.mkstemp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_565d9914","line":287,"in_reply_to":"fa98f980_1b633cde","updated":"2014-09-09 16:18:54.000000000","message":"can\u0027t guarantee this; will fix.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8720ff5fe5742299810e6ff4a61ad6e057034363","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            os.umask(oldumask)"},{"line_number":295,"context_line":"            raise"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        os.umask(oldumask)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        utils.execute_with_timeout(\u0027mv\u0027, tempname, system.pwd_file,"},{"line_number":300,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\u0027sudo\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_008907ca","line":297,"updated":"2014-09-09 15:50:38.000000000","message":"use finally then the code doesn\u0027t have to be duplicated:\n\n try:\n   ...\n finally:\n   os.umask(oldumask)","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"78d7bcff17a52bae6f4b5da1218f25620936623e","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            os.umask(oldumask)"},{"line_number":295,"context_line":"            raise"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        os.umask(oldumask)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        utils.execute_with_timeout(\u0027mv\u0027, tempname, system.pwd_file,"},{"line_number":300,"context_line":"                                   run_as_root\u003dTrue, root_helper\u003d\u0027sudo\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_b6a5e505","line":297,"in_reply_to":"fa98f980_008907ca","updated":"2014-09-09 16:18:54.000000000","message":"OK","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":6162,"name":"Dan Nguyen","email":"dan.nguyens.mail@gmail.com","username":"daniel-a-nguyen"},"change_message_id":"4acb23b4bfc9a6f0de9865d5f8610d396c0f0f27","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            os.write(tempfd, root_password)"},{"line_number":291,"context_line":"            os.fchmod(tempfd, stat.S_IRUSR)"},{"line_number":292,"context_line":"            os.close(tempfd)"},{"line_number":293,"context_line":"        except Exception:"},{"line_number":294,"context_line":"            raise"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        utils.execute_with_timeout(\u0027mv\u0027, tempname, system.pwd_file,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_c2953989","line":293,"updated":"2014-09-09 22:49:54.000000000","message":"Maybe add some logging here before re-throwing?\n\nAlso, could catch IOError or something to that effect.","commit_id":"0e03ebe093ded4e60409cdcc0d31ab98a8f2313f"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0e23d1f4cf04bc026258f5bd25f872e9d8fa72da","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            os.write(tempfd, root_password)"},{"line_number":291,"context_line":"            os.fchmod(tempfd, stat.S_IRUSR)"},{"line_number":292,"context_line":"            os.close(tempfd)"},{"line_number":293,"context_line":"        except Exception:"},{"line_number":294,"context_line":"            raise"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        utils.execute_with_timeout(\u0027mv\u0027, tempname, system.pwd_file,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_d4d6c226","line":293,"in_reply_to":"fa98f980_463a2bce","updated":"2014-09-10 15:52:51.000000000","message":"Out of curiosity, why?\n\nI get Dan\u0027s comment about logging the exception, that makes perfect sense. To Dan\u0027s point, I wouldn\u0027t catch IOError if I had to, I\u0027d catch OSError. \n\nBut, what\u0027s the rationale behind the objection to catching Exception?","commit_id":"0e03ebe093ded4e60409cdcc0d31ab98a8f2313f"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"96375203ec53ed8ae386f14e5532ea047fbde4f1","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            os.write(tempfd, root_password)"},{"line_number":291,"context_line":"            os.fchmod(tempfd, stat.S_IRUSR)"},{"line_number":292,"context_line":"            os.close(tempfd)"},{"line_number":293,"context_line":"        except Exception:"},{"line_number":294,"context_line":"            raise"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        utils.execute_with_timeout(\u0027mv\u0027, tempname, system.pwd_file,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_463a2bce","line":293,"in_reply_to":"fa98f980_c2953989","updated":"2014-09-10 13:25:15.000000000","message":"I strongly recommend to avoid catching too broad exceptions, please find out concrete list of exceptions that would possibly appear here.","commit_id":"0e03ebe093ded4e60409cdcc0d31ab98a8f2313f"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0e23d1f4cf04bc026258f5bd25f872e9d8fa72da","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            os.write(tempfd, root_password)"},{"line_number":291,"context_line":"            os.fchmod(tempfd, stat.S_IRUSR)"},{"line_number":292,"context_line":"            os.close(tempfd)"},{"line_number":293,"context_line":"        except Exception:"},{"line_number":294,"context_line":"            raise"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        utils.execute_with_timeout(\u0027mv\u0027, tempname, system.pwd_file,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_34e70e14","line":293,"in_reply_to":"fa98f980_c2953989","updated":"2014-09-10 15:52:51.000000000","message":"see comment below","commit_id":"0e03ebe093ded4e60409cdcc0d31ab98a8f2313f"}],"trove/guestagent/strategies/backup/couchbase_impl.py":[{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"50dfcf28bf8a98175a152cc693c80c7ff6fd1207","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        Creates backup dump dir, tars it up, and encrypts it."},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        cmd \u003d \u0027tar cpPf - \u0027 + system.COUCHBASE_DUMP_DIR"},{"line_number":53,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _save_buckets_config(self, password):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_4348365c","line":52,"updated":"2014-08-27 16:59:01.000000000","message":"I think we need to parameterize this as well.  In the file: guestagent/strategies/backup/base.py line 58, we are calling shell\u003dTrue.  That call should be fixed to remove the shell\u003dTrue and we should return a list of command/args here.","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d86b0102808003fdb46cab75223669f911f45fc","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        Creates backup dump dir, tars it up, and encrypts it."},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        cmd \u003d \u0027tar cpPf - \u0027 + system.COUCHBASE_DUMP_DIR"},{"line_number":53,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _save_buckets_config(self, password):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_5249885e","line":52,"in_reply_to":"1abeadc6_2693485c","updated":"2014-08-29 10:48:05.000000000","message":"This is used to construct a pipeline. Won\u0027t be easy to do that with shell \u003d false.","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"},{"author":{"_account_id":2807,"name":"Bryan D. Payne","email":"bdpayne@acm.org","username":"bdpayne"},"change_message_id":"2b0f07bcc0286eb951dcf9dfe4ac9a0511177f5a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        Creates backup dump dir, tars it up, and encrypts it."},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        cmd \u003d \u0027tar cpPf - \u0027 + system.COUCHBASE_DUMP_DIR"},{"line_number":53,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _save_buckets_config(self, password):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_2693485c","line":52,"in_reply_to":"1abeadc6_4348365c","updated":"2014-08-27 17:35:03.000000000","message":"I agree.","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"56f7388cc7a2ef702f7cb81e4c06c340395d46f4","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # Not default password, backup generated root password"},{"line_number":95,"context_line":"                command \u003d [\u0027sudo\u0027, \u0027cp\u0027, \u0027-p\u0027, system.pwd_file,"},{"line_number":96,"context_line":"                           system.COUCHBASE_DUMP_DIR]"},{"line_number":97,"context_line":"                utils.execute_with_timeout(command)"},{"line_number":98,"context_line":"        except exception.ProcessExecutionError as p:"},{"line_number":99,"context_line":"            LOG.error(p)"},{"line_number":100,"context_line":"            raise p"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_53a8db8b","line":97,"updated":"2014-08-28 15:36:50.000000000","message":"I believe that the way to do this is by using the run_as_root and root_helper parameters of execute.  Please see this page for how: \n\nhttps://github.com/openstack/oslo-incubator/blob/master/openstack/common/processutils.py#L107","commit_id":"6e0b94197059baa088e0a70426007c5c6e125465"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"8dadcd898caaec9e02f6bc508f48de77d40d4ef3","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # Not default password, backup generated root password"},{"line_number":95,"context_line":"                command \u003d [\u0027sudo\u0027, \u0027cp\u0027, \u0027-p\u0027, system.pwd_file,"},{"line_number":96,"context_line":"                           system.COUCHBASE_DUMP_DIR]"},{"line_number":97,"context_line":"                utils.execute_with_timeout(command)"},{"line_number":98,"context_line":"        except exception.ProcessExecutionError as p:"},{"line_number":99,"context_line":"            LOG.error(p)"},{"line_number":100,"context_line":"            raise p"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_d0790b94","line":97,"updated":"2014-08-29 14:28:29.000000000","message":"Can we use the root_helper parameter here too?","commit_id":"07cb7b89bf51c8e51225baaeb4badd63bf48fd71"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8720ff5fe5742299810e6ff4a61ad6e057034363","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        Creates backup dump dir, tars it up, and encrypts it."},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        cmd \u003d \u0027tar cpPf - \u0027 + system.COUCHBASE_DUMP_DIR"},{"line_number":53,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _save_buckets_config(self, password):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_e047a375","line":52,"updated":"2014-09-09 15:50:38.000000000","message":"this should also be using a list rather than a string?","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"78d7bcff17a52bae6f4b5da1218f25620936623e","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        Creates backup dump dir, tars it up, and encrypts it."},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        cmd \u003d \u0027tar cpPf - \u0027 + system.COUCHBASE_DUMP_DIR"},{"line_number":53,"context_line":"        return cmd + self.zip_cmd + self.encrypt_cmd"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _save_buckets_config(self, password):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_f695ad88","line":52,"in_reply_to":"fa98f980_e047a375","updated":"2014-09-09 16:18:54.000000000","message":"It would be but that would be in a different fix. All that is being changed here is to get the permissions preserved.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8720ff5fe5742299810e6ff4a61ad6e057034363","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _save_buckets_config(self, password):"},{"line_number":56,"context_line":"        url \u003d system.COUCHBASE_REST_API + \u0027/pools/default/buckets\u0027"},{"line_number":57,"context_line":"        utils.execute_with_timeout(\u0027curl -u root:\u0027 + password +"},{"line_number":58,"context_line":"                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + OUTFILE,"},{"line_number":59,"context_line":"                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_8031770d","line":57,"updated":"2014-09-09 15:50:38.000000000","message":"use a list rather than a string.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"78d7bcff17a52bae6f4b5da1218f25620936623e","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _save_buckets_config(self, password):"},{"line_number":56,"context_line":"        url \u003d system.COUCHBASE_REST_API + \u0027/pools/default/buckets\u0027"},{"line_number":57,"context_line":"        utils.execute_with_timeout(\u0027curl -u root:\u0027 + password +"},{"line_number":58,"context_line":"                                   \u0027 \u0027 + url + \u0027 \u003e \u0027 + OUTFILE,"},{"line_number":59,"context_line":"                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_36901595","line":57,"in_reply_to":"fa98f980_8031770d","updated":"2014-09-09 16:18:54.000000000","message":"in another fix.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8720ff5fe5742299810e6ff4a61ad6e057034363","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _backup(self, password):"},{"line_number":62,"context_line":"        utils.execute_with_timeout([\u0027/opt/couchbase/bin/cbbackup \u0027,"},{"line_number":63,"context_line":"                                    system.COUCHBASE_REST_API,"},{"line_number":64,"context_line":"                                    system.COUCHBASE_DUMP_DIR,"},{"line_number":65,"context_line":"                                    \u0027-u\u0027, \u0027root\u0027, \u0027-p\u0027, password],"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_402f8fa1","line":62,"updated":"2014-09-09 15:50:38.000000000","message":"the command has a trailing space so I\u0027d expect it to fail.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"78d7bcff17a52bae6f4b5da1218f25620936623e","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _backup(self, password):"},{"line_number":62,"context_line":"        utils.execute_with_timeout([\u0027/opt/couchbase/bin/cbbackup \u0027,"},{"line_number":63,"context_line":"                                    system.COUCHBASE_REST_API,"},{"line_number":64,"context_line":"                                    system.COUCHBASE_DUMP_DIR,"},{"line_number":65,"context_line":"                                    \u0027-u\u0027, \u0027root\u0027, \u0027-p\u0027, password],"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_96ec612b","line":62,"in_reply_to":"fa98f980_402f8fa1","updated":"2014-09-09 16:18:54.000000000","message":"I will be reverting this change","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0ca9bb513bc2b64ccf8620bb7dc00bc752817dca","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                   shell\u003dTrue, timeout\u003d300)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _backup(self, password):"},{"line_number":62,"context_line":"        utils.execute_with_timeout([\u0027/opt/couchbase/bin/cbbackup \u0027,"},{"line_number":63,"context_line":"                                    system.COUCHBASE_REST_API,"},{"line_number":64,"context_line":"                                    system.COUCHBASE_DUMP_DIR,"},{"line_number":65,"context_line":"                                    \u0027-u\u0027, \u0027root\u0027, \u0027-p\u0027, password],"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_561599e3","line":62,"in_reply_to":"fa98f980_96ec612b","updated":"2014-09-09 16:25:22.000000000","message":"Scratch that. THis will be fixed.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"}],"trove/guestagent/strategies/restore/couchbase_impl.py":[{"author":{"_account_id":2807,"name":"Bryan D. Payne","email":"bdpayne@acm.org","username":"bdpayne"},"change_message_id":"2b0f07bcc0286eb951dcf9dfe4ac9a0511177f5a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    Implementation of Restore Strategy for Couchbase."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    __strategy_name__ \u003d \u0027cbbackup\u0027"},{"line_number":38,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xpPf -\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":41,"context_line":"        super(CbBackup, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_a6bcb8bc","line":38,"updated":"2014-08-27 17:35:03.000000000","message":"Not sure where this is being used, but it should probably use rootwrap and should be careful to avoid shell\u003dTrue.","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8720ff5fe5742299810e6ff4a61ad6e057034363","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    Implementation of Restore Strategy for Couchbase."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    __strategy_name__ \u003d \u0027cbbackup\u0027"},{"line_number":38,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xpPf -\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":41,"context_line":"        super(CbBackup, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_db0c543e","line":38,"updated":"2014-09-09 15:50:38.000000000","message":"should be changed to a list.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"78d7bcff17a52bae6f4b5da1218f25620936623e","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    Implementation of Restore Strategy for Couchbase."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    __strategy_name__ \u003d \u0027cbbackup\u0027"},{"line_number":38,"context_line":"    base_restore_cmd \u003d \u0027sudo tar xpPf -\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":41,"context_line":"        super(CbBackup, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_d6f6e9f8","line":38,"in_reply_to":"fa98f980_db0c543e","updated":"2014-09-09 16:18:54.000000000","message":"in another fix.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8720ff5fe5742299810e6ff4a61ad6e057034363","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def pre_restore(self):"},{"line_number":44,"context_line":"        try:"},{"line_number":45,"context_line":"            utils.execute_with_timeout(\"rm -rf \" + system.COUCHBASE_DUMP_DIR,"},{"line_number":46,"context_line":"                                       shell\u003dTrue)"},{"line_number":47,"context_line":"        except exception.ProcessExecutionError as p:"},{"line_number":48,"context_line":"            LOG.error(p)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_fb12f856","line":45,"updated":"2014-09-09 15:50:38.000000000","message":"should be changed to a list.","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"78d7bcff17a52bae6f4b5da1218f25620936623e","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def pre_restore(self):"},{"line_number":44,"context_line":"        try:"},{"line_number":45,"context_line":"            utils.execute_with_timeout(\"rm -rf \" + system.COUCHBASE_DUMP_DIR,"},{"line_number":46,"context_line":"                                       shell\u003dTrue)"},{"line_number":47,"context_line":"        except exception.ProcessExecutionError as p:"},{"line_number":48,"context_line":"            LOG.error(p)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_f6dccd76","line":45,"in_reply_to":"fa98f980_fb12f856","updated":"2014-09-09 16:18:54.000000000","message":"in another fix","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"}],"trove/tests/unittests/backup/test_backupagent.py":[{"author":{"_account_id":2807,"name":"Bryan D. Payne","email":"bdpayne@acm.org","username":"bdpayne"},"change_message_id":"2b0f07bcc0286eb951dcf9dfe4ac9a0511177f5a","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        self.assertIsNotNone(cbbackup)"},{"line_number":216,"context_line":"        str_cbbackup_cmd \u003d (\"tar cpPf - /tmp/backups | \""},{"line_number":217,"context_line":"                            \"gzip | openssl enc -aes-256-cbc -salt -pass \""},{"line_number":218,"context_line":"                            \"pass:default_aes_cbc_key\")"},{"line_number":219,"context_line":"        self.assertEqual(str_cbbackup_cmd, cbbackup.cmd)"},{"line_number":220,"context_line":"        self.assertIsNotNone(cbbackup.manifest)"},{"line_number":221,"context_line":"        self.assertIn(\u0027gz.enc\u0027, cbbackup.manifest)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_06cbac53","line":218,"updated":"2014-08-27 17:35:03.000000000","message":"should avoid using shell\u003dTrue","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d86b0102808003fdb46cab75223669f911f45fc","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        self.assertIsNotNone(cbbackup)"},{"line_number":216,"context_line":"        str_cbbackup_cmd \u003d (\"tar cpPf - /tmp/backups | \""},{"line_number":217,"context_line":"                            \"gzip | openssl enc -aes-256-cbc -salt -pass \""},{"line_number":218,"context_line":"                            \"pass:default_aes_cbc_key\")"},{"line_number":219,"context_line":"        self.assertEqual(str_cbbackup_cmd, cbbackup.cmd)"},{"line_number":220,"context_line":"        self.assertIsNotNone(cbbackup.manifest)"},{"line_number":221,"context_line":"        self.assertIn(\u0027gz.enc\u0027, cbbackup.manifest)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_32108c4d","line":218,"in_reply_to":"1abeadc6_06cbac53","updated":"2014-08-29 10:48:05.000000000","message":"Yes, but at this point it is hard to run a pipeline without shell \u003d true","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"}],"trove/tests/unittests/guestagent/test_backups.py":[{"author":{"_account_id":2807,"name":"Bryan D. Payne","email":"bdpayne@acm.org","username":"bdpayne"},"change_message_id":"2b0f07bcc0286eb951dcf9dfe4ac9a0511177f5a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"           \"--ibbackup xtrabackup 2\u003e/tmp/innoprepare.log\")"},{"line_number":70,"context_line":"CRYPTO_KEY \u003d \"default_aes_cbc_key\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"CBBACKUP_CMD \u003d \"tar cpPf - /tmp/backups\""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"CBBACKUP_RESTORE \u003d \"sudo tar xpPf -\""},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_a6e3d8d7","line":72,"updated":"2014-08-27 17:35:03.000000000","message":"should avoid using shell\u003dTrue","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d86b0102808003fdb46cab75223669f911f45fc","unresolved":false,"context_lines":[{"line_number":69,"context_line":"           \"--ibbackup xtrabackup 2\u003e/tmp/innoprepare.log\")"},{"line_number":70,"context_line":"CRYPTO_KEY \u003d \"default_aes_cbc_key\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"CBBACKUP_CMD \u003d \"tar cpPf - /tmp/backups\""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"CBBACKUP_RESTORE \u003d \"sudo tar xpPf -\""},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_7216844a","line":72,"in_reply_to":"1abeadc6_a6e3d8d7","updated":"2014-08-29 10:48:05.000000000","message":"Yes, but it is hard to run a pipeline without it.","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"},{"author":{"_account_id":2807,"name":"Bryan D. Payne","email":"bdpayne@acm.org","username":"bdpayne"},"change_message_id":"2b0f07bcc0286eb951dcf9dfe4ac9a0511177f5a","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"CBBACKUP_CMD \u003d \"tar cpPf - /tmp/backups\""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"CBBACKUP_RESTORE \u003d \"sudo tar xpPf -\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class GuestAgentBackupTest(testtools.TestCase):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_86dedc0f","line":74,"updated":"2014-08-27 17:35:03.000000000","message":"should use rootwrap\n\nshould avoid using shell\u003dTrue","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d86b0102808003fdb46cab75223669f911f45fc","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"CBBACKUP_CMD \u003d \"tar cpPf - /tmp/backups\""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"CBBACKUP_RESTORE \u003d \"sudo tar xpPf -\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class GuestAgentBackupTest(testtools.TestCase):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_b22bbc80","line":74,"in_reply_to":"1abeadc6_86dedc0f","updated":"2014-08-29 10:48:05.000000000","message":"That is on the cards, but not for juno.","commit_id":"8f4c381823dcf56ae5738d1177f7d3867a0e0773"}],"trove/tests/unittests/guestagent/test_couchbase_manager.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"2e477aac7652c646de9a2687de1078fee7bdd762","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def test_write_password_to_file(self):"},{"line_number":139,"context_line":"        # intercept calls to tempfile.mkstemp()"},{"line_number":140,"context_line":"        self.original_mkstemp \u003d tempfile.mkstemp"},{"line_number":141,"context_line":"        tempfile.mkstemp \u003d self.__fake_mkstemp"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        utils.execute_with_timeout \u003d Mock(return_value\u003d0)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_3d0d313f","line":140,"updated":"2014-09-02 17:29:20.000000000","message":"use mock.patch decorator to make sure that tempfile.mkstemp is restored.","commit_id":"29a0580dffaea63ea07b3d7b351258159fcbcb69"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"50f7dd540e96e83f85212e5b4d1b8990a1c8a0e6","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def test_write_password_to_file(self):"},{"line_number":139,"context_line":"        # intercept calls to tempfile.mkstemp()"},{"line_number":140,"context_line":"        self.original_mkstemp \u003d tempfile.mkstemp"},{"line_number":141,"context_line":"        tempfile.mkstemp \u003d self.__fake_mkstemp"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        utils.execute_with_timeout \u003d Mock(return_value\u003d0)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_eea68d0f","line":140,"in_reply_to":"fa98f980_3d0d313f","updated":"2014-09-02 18:17:13.000000000","message":"Done","commit_id":"29a0580dffaea63ea07b3d7b351258159fcbcb69"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"2e477aac7652c646de9a2687de1078fee7bdd762","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        filepermissions \u003d os.stat(self.tempname).st_mode"},{"line_number":149,"context_line":"        self.assertEqual(filepermissions \u0026 0o777, stat.S_IRUSR | stat.S_IWUSR)"},{"line_number":150,"context_line":"        os.unlink(self.tempname)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_080e6934","line":150,"updated":"2014-09-02 17:29:20.000000000","message":"use self.addCleanup to make sure that this happens even if there\u0027s an exception (or assertion failure).","commit_id":"29a0580dffaea63ea07b3d7b351258159fcbcb69"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"50f7dd540e96e83f85212e5b4d1b8990a1c8a0e6","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        filepermissions \u003d os.stat(self.tempname).st_mode"},{"line_number":149,"context_line":"        self.assertEqual(filepermissions \u0026 0o777, stat.S_IRUSR | stat.S_IWUSR)"},{"line_number":150,"context_line":"        os.unlink(self.tempname)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_2eb09542","line":150,"in_reply_to":"fa98f980_080e6934","updated":"2014-09-02 18:17:13.000000000","message":"Done","commit_id":"29a0580dffaea63ea07b3d7b351258159fcbcb69"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"8720ff5fe5742299810e6ff4a61ad6e057034363","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        self.original_mkstemp \u003d tempfile.mkstemp"},{"line_number":148,"context_line":"        self.tempname \u003d None"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        with mock.patch(\u0027tempfile.mkstemp\u0027, self.__fake_mkstemp):"},{"line_number":151,"context_line":"            utils.execute_with_timeout \u003d Mock(return_value\u003d0)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            self.addCleanup(self.__cleanup_tempfile)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_fb3918d9","line":150,"updated":"2014-09-09 15:50:38.000000000","message":"use mock.patch.object","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"78d7bcff17a52bae6f4b5da1218f25620936623e","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        self.original_mkstemp \u003d tempfile.mkstemp"},{"line_number":148,"context_line":"        self.tempname \u003d None"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        with mock.patch(\u0027tempfile.mkstemp\u0027, self.__fake_mkstemp):"},{"line_number":151,"context_line":"            utils.execute_with_timeout \u003d Mock(return_value\u003d0)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            self.addCleanup(self.__cleanup_tempfile)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_bbab1088","line":150,"in_reply_to":"fa98f980_fb3918d9","updated":"2014-09-09 16:18:54.000000000","message":"OK, but how would that be different? (asking since I don\u0027t know, not suggesting that they are the same).","commit_id":"695979bab0f2824771af5c7ddf277a5ebd70c4fb"}]}
