)]}'
{"trove/guestagent/datastore/cassandra/service.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"c43d08daa892da37dd7be2443f0716d46d2e5834","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                     execute_function\u003dutils.execute_with_timeout,"},{"line_number":123,"context_line":"                     mkstemp_function\u003dtempfile.mkstemp,"},{"line_number":124,"context_line":"                     unlink_function\u003dos.unlink,"},{"line_number":125,"context_line":"                     access_rights\u003d\"644\"):"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        # first securely create a temp file. mkstemp() will set"},{"line_number":128,"context_line":"        # os.O_EXCL on the open() call, and we get a file with"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_686e76cb","line":125,"updated":"2015-01-31 02:01:32.000000000","message":"Denis, I\u0027ve restored this change with a suggestion for your consideration. Rather than opening permissions on this file to 644, please leave it at 600.","commit_id":"4853406b18537cedd1c7b7d9cdc99d6935368738"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"c43d08daa892da37dd7be2443f0716d46d2e5834","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            os.write(conf_fd, config_contents)"},{"line_number":139,"context_line":"            execute_function(\"sudo\", \"mv\", conf_path, system.CASSANDRA_CONF)"},{"line_number":140,"context_line":"            execute_function(\"sudo\", \"chmod\", access_rights,"},{"line_number":141,"context_line":"                             system.CASSANDRA_CONF)"},{"line_number":142,"context_line":"        except Exception:"},{"line_number":143,"context_line":"            LOG.exception("}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_a8678ee9","line":140,"updated":"2015-01-31 02:01:32.000000000","message":"Rather than chmod here, please consider changing this to chown cassandra:cassandra or system.CASSANDRA_USER if you want to go that route.","commit_id":"4853406b18537cedd1c7b7d9cdc99d6935368738"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"b87243fee341d7236a1baab248dd48542bca8229","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            os.write(conf_fd, config_contents)"},{"line_number":139,"context_line":"            execute_function(\"sudo\", \"mv\", conf_path, system.CASSANDRA_CONF)"},{"line_number":140,"context_line":"            execute_function(\"sudo\", \"chmod\", access_rights,"},{"line_number":141,"context_line":"                             system.CASSANDRA_CONF)"},{"line_number":142,"context_line":"        except Exception:"},{"line_number":143,"context_line":"            LOG.exception("}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_d7fe1f38","line":140,"in_reply_to":"da86d52c_a8678ee9","updated":"2015-01-31 13:25:17.000000000","message":"Will do, thanks.","commit_id":"4853406b18537cedd1c7b7d9cdc99d6935368738"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"12a6c3d222d53b02d9e6bafeeff1ebd478a70bcf","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        try:"},{"line_number":137,"context_line":"            os.write(conf_fd, config_contents)"},{"line_number":138,"context_line":"            execute_function(\"sudo\", \"mv\", conf_path, system.CASSANDRA_CONF)"},{"line_number":139,"context_line":"            #TODO(denis_makogon): figure out the dynamic way to discover"},{"line_number":140,"context_line":"            # configs owner since it can cause errors if there"},{"line_number":141,"context_line":"            # no cassandra user in operating system"},{"line_number":142,"context_line":"            execute_function(\"sudo\", \"chown\","}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_16d97857","line":139,"updated":"2015-02-02 14:09:13.000000000","message":"denis, I wasn\u0027t able to go into more details last week but my proposal for a bigger fix went thus.\n\n(a) you can import pwd and use pwd.getpwnam(name) to get the uid and then you can use os.chown. Or you could use pwd.getpwnam() to interrogate the password database and figure out what you need.\n\n(b) optionally you could look at the system at this stage (where cassandra is already installed) and figure out who the user is who will run cassandra by looking at things that the install process finished.\n\nI was going to implement this with some help from the DIB (optional) and some code here in write_config().\n\nBut I figured that it may make more sense to put the code in the guest earlier in prepare() and set a config parameter based on what one found there.\n\nI have much of the code done but you wanted this change in a hurry to get past the blocks in cassandra clustering so I suggested this short term fix.\n\nThe \"discovery\" you refer to is already done. Let this change go ahead and I can fill in the rest of the changes later if you\u0027d like.","commit_id":"37e95facd9016edad1b7b03260ecf62ef2a4a92c"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"7b2608569e1f1e4b1c202a89b821881d7fde42c9","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        try:"},{"line_number":137,"context_line":"            os.write(conf_fd, config_contents)"},{"line_number":138,"context_line":"            execute_function(\"sudo\", \"mv\", conf_path, system.CASSANDRA_CONF)"},{"line_number":139,"context_line":"            #TODO(denis_makogon): figure out the dynamic way to discover"},{"line_number":140,"context_line":"            # configs owner since it can cause errors if there"},{"line_number":141,"context_line":"            # no cassandra user in operating system"},{"line_number":142,"context_line":"            execute_function(\"sudo\", \"chown\","}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_625e6a47","line":139,"in_reply_to":"da86d52c_16d97857","updated":"2015-02-02 15:16:38.000000000","message":"Thanks, if i can help you in any way, just let me know.","commit_id":"37e95facd9016edad1b7b03260ecf62ef2a4a92c"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"15f0bd53867e83aa174e0fc1b4aa11e1cf849b4c","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            execute_function(\"sudo\", \"mv\", conf_path, system.CASSANDRA_CONF)"},{"line_number":139,"context_line":"            #TODO(denis_makogon): figure out the dynamic way to discover"},{"line_number":140,"context_line":"            # configs owner since it can cause errors if there"},{"line_number":141,"context_line":"            # no cassandra user in operating system"},{"line_number":142,"context_line":"            execute_function(\"sudo\", \"chown\","},{"line_number":143,"context_line":"                             \"cassandra:cassandra\", system.CASSANDRA_CONF)"},{"line_number":144,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_e86cdd9e","line":141,"updated":"2015-02-03 02:25:22.000000000","message":"\"if there no cassandra ...\" current sentence looks awkward \n\"if there is no cassandra ....\" wud be better fit.","commit_id":"37e95facd9016edad1b7b03260ecf62ef2a4a92c"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"2af2371bf0fc664aeba2cfcd98c7a55ddf390722","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            #TODO(denis_makogon): figure out the dynamic way to discover"},{"line_number":140,"context_line":"            # configs owner since it can cause errors if there is"},{"line_number":141,"context_line":"            # no cassandra user in operating system"},{"line_number":142,"context_line":"            execute_function(\"sudo\", \"chown\","},{"line_number":143,"context_line":"                             \"cassandra:cassandra\", system.CASSANDRA_CONF)"},{"line_number":144,"context_line":"        except Exception:"},{"line_number":145,"context_line":"            LOG.exception("}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_4e8c8cda","line":142,"updated":"2015-02-05 19:26:45.000000000","message":"The permissions would \u0027rw\u0027 for the cassandra user only.\nWe have to make sure the file is still readable by the Trove agent as it will want to access it later.\n\nexecute_function(\"sudo\", \"chmod\", \"a+r\", system.CASSANDRA_CONF)","commit_id":"94f33ed7a4044e4ee0c3fcd552ec03fe528782ae"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"6dd0b837387db058c416038e63cc545cbc31f24f","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            #TODO(denis_makogon): figure out the dynamic way to discover"},{"line_number":140,"context_line":"            # configs owner since it can cause errors if there is"},{"line_number":141,"context_line":"            # no cassandra user in operating system"},{"line_number":142,"context_line":"            execute_function(\"sudo\", \"chown\","},{"line_number":143,"context_line":"                             \"cassandra:cassandra\", system.CASSANDRA_CONF)"},{"line_number":144,"context_line":"        except Exception:"},{"line_number":145,"context_line":"            LOG.exception("}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_c008442a","line":142,"in_reply_to":"da86d52c_4e8c8cda","updated":"2015-02-05 22:26:16.000000000","message":"Makes sense.","commit_id":"94f33ed7a4044e4ee0c3fcd552ec03fe528782ae"}],"trove/tests/unittests/guestagent/test_dbaas.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"11fca8e70b884be09d7a5ae07a2e699e6e257aac","unresolved":false,"context_lines":[{"line_number":1625,"context_line":"        mv.assert_called_with(\"sudo\", \"mv\","},{"line_number":1626,"context_line":"                              temp_config_name,"},{"line_number":1627,"context_line":"                              cass_system.CASSANDRA_CONF)"},{"line_number":1628,"context_line":"        chmod.assert_called_with(\"sudo\", \"chmod\", \"644\","},{"line_number":1629,"context_line":"                                 cass_system.CASSANDRA_CONF)"},{"line_number":1630,"context_line":"        mock_mkstemp.assert_called_once()"},{"line_number":1631,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_c8d92285","line":1628,"updated":"2015-01-31 02:02:58.000000000","message":"this test would change to chown.assert_called_with (...)","commit_id":"4853406b18537cedd1c7b7d9cdc99d6935368738"}]}
