)]}'
{"tripleoclient/tests/v1/tripleo/test_tripleo_deploy.py":[{"author":{"_account_id":27427,"name":"David Peacock","email":"dpeacock@redhat.com","username":"davidjpeacock"},"change_message_id":"6d04553556615e5d856fff5c0f931dda33200f4b","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                         \u0027--standalone-role\u0027, \u0027Undercloud\u0027,"},{"line_number":658,"context_line":"                                         # TODO(cjeanner) drop once we have"},{"line_number":659,"context_line":"                                         # proper oslo.privsep"},{"line_number":660,"context_line":"                                         \u0027--deployment-user\u0027, \u0027stack\u0027,"},{"line_number":661,"context_line":"                                         \u0027-e\u0027, \u0027/tmp/thtroot/puppet/foo.yaml\u0027,"},{"line_number":662,"context_line":"                                         \u0027-e\u0027, \u0027/tmp/thtroot//docker/bar.yaml\u0027,"},{"line_number":663,"context_line":"                                         \u0027-e\u0027, \u0027/tmp/thtroot42/notouch.yaml\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_63985719","line":660,"updated":"2018-07-06 11:41:02.000000000","message":"Have you tested / confirmed that all works as intended if someone passes foo to this?","commit_id":"6ebae4a2046732e8113b72bc31b387e82634f43a"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"ec27a0c617093ca70c9000fa25430d2cefac1e0d","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                         \u0027--standalone-role\u0027, \u0027Undercloud\u0027,"},{"line_number":658,"context_line":"                                         # TODO(cjeanner) drop once we have"},{"line_number":659,"context_line":"                                         # proper oslo.privsep"},{"line_number":660,"context_line":"                                         \u0027--deployment-user\u0027, \u0027stack\u0027,"},{"line_number":661,"context_line":"                                         \u0027-e\u0027, \u0027/tmp/thtroot/puppet/foo.yaml\u0027,"},{"line_number":662,"context_line":"                                         \u0027-e\u0027, \u0027/tmp/thtroot//docker/bar.yaml\u0027,"},{"line_number":663,"context_line":"                                         \u0027-e\u0027, \u0027/tmp/thtroot42/notouch.yaml\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_4308bb2b","line":660,"in_reply_to":"5f7c97a3_63985719","updated":"2018-07-06 12:00:52.000000000","message":"Yes, if we drop the @mock it takes \"zuul\" in the CI for example - and although the unit-tests fail in that case, it actually does work as expected :).","commit_id":"6ebae4a2046732e8113b72bc31b387e82634f43a"}],"tripleoclient/v1/tripleo_deploy.py":[{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"53d2bbc1b8821c91558fc1a9a1223cdde50125a3","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    # NOTE(cjeanner) Quick\u0027n\u0027dirty way before we have proper"},{"line_number":92,"context_line":"    # escalation support through oslo.privsep"},{"line_number":93,"context_line":"    def _set_data_rights(self, file_name, user\u003dNone,"},{"line_number":94,"context_line":"                         chmod\u003d0o600):"},{"line_number":95,"context_line":"        if user:"},{"line_number":96,"context_line":"            cmd \u003d \u0027sudo chown -R %s %s\u0027 % (user, file_name)"},{"line_number":97,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_b64eaf93","line":94,"updated":"2018-07-06 12:59:08.000000000","message":"It would be a good idea to check that the user exists prior to executing this. In the standalone case, we actually don\u0027t pass this in by default so this would error. Additionally if a user didn\u0027t specify it and the user doesn\u0027t exist this would probably throw an exception. I think we should check that the user exists and if not, throw a warning indicating that file_name perms need to be adjusted manually.","commit_id":"6ebae4a2046732e8113b72bc31b387e82634f43a"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"aeea13bdc2fd3731a5ca8416038461e92afa09d0","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    # NOTE(cjeanner) Quick\u0027n\u0027dirty way before we have proper"},{"line_number":92,"context_line":"    # escalation support through oslo.privsep"},{"line_number":93,"context_line":"    def _set_data_rights(self, file_name, user\u003dNone,"},{"line_number":94,"context_line":"                         chmod\u003d0o600):"},{"line_number":95,"context_line":"        if user:"},{"line_number":96,"context_line":"            cmd \u003d \u0027sudo chown -R %s %s\u0027 % (user, file_name)"},{"line_number":97,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_391ff070","line":94,"in_reply_to":"5f7c97a3_b64eaf93","updated":"2018-07-06 13:44:17.000000000","message":"Good point - pushed a new version that should do the requested checks and log a warning if the user isn\u0027t set or doesn\u0027t exist.","commit_id":"6ebae4a2046732e8113b72bc31b387e82634f43a"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"3e758c3f6a51e4a7580ec0809b710d4a389e0b88","unresolved":false,"context_lines":[{"line_number":976,"context_line":"                raise exceptions.DeploymentError(message)"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"            # download the ansible playbooks and execute them."},{"line_number":979,"context_line":"            ansible_dir \u003d \\"},{"line_number":980,"context_line":"                self._download_ansible_playbooks(orchestration_client,"},{"line_number":981,"context_line":"                                                 parsed_args.stack,"},{"line_number":982,"context_line":"                                                 parsed_args.standalone_role)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_83b493f2","line":979,"updated":"2018-07-06 10:59:12.000000000","message":"I think this dir should be chowned to user as well?","commit_id":"6ebae4a2046732e8113b72bc31b387e82634f43a"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"9427fd6c538aa24506aaa57c41564c19ef734551","unresolved":false,"context_lines":[{"line_number":976,"context_line":"                raise exceptions.DeploymentError(message)"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"            # download the ansible playbooks and execute them."},{"line_number":979,"context_line":"            ansible_dir \u003d \\"},{"line_number":980,"context_line":"                self._download_ansible_playbooks(orchestration_client,"},{"line_number":981,"context_line":"                                                 parsed_args.stack,"},{"line_number":982,"context_line":"                                                 parsed_args.standalone_role)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_03a3a39c","line":979,"in_reply_to":"5f7c97a3_83b493f2","updated":"2018-07-06 11:14:48.000000000","message":"I think this is managed at line 239 by the _cleanup_working_dirs() method.","commit_id":"6ebae4a2046732e8113b72bc31b387e82634f43a"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"c8655319d4feb3bf039b428f554f4661e66fdf9f","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                cmd \u003d \u0027sudo chown -R %s %s\u0027 % (u, file_name)"},{"line_number":104,"context_line":"                subprocess.check_call(cmd.split())"},{"line_number":105,"context_line":"            except KeyError:"},{"line_number":106,"context_line":"                self.log.warning(\u0027Unknown user \"%s\". You might need to\u0027"},{"line_number":107,"context_line":"                                 \u0027manually set ownership after the deploy\u0027"},{"line_number":108,"context_line":"                                 % u)"},{"line_number":109,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_cf2e2a8c","line":106,"updated":"2018-07-06 14:38:31.000000000","message":"please use _()","commit_id":"88599ed790474820fcbf21a7f32e8b5aa6606016"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"c8655319d4feb3bf039b428f554f4661e66fdf9f","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                                 \u0027manually set ownership after the deploy\u0027"},{"line_number":108,"context_line":"                                 % u)"},{"line_number":109,"context_line":"        else:"},{"line_number":110,"context_line":"            self.log.warning(\u0027Undefined user \"%s\". You might need to\u0027"},{"line_number":111,"context_line":"                             \u0027manually set ownership after the deploy\u0027"},{"line_number":112,"context_line":"                             % u)"},{"line_number":113,"context_line":"        os.chmod(file_name, chmod)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_ef2be678","line":110,"updated":"2018-07-06 14:38:31.000000000","message":"nit: you can set the result flag then log the message only once","commit_id":"88599ed790474820fcbf21a7f32e8b5aa6606016"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"f24f9b363c808a024c95410e41daf9bf2c81b33f","unresolved":false,"context_lines":[{"line_number":821,"context_line":"            default\u003d\u0027stack\u0027,"},{"line_number":822,"context_line":"            help\u003d_(\u0027User who executes the tripleo deploy command. \u0027"},{"line_number":823,"context_line":"                   \u0027Defaults to stack.\u0027)"},{"line_number":824,"context_line":"        )"},{"line_number":825,"context_line":"        parser.add_argument("},{"line_number":826,"context_line":"            \u0027--heat-container-image\u0027, metavar\u003d\u0027\u003cHEAT_CONTAINER_IMAGE\u003e\u0027,"},{"line_number":827,"context_line":"            dest\u003d\u0027heat_container_image\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_1620b599","line":824,"updated":"2018-07-07 11:33:24.000000000","message":"Can\u0027t we determine the --deployment-user automatically by using a getuid or getgid call instead? Would prefer not to see us add a flag for this.","commit_id":"89c8e2226ccfc81de661b4ec7c4d0c7d1a95279f"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"7259a9cf4031a0b001c8986d5dd878708a80ccbb","unresolved":false,"context_lines":[{"line_number":821,"context_line":"            default\u003d\u0027stack\u0027,"},{"line_number":822,"context_line":"            help\u003d_(\u0027User who executes the tripleo deploy command. \u0027"},{"line_number":823,"context_line":"                   \u0027Defaults to stack.\u0027)"},{"line_number":824,"context_line":"        )"},{"line_number":825,"context_line":"        parser.add_argument("},{"line_number":826,"context_line":"            \u0027--heat-container-image\u0027, metavar\u003d\u0027\u003cHEAT_CONTAINER_IMAGE\u003e\u0027,"},{"line_number":827,"context_line":"            dest\u003d\u0027heat_container_image\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_bb7be177","line":824,"in_reply_to":"5f7c97a3_1620b599","updated":"2018-07-09 05:17:13.000000000","message":"Not really due to the wild call of sudo inside tripleoclient in order to call itself :/.\n\nThe user actually IS self-determined in undercloud_config.py file. But as the command \"openstack undercloud install\" actually calls tripleoclient with sudo, you have to pass it in some way. We might add \"for internal use only\" in the help.","commit_id":"89c8e2226ccfc81de661b4ec7c4d0c7d1a95279f"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"e286894e457c9fa3504e95a5276077e7d602c45e","unresolved":false,"context_lines":[{"line_number":821,"context_line":"            default\u003d\u0027stack\u0027,"},{"line_number":822,"context_line":"            help\u003d_(\u0027User who executes the tripleo deploy command. \u0027"},{"line_number":823,"context_line":"                   \u0027Defaults to stack.\u0027)"},{"line_number":824,"context_line":"        )"},{"line_number":825,"context_line":"        parser.add_argument("},{"line_number":826,"context_line":"            \u0027--heat-container-image\u0027, metavar\u003d\u0027\u003cHEAT_CONTAINER_IMAGE\u003e\u0027,"},{"line_number":827,"context_line":"            dest\u003d\u0027heat_container_image\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_04339214","line":824,"in_reply_to":"5f7c97a3_bb7be177","updated":"2018-07-09 09:02:50.000000000","message":"Yes, we cannot do auto-eval here cuxz of sudo calls for the client. So I tried here https://review.openstack.org/#/c/580171/1/tripleoclient/v1/tripleo_deploy.py@965 and it returns \u0027root\u0027","commit_id":"89c8e2226ccfc81de661b4ec7c4d0c7d1a95279f"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"345b1ca72a015edf0c44b67721a5114877f520a1","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    # escalation support through oslo.privsep"},{"line_number":93,"context_line":"    def _set_data_rights(self, file_name, user\u003dNone,"},{"line_number":94,"context_line":"                         chmod\u003d0o600):"},{"line_number":95,"context_line":"        u \u003d None"},{"line_number":96,"context_line":"        if user:"},{"line_number":97,"context_line":"            u \u003d user"},{"line_number":98,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_8ec9e6ab","line":95,"updated":"2018-07-10 07:04:34.000000000","message":"this can be one line u \u003d user or self.deployment_user","commit_id":"62914903033cf933bbff6e5fb51e63887f97f945"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"2b0cfbfb8f40b9d5ea61b46766540739389d1760","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    # escalation support through oslo.privsep"},{"line_number":93,"context_line":"    def _set_data_rights(self, file_name, user\u003dNone,"},{"line_number":94,"context_line":"                         chmod\u003d0o600):"},{"line_number":95,"context_line":"        u \u003d None"},{"line_number":96,"context_line":"        if user:"},{"line_number":97,"context_line":"            u \u003d user"},{"line_number":98,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_eed41aec","line":95,"in_reply_to":"5f7c97a3_8ec9e6ab","updated":"2018-07-10 07:11:35.000000000","message":"Done","commit_id":"62914903033cf933bbff6e5fb51e63887f97f945"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"345b1ca72a015edf0c44b67721a5114877f520a1","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            self.log.warning(_(\u0027%(u_f)s user \"%(u)s\". You might need to \u0027"},{"line_number":117,"context_line":"                             \u0027manually set ownership after the deploy\u0027)"},{"line_number":118,"context_line":"                             % {\u0027u_f\u0027: u_flag, \u0027u\u0027: user})"},{"line_number":119,"context_line":"        if f_flag:"},{"line_number":120,"context_line":"            self.log.warning(_(\u0027%(f)s file is %(f_f)s.\u0027)"},{"line_number":121,"context_line":"                             % {\u0027f\u0027: file_name, \u0027f_f\u0027: f_flag})"},{"line_number":122,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_8e57a6c9","line":119,"updated":"2018-07-10 07:04:34.000000000","message":"this if-statement can be move to line 111. This will reduce one if-statement. Also after moving this log, f_flag also can be removed","commit_id":"62914903033cf933bbff6e5fb51e63887f97f945"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"2b0cfbfb8f40b9d5ea61b46766540739389d1760","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            self.log.warning(_(\u0027%(u_f)s user \"%(u)s\". You might need to \u0027"},{"line_number":117,"context_line":"                             \u0027manually set ownership after the deploy\u0027)"},{"line_number":118,"context_line":"                             % {\u0027u_f\u0027: u_flag, \u0027u\u0027: user})"},{"line_number":119,"context_line":"        if f_flag:"},{"line_number":120,"context_line":"            self.log.warning(_(\u0027%(f)s file is %(f_f)s.\u0027)"},{"line_number":121,"context_line":"                             % {\u0027f\u0027: file_name, \u0027f_f\u0027: f_flag})"},{"line_number":122,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_ee42daab","line":119,"in_reply_to":"5f7c97a3_8e57a6c9","updated":"2018-07-10 07:11:35.000000000","message":"not really, because we must ensure the file actually exists before doing any chown on the resource.","commit_id":"62914903033cf933bbff6e5fb51e63887f97f945"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"2a0c7d7699ed770e57a4ba8bab83db96f3d7e875","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            self.log.warning(_(\"Not cleaning working directory %s\")"},{"line_number":256,"context_line":"                             % self.tht_render)"},{"line_number":257,"context_line":"            # TODO(cjeanner) drop that once using oslo.privsep"},{"line_number":258,"context_line":"            self._set_data_rights(self.tht_render, user\u003duser, mode\u003d0o700)"},{"line_number":259,"context_line":"            self.log.warning(_(\"Not cleaning ansible directory %s\")"},{"line_number":260,"context_line":"                             % self.tmp_ansible_dir)"},{"line_number":261,"context_line":"            # TODO(cjeanner) drop that once using oslo.privsep"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_5335bbf4","line":258,"updated":"2018-07-10 06:31:10.000000000","message":"it\u0027s chmod, not mode","commit_id":"62914903033cf933bbff6e5fb51e63887f97f945"}]}
