)]}'
{"octavia/amphorae/drivers/haproxy/ssh_driver.py":[{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"32017ab5f91ac2b8e2921012610abc5fca204403","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                         certs[\u0027sni_certs\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # Build a list of commands to send to the exec method"},{"line_number":67,"context_line":"        commands \u003d [\u0027sudo chmod 600 {0}/haproxy.cfg\u0027.format(conf_path),"},{"line_number":68,"context_line":"                    \u0027sudo haproxy -f {0}/haproxy.cfg -p {0}/{1}.pid -sf \u0027"},{"line_number":69,"context_line":"                    \u0027$(cat {0}/{1}.pid)\u0027.format(conf_path, listener.id)]"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_8511a906","line":67,"updated":"2015-05-05 21:56:42.000000000","message":"almost all of that needs to run as root -- why not make the first command sudo su or something?","commit_id":"f2ca1d40e80d1c2486eef5ce844836da69ef08aa"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"02e2b674edda5307eecad2724557d62eefa3f823","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                         certs[\u0027sni_certs\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # Build a list of commands to send to the exec method"},{"line_number":67,"context_line":"        commands \u003d [\u0027sudo chmod 600 {0}/haproxy.cfg\u0027.format(conf_path),"},{"line_number":68,"context_line":"                    \u0027sudo haproxy -f {0}/haproxy.cfg -p {0}/{1}.pid -sf \u0027"},{"line_number":69,"context_line":"                    \u0027$(cat {0}/{1}.pid)\u0027.format(conf_path, listener.id)]"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aca2d91_e9cf747d","line":67,"in_reply_to":"1aca2d91_29a68c10","updated":"2015-05-07 15:28:15.000000000","message":"still not a fan of hardcoding sudo on each command -- I would rather see a function with a run_as_root\u003dTrue which then adds the sudo...","commit_id":"f2ca1d40e80d1c2486eef5ce844836da69ef08aa"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"430caf31520122d9cb675b860d91b9495aef50df","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                         certs[\u0027sni_certs\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # Build a list of commands to send to the exec method"},{"line_number":67,"context_line":"        commands \u003d [\u0027sudo chmod 600 {0}/haproxy.cfg\u0027.format(conf_path),"},{"line_number":68,"context_line":"                    \u0027sudo haproxy -f {0}/haproxy.cfg -p {0}/{1}.pid -sf \u0027"},{"line_number":69,"context_line":"                    \u0027$(cat {0}/{1}.pid)\u0027.format(conf_path, listener.id)]"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aca2d91_0def5b88","line":67,"in_reply_to":"1aca2d91_e9cf747d","updated":"2015-05-07 15:57:56.000000000","message":"Well, one reason not to add another command is to avoid an extra I/O operation just to become the root user.  Another is the functionality wouldn\u0027t change even if you became root user, meaning I don\u0027t understand why using sudo would be considered bad... Is it just a problem with the duplication of 5 characters behind every command?","commit_id":"f2ca1d40e80d1c2486eef5ce844836da69ef08aa"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"e8ccbd3b13ab120ea6a8a1819a5b6748b0c6b41c","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                         certs[\u0027sni_certs\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # Build a list of commands to send to the exec method"},{"line_number":67,"context_line":"        commands \u003d [\u0027sudo chmod 600 {0}/haproxy.cfg\u0027.format(conf_path),"},{"line_number":68,"context_line":"                    \u0027sudo haproxy -f {0}/haproxy.cfg -p {0}/{1}.pid -sf \u0027"},{"line_number":69,"context_line":"                    \u0027$(cat {0}/{1}.pid)\u0027.format(conf_path, listener.id)]"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aca2d91_29a68c10","line":67,"in_reply_to":"3acd31a7_8511a906","updated":"2015-05-07 15:20:13.000000000","message":"This way you can limit the commands the account can run as root.","commit_id":"f2ca1d40e80d1c2486eef5ce844836da69ef08aa"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"6618e9c689d539a6317713f937b0e8249d98bf9b","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        # Exec appropriate commands on all amphorae"},{"line_number":72,"context_line":"        self._exec_on_amphorae("},{"line_number":73,"context_line":"            listener.load_balancer.amphorae, commands,"},{"line_number":74,"context_line":"            make_dir\u003d\u0027sudo mkdir -p {0}\u0027.format(conf_path), data\u003d[config],"},{"line_number":75,"context_line":"            upload_dir\u003d\u0027{0}/haproxy.cfg\u0027.format(conf_path))"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def stop(self, listener, vip):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aca2d91_4aee4cb5","line":74,"updated":"2015-05-07 20:34:11.000000000","message":"This needs to chown the directory to the user so the sftp will work.","commit_id":"f2ca1d40e80d1c2486eef5ce844836da69ef08aa"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"f91fbe0d32415cb6fda9f9c3d5753faa242f7a53","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        return TLS_CERT and SNI_CERTS"},{"line_number":184,"context_line":"        \"\"\""},{"line_number":185,"context_line":"        tls_cert \u003d None"},{"line_number":186,"context_line":"        sni_certs \u003d []"},{"line_number":187,"context_line":"        cert_dir \u003d \u0027{0}/{1}/certificates\u0027.format(self.amp_config.base_path,"},{"line_number":188,"context_line":"                                                 listener.id)"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aca2d91_4ae1ac99","line":186,"updated":"2015-05-07 20:39:55.000000000","message":"Shouldn\u0027t this be pulled in from the config file \u0027base_cert_dir\u0027 setting?","commit_id":"f2ca1d40e80d1c2486eef5ce844836da69ef08aa"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"f91fbe0d32415cb6fda9f9c3d5753faa242f7a53","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            self._exec_on_amphorae("},{"line_number":205,"context_line":"                listener.load_balancer.amphorae, ["},{"line_number":206,"context_line":"                    \u0027sudo chmod 600 {0}/*.pem\u0027.format(cert_dir)],"},{"line_number":207,"context_line":"                make_dir\u003dcert_dir, data\u003ddata, upload_dir\u003dcert_dir)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        return {\u0027tls_cert\u0027: tls_cert, \u0027sni_certs\u0027: sni_certs}"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aca2d91_aa8a80bd","line":207,"updated":"2015-05-07 20:39:55.000000000","message":"make_dir is wrong here.  needs to include mkdir -p command and chown.","commit_id":"f2ca1d40e80d1c2486eef5ce844836da69ef08aa"}]}
