)]}'
{"trove/common/utils.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"598364d74e783e7dc255fd3861fea7dc0f50266d","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    timeout \u003d Timeout(time)"},{"line_number":230,"context_line":"    try:"},{"line_number":231,"context_line":"        import pdb"},{"line_number":232,"context_line":"        pdb.set_trace()"},{"line_number":233,"context_line":"        return execute(*args, **kwargs)"},{"line_number":234,"context_line":"    except exception.ProcessExecutionError as e:"},{"line_number":235,"context_line":"        if log_output_on_error:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_a37ff8a9","line":232,"range":{"start_line":231,"start_character":0,"end_line":232,"end_character":23},"updated":"2016-01-04 23:21:13.000000000","message":"Yeah, this looks like it does not belong to this patch set?","commit_id":"2ad0a7af4990b88eb30bf8aee05a87eb5126b39d"}],"trove/guestagent/common/operating_system.py":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"cd7a3aebfe1e3250bf7cecea3e890b41bac31e8e","unresolved":false,"context_lines":[{"line_number":473,"context_line":""},{"line_number":474,"context_line":"def change_user_group(user, group, recursive\u003dTrue, force\u003dFalse, **kwargs):"},{"line_number":475,"context_line":"    \"\"\"Changes the attributes of an existing user."},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    seealso:: _execute_shell_cmd for valid optional keyword arguments."},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    :param user:         Username."}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_48eade10","line":476,"updated":"2016-01-04 21:12:11.000000000","message":"Ishita, please check the usermod command to add a more specific definition of what this command does. I dont think this captures that accurately.","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e741439839811c9d2eaebc5bdbcca44b25cc826f","unresolved":false,"context_lines":[{"line_number":473,"context_line":""},{"line_number":474,"context_line":"def change_user_group(user, group, recursive\u003dTrue, force\u003dFalse, **kwargs):"},{"line_number":475,"context_line":"    \"\"\"Changes the attributes of an existing user."},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    seealso:: _execute_shell_cmd for valid optional keyword arguments."},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    :param user:         Username."}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_9ae33da4","line":476,"in_reply_to":"fa69d971_48eade10","updated":"2016-01-04 22:01:29.000000000","message":"Done","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"cd7a3aebfe1e3250bf7cecea3e890b41bac31e8e","unresolved":false,"context_lines":[{"line_number":479,"context_line":"    :param user:         Username."},{"line_number":480,"context_line":"    :type user:          string"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    :param group:         Group."},{"line_number":483,"context_line":"    :type group:          string"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    :param recursive:    Operate on files and directories recursively."},{"line_number":486,"context_line":"    :type recursive:     boolean"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_2da3fc50","line":483,"range":{"start_line":482,"start_character":13,"end_line":483,"end_character":13},"updated":"2016-01-04 21:12:11.000000000","message":"Could you add a little more to this definition","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e741439839811c9d2eaebc5bdbcca44b25cc826f","unresolved":false,"context_lines":[{"line_number":479,"context_line":"    :param user:         Username."},{"line_number":480,"context_line":"    :type user:          string"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    :param group:         Group."},{"line_number":483,"context_line":"    :type group:          string"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    :param recursive:    Operate on files and directories recursively."},{"line_number":486,"context_line":"    :type recursive:     boolean"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_1ae66db0","line":483,"range":{"start_line":482,"start_character":13,"end_line":483,"end_character":13},"in_reply_to":"fa69d971_2da3fc50","updated":"2016-01-04 22:01:29.000000000","message":"Done","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"cd7a3aebfe1e3250bf7cecea3e890b41bac31e8e","unresolved":false,"context_lines":[{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    :raises:             :class:`UnprocessableEntity` if path not given."},{"line_number":492,"context_line":"    :raises:             :class:`UnprocessableEntity` if owner/group not given."},{"line_number":493,"context_line":"    \"\"\""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    options \u003d ((\u0027f\u0027, force), (\u0027R\u0027, recursive), (\u0027a\u0027, add), (\u0027G\u0027, group))"},{"line_number":496,"context_line":"    _execute_shell_cmd(\u0027usermod\u0027, options, user, group, **kwargs)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_ed508460","line":493,"range":{"start_line":493,"start_character":4,"end_line":493,"end_character":7},"updated":"2016-01-04 21:12:11.000000000","message":"This exception is not being raised in this function. Moreover, path is not an attribute being passed to this function.","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e741439839811c9d2eaebc5bdbcca44b25cc826f","unresolved":false,"context_lines":[{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    :raises:             :class:`UnprocessableEntity` if path not given."},{"line_number":492,"context_line":"    :raises:             :class:`UnprocessableEntity` if owner/group not given."},{"line_number":493,"context_line":"    \"\"\""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    options \u003d ((\u0027f\u0027, force), (\u0027R\u0027, recursive), (\u0027a\u0027, add), (\u0027G\u0027, group))"},{"line_number":496,"context_line":"    _execute_shell_cmd(\u0027usermod\u0027, options, user, group, **kwargs)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_bae08197","line":493,"range":{"start_line":493,"start_character":4,"end_line":493,"end_character":7},"in_reply_to":"fa69d971_ed508460","updated":"2016-01-04 22:01:29.000000000","message":"Done","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"36e615d355b60630f3e5f6e6a70c5bb69e5c34ad","unresolved":false,"context_lines":[{"line_number":492,"context_line":"    :raises:             :class:`UnprocessableEntity` if owner/group not given."},{"line_number":493,"context_line":"    \"\"\""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    options \u003d ((\u0027f\u0027, force), (\u0027R\u0027, recursive), (\u0027a\u0027, add), (\u0027G\u0027, group))"},{"line_number":496,"context_line":"    _execute_shell_cmd(\u0027usermod\u0027, options, user, group, **kwargs)"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_dbd1f7ce","line":495,"range":{"start_line":495,"start_character":53,"end_line":495,"end_character":56},"updated":"2015-12-31 22:15:42.000000000","message":"Where is this coming from?","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e741439839811c9d2eaebc5bdbcca44b25cc826f","unresolved":false,"context_lines":[{"line_number":492,"context_line":"    :raises:             :class:`UnprocessableEntity` if owner/group not given."},{"line_number":493,"context_line":"    \"\"\""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    options \u003d ((\u0027f\u0027, force), (\u0027R\u0027, recursive), (\u0027a\u0027, add), (\u0027G\u0027, group))"},{"line_number":496,"context_line":"    _execute_shell_cmd(\u0027usermod\u0027, options, user, group, **kwargs)"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_7bf80b4a","line":495,"range":{"start_line":495,"start_character":53,"end_line":495,"end_character":56},"in_reply_to":"fa69d971_dbd1f7ce","updated":"2016-01-04 22:01:29.000000000","message":"Not sure I understood your question right, Petr. I added the -a and -G options here since those are the options that were in the system call to add the user to the group. Reference - https://github.com/openstack/trove/blob/master/trove/guestagent/datastore/experimental/couchdb/system.py#L21 and http://www.tecmint.com/usermod-command-examples/ Point 6.","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"598364d74e783e7dc255fd3861fea7dc0f50266d","unresolved":false,"context_lines":[{"line_number":472,"context_line":""},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"def change_user_group(user, group, recursive\u003dTrue, force\u003dFalse, append\u003dTrue,"},{"line_number":475,"context_line":"                      Group\u003dTrue, **kwargs):"},{"line_number":476,"context_line":"    \"\"\"Adds a user to one of the groups by using the usermod linux command"},{"line_number":477,"context_line":"    with -a and -G options."},{"line_number":478,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_a39138f3","line":475,"range":{"start_line":475,"start_character":22,"end_line":475,"end_character":27},"updated":"2016-01-04 23:21:13.000000000","message":"The variable name should probably be lowercase. You could call it something like \u0027add_group\u0027...","commit_id":"2ad0a7af4990b88eb30bf8aee05a87eb5126b39d"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"598364d74e783e7dc255fd3861fea7dc0f50266d","unresolved":false,"context_lines":[{"line_number":474,"context_line":"def change_user_group(user, group, recursive\u003dTrue, force\u003dFalse, append\u003dTrue,"},{"line_number":475,"context_line":"                      Group\u003dTrue, **kwargs):"},{"line_number":476,"context_line":"    \"\"\"Adds a user to one of the groups by using the usermod linux command"},{"line_number":477,"context_line":"    with -a and -G options."},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    seealso:: _execute_shell_cmd for valid optional keyword arguments."},{"line_number":480,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_03db64ed","line":477,"updated":"2016-01-04 23:21:13.000000000","message":"I think it would be nice to add a single-line description of \u0027-a\u0027 and \u0027-G\u0027 flags to the parameter list below (as we do with \u0027force\u0027 and \u0027recursive\u0027) for somebody who is not familiar with the \u0027usermod\u0027 command.\n\nI guess this could be noted in the comment as well.\n\n\"Be careful, while adding a new groups to an existing user with ‘-G’ option alone, will remove all existing groups that user belongs. So, always add the ‘-a‘ (append) with ‘-G‘ option to add or append new groups.\"","commit_id":"2ad0a7af4990b88eb30bf8aee05a87eb5126b39d"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"a5350f7e848edc8d3c077ca9d526ad15a7d85461","unresolved":false,"context_lines":[{"line_number":472,"context_line":""},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"def change_user_group(user, group, recursive\u003dTrue, force\u003dFalse, append\u003dTrue,"},{"line_number":475,"context_line":"                      add_group\u003dTrue, **kwargs):"},{"line_number":476,"context_line":"    \"\"\"Adds a user to one of the groups by using the usermod linux command"},{"line_number":477,"context_line":"    with -a and -G options."},{"line_number":478,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa69d971_2a440d19","line":475,"updated":"2016-01-05 20:38:45.000000000","message":"I dont think we need the recursive and force variables here. They dont apply to users, only to files and directories","commit_id":"658d56a7e1e071202ff7434b0e5d78f3c7a336cc"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"a5350f7e848edc8d3c077ca9d526ad15a7d85461","unresolved":false,"context_lines":[{"line_number":475,"context_line":"                      add_group\u003dTrue, **kwargs):"},{"line_number":476,"context_line":"    \"\"\"Adds a user to one of the groups by using the usermod linux command"},{"line_number":477,"context_line":"    with -a and -G options."},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    seealso:: _execute_shell_cmd for valid optional keyword arguments."},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"    :param user:         Username."}],"source_content_type":"text/x-python","patch_set":10,"id":"fa69d971_078102c3","line":478,"updated":"2016-01-05 20:38:45.000000000","message":"Using the -G option, user can specify a list of groups. But according to the function definition, looks like user can only be added to one group.","commit_id":"658d56a7e1e071202ff7434b0e5d78f3c7a336cc"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"a5350f7e848edc8d3c077ca9d526ad15a7d85461","unresolved":false,"context_lines":[{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    :param add_group:    Adds a group"},{"line_number":497,"context_line":"    :type add_group:     boolean"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"    :raises:             :class:`UnprocessableEntity` if user or group not"},{"line_number":500,"context_line":"                         given."},{"line_number":501,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa69d971_0a1ee95e","line":498,"updated":"2016-01-05 20:38:45.000000000","message":"Ishita, the -G options does not add a group. It list the groups that the user is a member of. This is the place where you could also add the note that Petr mentioned in the last patch about using caution to add an existing user to a new group.","commit_id":"658d56a7e1e071202ff7434b0e5d78f3c7a336cc"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"cddcc410a1ee7654291357095711f50c5614ca64","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        raise exception.UnprocessableEntity(_(\"Missing user.\"))"},{"line_number":505,"context_line":"    elif not group:"},{"line_number":506,"context_line":"        raise exception.UnprocessableEntity(_(\"Missing group.\"))"},{"line_number":507,"context_line":"    import traceback"},{"line_number":508,"context_line":"    print traceback.print_stack() "},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    options \u003d ("},{"line_number":511,"context_line":"        (\u0027f\u0027, force), (\u0027R\u0027, recursive), (\u0027a\u0027, append), (\u0027G\u0027, add_group))"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa69d971_62fb0fc2","line":508,"range":{"start_line":507,"start_character":4,"end_line":508,"end_character":34},"updated":"2016-01-05 19:15:00.000000000","message":"Looks like some debug code that should not be here.","commit_id":"658d56a7e1e071202ff7434b0e5d78f3c7a336cc"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"a5350f7e848edc8d3c077ca9d526ad15a7d85461","unresolved":false,"context_lines":[{"line_number":508,"context_line":"    print traceback.print_stack() "},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    options \u003d ("},{"line_number":511,"context_line":"        (\u0027f\u0027, force), (\u0027R\u0027, recursive), (\u0027a\u0027, append), (\u0027G\u0027, add_group))"},{"line_number":512,"context_line":"    _execute_shell_cmd(\u0027usermod\u0027, options, user, group, **kwargs)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa69d971_2a388d3c","line":511,"updated":"2016-01-05 20:38:45.000000000","message":"-f option doesnt do what it says here. It has something to do with number of days after password expires. As mentioned above, there is no -R option for this command.","commit_id":"658d56a7e1e071202ff7434b0e5d78f3c7a336cc"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"8b678297fd32b6a5562c928fcfee763249ab8a09","unresolved":false,"context_lines":[{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    :param group:           Group name."},{"line_number":484,"context_line":"    :type group:            string"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"    :param  append:         Adds user to a group."},{"line_number":487,"context_line":"    :type append:           boolean"},{"line_number":488,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_3edf6f0e","line":485,"updated":"2016-01-06 19:24:21.000000000","message":"just curious, is there a reason you dont want to make this a list instead? I think a list makes more sense since the usermod command allows that but I will let others weigh in","commit_id":"444d7942ccc78bde48f53ef86625d9ce8de1c71e"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"8b678297fd32b6a5562c928fcfee763249ab8a09","unresolved":false,"context_lines":[{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    options \u003d ((\u0027a\u0027, append), (\u0027G\u0027, add_group))"},{"line_number":507,"context_line":"    _execute_shell_cmd(\u0027usermod\u0027, options, user, group, **kwargs)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"def _build_shell_chmod_mode(mode):"},{"line_number":511,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_bea59fa2","line":508,"updated":"2016-01-06 19:24:21.000000000","message":"you need to pass the group first and then the user. For example: usermod -a -G \u003cgroup\u003e \u003cusername\u003e","commit_id":"444d7942ccc78bde48f53ef86625d9ce8de1c71e"}],"trove/guestagent/datastore/experimental/couchdb/service.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"f3ade66ff4d3a5a51e2c26d049cefc6b1cbe7d08","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                operating_system.chmod(dir, FileMode.ADD_GRP_RW, as_root\u003dTrue)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            self.execute_change_permission_commands("},{"line_number":88,"context_line":"                system.UPDATE_GROUP_MEMBERSHIP"},{"line_number":89,"context_line":"            )"},{"line_number":90,"context_line":"            LOG.debug(\"Successfully changed permissions.\")"},{"line_number":91,"context_line":"        except exception.ProcessExecutionError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_189ee662","line":88,"updated":"2015-08-07 15:41:51.000000000","message":"(0) just a side-note, we may want to make this into a generic \u0027operating_system\u0027 call.","commit_id":"922e22d3e83b0b4dc58131056c62874233cdcc5a"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"cf74343f6024eba84f064d3816d5cca58fcd2823","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                operating_system.chmod(dir, FileMode.ADD_GRP_RW, as_root\u003dTrue)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            self.execute_change_permission_commands("},{"line_number":88,"context_line":"                system.UPDATE_GROUP_MEMBERSHIP"},{"line_number":89,"context_line":"            )"},{"line_number":90,"context_line":"            LOG.debug(\"Successfully changed permissions.\")"},{"line_number":91,"context_line":"        except exception.ProcessExecutionError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_dd85be07","line":88,"in_reply_to":"1a4dcd0f_189ee662","updated":"2015-08-07 22:10:07.000000000","message":"I\u0027ll work on that","commit_id":"922e22d3e83b0b4dc58131056c62874233cdcc5a"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"f3ade66ff4d3a5a51e2c26d049cefc6b1cbe7d08","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _disable_db_on_boot(self):"},{"line_number":102,"context_line":"        try:"},{"line_number":103,"context_line":"            LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":104,"context_line":"            couchdb_service \u003d operating_system.service_discovery("},{"line_number":105,"context_line":"                system.SERVICE_CANDIDATES)"},{"line_number":106,"context_line":"            utils.execute_with_timeout("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_3b14fce6","line":103,"updated":"2015-08-07 15:41:51.000000000","message":"(0) We already have generic \u0027operating_system\u0027 calls for enabling/disabling and starting/stopping a service. We may want to switch to those as well.","commit_id":"922e22d3e83b0b4dc58131056c62874233cdcc5a"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"cf74343f6024eba84f064d3816d5cca58fcd2823","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _disable_db_on_boot(self):"},{"line_number":102,"context_line":"        try:"},{"line_number":103,"context_line":"            LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":104,"context_line":"            couchdb_service \u003d operating_system.service_discovery("},{"line_number":105,"context_line":"                system.SERVICE_CANDIDATES)"},{"line_number":106,"context_line":"            utils.execute_with_timeout("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_5d720e4b","line":103,"in_reply_to":"1a4dcd0f_3b14fce6","updated":"2015-08-07 22:10:07.000000000","message":"Done","commit_id":"922e22d3e83b0b4dc58131056c62874233cdcc5a"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"50598cfb9d6d4a8300562f0a5c2cf891f2ce42e7","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _disable_db_on_boot(self):"},{"line_number":102,"context_line":"        try:"},{"line_number":103,"context_line":"            LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":104,"context_line":"            operating_system.disable_service_on_boot(SERVICE_CANDIDATES)"},{"line_number":105,"context_line":"        except KeyError:"},{"line_number":106,"context_line":"            raise RuntimeError(_("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_1d2fa6f7","line":103,"updated":"2015-08-07 22:13:35.000000000","message":"Unless I missed something you forgot to define SERVICE_CANDIDATES\n\nMaybe you meant system.SERVICE_CANDIDATES","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"8dd40738c48cc231a9bc3bb850942bd892cdae01","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _disable_db_on_boot(self):"},{"line_number":102,"context_line":"        try:"},{"line_number":103,"context_line":"            LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":104,"context_line":"            operating_system.disable_service_on_boot(SERVICE_CANDIDATES)"},{"line_number":105,"context_line":"        except KeyError:"},{"line_number":106,"context_line":"            raise RuntimeError(_("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_7d010a39","line":103,"in_reply_to":"1a4dcd0f_1d2fa6f7","updated":"2015-08-07 22:26:09.000000000","message":"Oops, made the change!","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a848a80726736193a4e5f3a69aecf895cd7c7841","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        try:"},{"line_number":103,"context_line":"            LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":104,"context_line":"            operating_system.disable_service_on_boot(SERVICE_CANDIDATES)"},{"line_number":105,"context_line":"        except KeyError:"},{"line_number":106,"context_line":"            raise RuntimeError(_("},{"line_number":107,"context_line":"                \"Command to disable CouchDB server on boot not found.\"))"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_5d73ee15","line":105,"updated":"2015-08-07 22:16:20.000000000","message":"No longer needed - the service command will handle it.","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"8dd40738c48cc231a9bc3bb850942bd892cdae01","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        try:"},{"line_number":103,"context_line":"            LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":104,"context_line":"            operating_system.disable_service_on_boot(SERVICE_CANDIDATES)"},{"line_number":105,"context_line":"        except KeyError:"},{"line_number":106,"context_line":"            raise RuntimeError(_("},{"line_number":107,"context_line":"                \"Command to disable CouchDB server on boot not found.\"))"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_3d2e22a6","line":105,"in_reply_to":"1a4dcd0f_5d73ee15","updated":"2015-08-07 22:26:09.000000000","message":"Done","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a848a80726736193a4e5f3a69aecf895cd7c7841","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        try:"},{"line_number":111,"context_line":"            LOG.debug(\"Enable CouchDB on boot.\")"},{"line_number":112,"context_line":"            operating_system.enable_service_on_boot(SERVICE_CANDIDATES)"},{"line_number":113,"context_line":"        except KeyError:"},{"line_number":114,"context_line":"            raise RuntimeError(_("},{"line_number":115,"context_line":"                \"Command to disable CouchDB server on boot not found.\"))"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_3d762207","line":113,"updated":"2015-08-07 22:16:20.000000000","message":"No longer needed - the service command will handle it.","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"8dd40738c48cc231a9bc3bb850942bd892cdae01","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        try:"},{"line_number":111,"context_line":"            LOG.debug(\"Enable CouchDB on boot.\")"},{"line_number":112,"context_line":"            operating_system.enable_service_on_boot(SERVICE_CANDIDATES)"},{"line_number":113,"context_line":"        except KeyError:"},{"line_number":114,"context_line":"            raise RuntimeError(_("},{"line_number":115,"context_line":"                \"Command to disable CouchDB server on boot not found.\"))"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_5d2bee94","line":113,"in_reply_to":"1a4dcd0f_3d762207","updated":"2015-08-07 22:26:09.000000000","message":"Done","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a848a80726736193a4e5f3a69aecf895cd7c7841","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        try:"},{"line_number":123,"context_line":"            operating_system.stop_service(SERVICE_CANDIDATES)"},{"line_number":124,"context_line":"        except KeyError:"},{"line_number":125,"context_line":"            raise RuntimeError(_(\"CouchDB service is not discovered.\"))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        if not self.status.wait_for_real_status_to_change_to("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_9d697628","line":124,"updated":"2015-08-07 22:16:20.000000000","message":"No longer needed - the service command will handle it.","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"8dd40738c48cc231a9bc3bb850942bd892cdae01","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        try:"},{"line_number":123,"context_line":"            operating_system.stop_service(SERVICE_CANDIDATES)"},{"line_number":124,"context_line":"        except KeyError:"},{"line_number":125,"context_line":"            raise RuntimeError(_(\"CouchDB service is not discovered.\"))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        if not self.status.wait_for_real_status_to_change_to("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_fd167a57","line":124,"in_reply_to":"1a4dcd0f_9d697628","updated":"2015-08-07 22:26:09.000000000","message":"Done","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a848a80726736193a4e5f3a69aecf895cd7c7841","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            operating_system.start_service(SERVICE_CANDIDATES)"},{"line_number":143,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":144,"context_line":"            pass"},{"line_number":145,"context_line":"        except KeyError:"},{"line_number":146,"context_line":"            raise RuntimeError(_(\"Command to start CouchDB server not found.\"))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if not self.status.wait_for_real_status_to_change_to("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_fd5e7a78","line":145,"updated":"2015-08-07 22:16:20.000000000","message":"No longer needed - the service command will handle it.","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"8dd40738c48cc231a9bc3bb850942bd892cdae01","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            operating_system.start_service(SERVICE_CANDIDATES)"},{"line_number":143,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":144,"context_line":"            pass"},{"line_number":145,"context_line":"        except KeyError:"},{"line_number":146,"context_line":"            raise RuntimeError(_(\"Command to start CouchDB server not found.\"))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        if not self.status.wait_for_real_status_to_change_to("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_1d1c8676","line":145,"in_reply_to":"1a4dcd0f_fd5e7a78","updated":"2015-08-07 22:26:09.000000000","message":"Done","commit_id":"2d9b63d6cba741fe31d9aac3e39ac92c5850e49b"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"81fb865ad34d6c51614bf150c245a805b7481734","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            utils.execute_with_timeout("},{"line_number":169,"context_line":"                couchdb_service[\u0027cmd_start\u0027], shell\u003dTrue)"},{"line_number":170,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":171,"context_line":"            pass"},{"line_number":172,"context_line":"        except KeyError:"},{"line_number":173,"context_line":"            raise RuntimeError(\"Command to start CouchDB server not found.\")"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_dce26401","side":"PARENT","line":171,"updated":"2015-08-10 15:10:13.000000000","message":"Honestly. This smells very bad to me. The current start_db_error relies on this behaviour, but eating the cause is just not good.","commit_id":"67b68a9bccb7b3ede30275f545152e4e5d780a88"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"f7e6c246db456129fa53d52de3c44d0291ef77b4","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _disable_db_on_boot(self):"},{"line_number":102,"context_line":"        LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":103,"context_line":"        operating_system.disable_service_on_boot(system.SERVICE_CANDIDATES)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _enable_db_on_boot(self):"},{"line_number":106,"context_line":"        LOG.debug(\"Enable CouchDB on boot.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_0d23d406","line":103,"updated":"2015-08-10 07:53:39.000000000","message":"Why are you removing exception handling, we still need to track the exceptions raised and handle accordingly.","commit_id":"1438f8dd05277f69ab552679009a25b7a667c4eb"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"0f4094c26f45be76f47e18bee2970dabd61eaa0b","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _disable_db_on_boot(self):"},{"line_number":102,"context_line":"        LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":103,"context_line":"        operating_system.disable_service_on_boot(system.SERVICE_CANDIDATES)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _enable_db_on_boot(self):"},{"line_number":106,"context_line":"        LOG.debug(\"Enable CouchDB on boot.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_cebab8c0","line":103,"in_reply_to":"1a4dcd0f_0d23d406","updated":"2015-08-10 12:11:34.000000000","message":"Because the operating_system call already does that.","commit_id":"1438f8dd05277f69ab552679009a25b7a667c4eb"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"a6d5300aa33f34f4451ebb253889e36e56dd28d4","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _disable_db_on_boot(self):"},{"line_number":102,"context_line":"        LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":103,"context_line":"        operating_system.disable_service_on_boot(system.SERVICE_CANDIDATES)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _enable_db_on_boot(self):"},{"line_number":106,"context_line":"        LOG.debug(\"Enable CouchDB on boot.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_f370b8a6","line":103,"in_reply_to":"1a4dcd0f_cebab8c0","updated":"2015-08-10 13:12:29.000000000","message":"there are no try..exception handling blocks here in the operating_system calls\n\nhttps://github.com/openstack/trove/blob/master/trove/guestagent/common/operating_system.py#L233-L271","commit_id":"1438f8dd05277f69ab552679009a25b7a667c4eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"3d277e2b64272f53a3b2c9e5c99631c6ef56a775","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _disable_db_on_boot(self):"},{"line_number":102,"context_line":"        LOG.debug(\"Disable CouchDB on boot.\")"},{"line_number":103,"context_line":"        operating_system.disable_service_on_boot(system.SERVICE_CANDIDATES)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _enable_db_on_boot(self):"},{"line_number":106,"context_line":"        LOG.debug(\"Enable CouchDB on boot.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_810311b8","line":103,"in_reply_to":"1a4dcd0f_f370b8a6","updated":"2015-08-10 18:58:56.000000000","message":"I felt like the RuntimeError and the exception.UnprocessableEntity in the ooperating_system calls would cover all cases and that\u0027s why the exceptions wouldn\u0027t be necessary over here.","commit_id":"1438f8dd05277f69ab552679009a25b7a667c4eb"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"f7e6c246db456129fa53d52de3c44d0291ef77b4","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        LOG.info(_(\"Starting CouchDB server.\"))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        self._enable_db_on_boot()"},{"line_number":130,"context_line":"        operating_system.start_service(system.SERVICE_CANDIDATES)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        if not self.status.wait_for_real_status_to_change_to("},{"line_number":133,"context_line":"                rd_instance.ServiceStatuses.RUNNING,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_ad48a0cd","line":130,"updated":"2015-08-10 07:53:39.000000000","message":"the test \"guestagent.test_dbaas.CouchDBAppTest.test_start_db_error\" is failing which reveals that one needs to either keep the exception handling or update the test accordingly.","commit_id":"1438f8dd05277f69ab552679009a25b7a667c4eb"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"3d277e2b64272f53a3b2c9e5c99631c6ef56a775","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        LOG.info(_(\"Starting CouchDB server.\"))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        self._enable_db_on_boot()"},{"line_number":130,"context_line":"        operating_system.start_service(system.SERVICE_CANDIDATES)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        if not self.status.wait_for_real_status_to_change_to("},{"line_number":133,"context_line":"                rd_instance.ServiceStatuses.RUNNING,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_0ea409b7","line":130,"in_reply_to":"1a4dcd0f_ad48a0cd","updated":"2015-08-10 18:58:56.000000000","message":"I will look into this and get back.","commit_id":"1438f8dd05277f69ab552679009a25b7a667c4eb"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"f989806781afd71dd473e37d38f3de095521a8b7","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                operating_system.chown(dir, \u0027couchdb\u0027, \u0027couchdb\u0027, as_root\u003dTrue)"},{"line_number":85,"context_line":"                operating_system.chmod(dir, FileMode.ADD_GRP_RW, as_root\u003dTrue)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            operating_system.change_user_group(\u0027couchdb\u0027, \u0027couchdb\u0027,"},{"line_number":88,"context_line":"                                               as_root\u003dTrue)"},{"line_number":89,"context_line":"            LOG.debug(\"Successfully changed permissions.\")"},{"line_number":90,"context_line":"        except exception.ProcessExecutionError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_dd933cf9","line":87,"updated":"2015-11-09 15:53:45.000000000","message":"This call is not implemented in the \u0027operating_system\u0027 module. You will need to add it.\nYou can just modify the original shell command from the \u0027system\u0027 module and look at how other calls and \u0027_execute_shell_cmd\u0027 in the \u0027operating_system\u0027 module work.","commit_id":"9edfb14aff20a39e17117d859571b68d2c636fee"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"3f2ee3e633a88dc151802dddd0bbfdd437c96f8d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                operating_system.chown(dir, \u0027couchdb\u0027, \u0027couchdb\u0027, as_root\u003dTrue)"},{"line_number":85,"context_line":"                operating_system.chmod(dir, FileMode.ADD_GRP_RW, as_root\u003dTrue)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            operating_system.change_user_group(\u0027couchdb\u0027, \u0027couchdb\u0027,"},{"line_number":88,"context_line":"                                               as_root\u003dTrue)"},{"line_number":89,"context_line":"            LOG.debug(\"Successfully changed permissions.\")"},{"line_number":90,"context_line":"        except exception.ProcessExecutionError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_9363651a","line":87,"in_reply_to":"da85f559_dd933cf9","updated":"2015-11-09 16:16:46.000000000","message":"You\u0027re right - I couldn\u0027t find this either.  Probably best to leave this part as it was.","commit_id":"9edfb14aff20a39e17117d859571b68d2c636fee"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"908ab96b5b1d49ca5773fbaebe177c0f4d127889","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                operating_system.chown(dir, \u0027couchdb\u0027, \u0027couchdb\u0027, as_root\u003dTrue)"},{"line_number":79,"context_line":"                operating_system.chmod(dir, FileMode.ADD_GRP_RW, as_root\u003dTrue)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"            operating_system.change_user_group(\u0027couchdb\u0027, \u0027couchdb\u0027,"},{"line_number":82,"context_line":"                                               as_root\u003dTrue)"},{"line_number":83,"context_line":"            LOG.debug(\"Successfully changed permissions.\")"},{"line_number":84,"context_line":"        except exception.ProcessExecutionError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_03510ed8","line":81,"range":{"start_line":81,"start_character":29,"end_line":81,"end_character":46},"updated":"2015-12-18 19:29:19.000000000","message":"Still needs fixing this. The call currently does not exist.\n\nYou will have to either:\n a) Implement it in the \u0027operating_system\u0027 module (just see how other calls and \u0027_execute_shell_cmd()\u0027 work).\n b) Put this particular call back to the original for (execute a shell call using the utils).\n\nPersonally, I would probably prefer \u0027a\u0027 so that other datastores can use it as well, but neither is bad and \u0027b\u0027 should be a bit simpler.","commit_id":"c13d4ca00279d95caa3aeb73d09d2dd2c05254cd"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"cd7a3aebfe1e3250bf7cecea3e890b41bac31e8e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            LOG.exception(_(\"Error changing permissions.\"))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def execute_change_permission_commands(self, chng_perm_cmd):"},{"line_number":88,"context_line":"        out, err \u003d utils.execute_with_timeout(chng_perm_cmd, shell\u003dTrue)"},{"line_number":89,"context_line":"        if err:"},{"line_number":90,"context_line":"            raise exception.ProcessExecutionError(cmd\u003dchng_perm_cmd,"},{"line_number":91,"context_line":"                                                  stderr\u003derr,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_0d84f8d1","line":88,"range":{"start_line":88,"start_character":0,"end_line":88,"end_character":8},"updated":"2016-01-04 21:12:11.000000000","message":"If you are going to use the new operating_system function, then this function is no longer needed here.","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"e741439839811c9d2eaebc5bdbcca44b25cc826f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            LOG.exception(_(\"Error changing permissions.\"))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def execute_change_permission_commands(self, chng_perm_cmd):"},{"line_number":88,"context_line":"        out, err \u003d utils.execute_with_timeout(chng_perm_cmd, shell\u003dTrue)"},{"line_number":89,"context_line":"        if err:"},{"line_number":90,"context_line":"            raise exception.ProcessExecutionError(cmd\u003dchng_perm_cmd,"},{"line_number":91,"context_line":"                                                  stderr\u003derr,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_88abf61c","line":88,"range":{"start_line":88,"start_character":0,"end_line":88,"end_character":8},"in_reply_to":"fa69d971_0d84f8d1","updated":"2016-01-04 22:01:29.000000000","message":"Done","commit_id":"a8f947c8d89ae2f6c71533cc5479e30b45a55e4c"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"5b66bdfd0869d2a5bf91bec49bbc72b1d4d2b6b5","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":86,"context_line":"            LOG.exception(_(\"Error changing permissions.\"))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def execute_change_permission_commands(self, chng_perm_cmd):"},{"line_number":89,"context_line":"        out, err \u003d utils.execute_with_timeout(chng_perm_cmd, shell\u003dTrue)"},{"line_number":90,"context_line":"        if err:"},{"line_number":91,"context_line":"            raise exception.ProcessExecutionError(cmd\u003dchng_perm_cmd,"},{"line_number":92,"context_line":"                                                  stderr\u003derr,"},{"line_number":93,"context_line":"                                                  stdout\u003dout)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def stop_db(self, update_db\u003dFalse, do_not_start_on_reboot\u003dFalse):"},{"line_number":96,"context_line":"        self.status.stop_db_service("}],"source_content_type":"text/x-python","patch_set":15,"id":"fa69d971_10aa2586","line":93,"range":{"start_line":88,"start_character":4,"end_line":93,"end_character":61},"updated":"2016-01-08 01:14:52.000000000","message":"Seems like this is not being used anywhere.","commit_id":"ff7ae74283b19b8b0e0910eca6ec1c2c21eb81ce"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"4dbfc05099ffd49364e29359ad21b7afdbdc8729","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                operating_system.chmod(dir, FileMode.ADD_GRP_RW, as_root\u003dTrue)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            operating_system.change_user_group(\u0027couchdb\u0027, \u0027couchdb\u0027,"},{"line_number":83,"context_line":"                                               as_root\u003dTrue)"},{"line_number":84,"context_line":"            LOG.debug(\"Successfully changed permissions.\")"},{"line_number":85,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":86,"context_line":"            LOG.exception(_(\"Error changing permissions.\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa69d971_f7494ed1","line":83,"updated":"2016-01-08 14:11:25.000000000","message":"In this case you are passing the user as \u0027couchdb\u0027 to be added to the group \u0027couchdb\u0027. By default \u0027couchdb\u0027 user is a member of group \u0027couchdb\u0027. This was meant to add trove user  to the \u0027couchdb\u0027 group so that it could run the couchdb services.","commit_id":"daa02f7aec30e9b308d5b03c5afae6762f387f85"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"8a44e6db7dbb91ae23149b419b5d765872fb708b","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                operating_system.chmod(dir, FileMode.ADD_GRP_RW, as_root\u003dTrue)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            operating_system.change_user_group(\u0027couchdb\u0027, \u0027couchdb\u0027,"},{"line_number":83,"context_line":"                                               as_root\u003dTrue)"},{"line_number":84,"context_line":"            LOG.debug(\"Successfully changed permissions.\")"},{"line_number":85,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":86,"context_line":"            LOG.exception(_(\"Error changing permissions.\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa69d971_306d9e04","line":83,"in_reply_to":"fa69d971_b04e6ebf","updated":"2016-01-08 19:01:45.000000000","message":"You may not even need to use a shell call. There apparently is a portable Python way to get you the current user: https://docs.python.org/2/library/getpass.html","commit_id":"daa02f7aec30e9b308d5b03c5afae6762f387f85"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"40688ca2e595b4f825d1656ede63dc763d4a3563","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                operating_system.chmod(dir, FileMode.ADD_GRP_RW, as_root\u003dTrue)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            operating_system.change_user_group(\u0027couchdb\u0027, \u0027couchdb\u0027,"},{"line_number":83,"context_line":"                                               as_root\u003dTrue)"},{"line_number":84,"context_line":"            LOG.debug(\"Successfully changed permissions.\")"},{"line_number":85,"context_line":"        except exception.ProcessExecutionError:"},{"line_number":86,"context_line":"            LOG.exception(_(\"Error changing permissions.\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa69d971_b04e6ebf","line":83,"in_reply_to":"fa69d971_f7494ed1","updated":"2016-01-08 18:58:54.000000000","message":"I think @mariam is right. You will probably need to add another operating_system function to return the current user (whoami) and pass the result in instead of \u0027couchdb\u0027.","commit_id":"daa02f7aec30e9b308d5b03c5afae6762f387f85"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"d28b3fefef466ece3fef04ba140e08b61edcc95f","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import json"},{"line_number":17,"context_line":"import getpass"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from trove.common import cfg"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa69d971_cd0ca044","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":14},"updated":"2016-01-09 00:19:42.000000000","message":"This needs to the the first import to be in alphabetical order (pep8 will complain about this).","commit_id":"19eecc8aff53b03fa9cca329ea63c350946f4cab"}],"trove/tests/unittests/guestagent/test_dbaas.py":[{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"cb5417364d14f47db704f9346086623e3c6c2596","unresolved":false,"context_lines":[{"line_number":2509,"context_line":"        self.couchdbApp._enable_db_on_boot \u003d Mock()"},{"line_number":2510,"context_line":""},{"line_number":2511,"context_line":"        self.assertRaises(RuntimeError, self.couchdbApp.start_db)"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def test_install_when_couchdb_installed(self):"},{"line_number":2514,"context_line":"        couchdb_service.packager.pkg_is_installed \u003d Mock(return_value\u003dTrue)"},{"line_number":2515,"context_line":"        couchdb_service.utils.execute_with_timeout \u003d Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_dcac05ef","line":2512,"updated":"2015-08-13 08:07:21.000000000","message":"we shall use assertRaisesRegexp because RunTimeError could be raised from more than one taskflow.","commit_id":"8f2dfd26688fd0e38c56c7444582fbe901877043"},{"author":{"_account_id":17360,"name":"Ishita Mandhan","email":"imandha@us.ibm.com","username":"imandhan"},"change_message_id":"078d79d057da44b88b77bd37e5a5fb575c35cb52","unresolved":false,"context_lines":[{"line_number":2509,"context_line":"        self.couchdbApp._enable_db_on_boot \u003d Mock()"},{"line_number":2510,"context_line":""},{"line_number":2511,"context_line":"        self.assertRaises(RuntimeError, self.couchdbApp.start_db)"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def test_install_when_couchdb_installed(self):"},{"line_number":2514,"context_line":"        couchdb_service.packager.pkg_is_installed \u003d Mock(return_value\u003dTrue)"},{"line_number":2515,"context_line":"        couchdb_service.utils.execute_with_timeout \u003d Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a2fa921_0d5c5724","line":2512,"in_reply_to":"1a4dcd0f_dcac05ef","updated":"2015-10-05 21:34:03.000000000","message":"Oh I thought we can only raise one exception per test case?","commit_id":"8f2dfd26688fd0e38c56c7444582fbe901877043"}]}
