)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"e665546f27dc4fd3e366b63513cfbf2818d5e8d6","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Purge old ansible logs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ansible.log is rotated but a series of deployments may result in"},{"line_number":10,"context_line":"multiple logs and its never cleaned."},{"line_number":11,"context_line":"This patch ensures to purge all the old ansible logs (rotated)"},{"line_number":12,"context_line":"from /home/stack."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"2098fe7a_43721cdf","line":10,"range":{"start_line":10,"start_character":18,"end_line":10,"end_character":21},"updated":"2023-01-06 15:26:09.000000000","message":"it\u0027s","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"e665546f27dc4fd3e366b63513cfbf2818d5e8d6","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ansible.log is rotated but a series of deployments may result in"},{"line_number":10,"context_line":"multiple logs and its never cleaned."},{"line_number":11,"context_line":"This patch ensures to purge all the old ansible logs (rotated)"},{"line_number":12,"context_line":"from /home/stack."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ib4e1c3540da509e27898e584ba5206483a2ccbec"},{"line_number":15,"context_line":"Resolves: rhbz#2158330"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ef947a7f_2fa14599","line":12,"range":{"start_line":11,"start_character":0,"end_line":12,"end_character":17},"updated":"2023-01-06 15:26:09.000000000","message":"This patch adds a cron job to purge timestamped ansible logs from /home/stack but only if the deployer sets PruneOldAnsibleLogsInHome true (it defaults to false).","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"fbf939f1cd78bf9f4056b5226b4602dba25ffe1c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"dce41a3f_2a04738b","updated":"2023-01-06 16:51:05.000000000","message":"I\u0027m really not a big fan of this kind of things. IMHO, the operator is able to clean things when they see fit, and as a general thought, we shouldn\u0027t temper with a user directory content - even if it\u0027s for log cleaning. There are so many possibilities to make a mistake, or to lose data....\n\nI know the default is set to \"false\" - but now consider:\nan operator sets the variable to true, makes tons of deploys, and think they want to actually keep one log, and rename it to ansible-keep-\u003cdate\u003e.log (well, why not, right?)\nIt will be removed once the time is passed.\n\nOne example among others.\n\nI won\u0027t block the proposal. But I won\u0027t vote for it either.","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"6c7930852ca60725cd791dbd97cda74e8da41b4f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"14629daa_1f79ff94","updated":"2023-01-09 12:44:27.000000000","message":"Since we\u0027re concerned about the risk of deleting user data, maybe this patch should be abandoned in favor of a docs patch to the following:\n\nhttps://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/deployment/ansible_config_download.html#ansible-project-directory\n\nunder ansible.log add that a date can be appended after ansible runs (per review 867336) but that it can purged with a find command and provide an example find command.","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"8323ed8cbd96eed8244da666ee5394edb2c1accb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4af4df34_427dfa26","updated":"2023-01-06 15:07:45.000000000","message":"When reviewing this you may compare it to the following:\n\nhttps://review.opendev.org/c/openstack/tripleo-heat-templates/+/865175/5/deployment/logrotate/logrotate-crond-container-puppet.yaml","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"},{"author":{"_account_id":34598,"name":"Manojkatari","email":"mkatari@redhat.com","username":"mkatari"},"change_message_id":"cd5aba753178a6c548cf0e0abe8da4f05305dc50","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"492ac671_6b64be04","in_reply_to":"14629daa_1f79ff94","updated":"2023-01-10 08:11:45.000000000","message":"I will abandon this patch considering the complications.\n\nduring \u0027openstack overcloud ceph deploy\u0027, review 867336 rotates /home/stack/ansible.log  but not the one in config-download path.\n\nAs discussed, we can update the documentation once ansible log rotation code is made available for \u0027openstack overcloud deploy\u0027 which updates ansible logs in config-download path.","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"}],"deployment/logrotate/logrotate-crond-container-puppet.yaml":[{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"e665546f27dc4fd3e366b63513cfbf2818d5e8d6","unresolved":true,"context_lines":[{"line_number":73,"context_line":"    type: boolean"},{"line_number":74,"context_line":"    default: false"},{"line_number":75,"context_line":"  PruneOldAnsibleLogsInHome:"},{"line_number":76,"context_line":"    description: Enable/disable deletion of old anisble logs in /home directory."},{"line_number":77,"context_line":"    type: boolean"},{"line_number":78,"context_line":"    default: false"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5c5c8238_57f68c3e","line":76,"range":{"start_line":76,"start_character":64,"end_line":76,"end_character":69},"updated":"2023-01-06 15:26:09.000000000","message":"/home/stack or UndercloudHomeDir","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"ab61fb50e9c5cc0c7db2f21a9d453215779937e6","unresolved":true,"context_lines":[{"line_number":73,"context_line":"    type: boolean"},{"line_number":74,"context_line":"    default: false"},{"line_number":75,"context_line":"  PruneOldAnsibleLogsInHome:"},{"line_number":76,"context_line":"    description: Enable/disable deletion of old anisble logs in /home directory."},{"line_number":77,"context_line":"    type: boolean"},{"line_number":78,"context_line":"    default: false"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"0a73abde_af02aaca","line":76,"range":{"start_line":76,"start_character":48,"end_line":76,"end_character":55},"updated":"2023-01-06 15:42:20.000000000","message":"ansible is misspelled.","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"ab61fb50e9c5cc0c7db2f21a9d453215779937e6","unresolved":true,"context_lines":[{"line_number":73,"context_line":"    type: boolean"},{"line_number":74,"context_line":"    default: false"},{"line_number":75,"context_line":"  PruneOldAnsibleLogsInHome:"},{"line_number":76,"context_line":"    description: Enable/disable deletion of old anisble logs in /home directory."},{"line_number":77,"context_line":"    type: boolean"},{"line_number":78,"context_line":"    default: false"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"8a0a0a9e_ea6c8517","line":76,"range":{"start_line":76,"start_character":64,"end_line":76,"end_character":69},"in_reply_to":"5c5c8238_57f68c3e","updated":"2023-01-06 15:42:20.000000000","message":"Perhaps replace \"Enable/disable deletion of old anisble logs in /home directory\" with\n\n\"When true, a cron job will be installed which deletes ansbible.log-TIMESTAMP files from the Ansible project directory under $HOME/overcloud-deploy/\u003cstack\u003e/config-download.\"","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"fbf939f1cd78bf9f4056b5226b4602dba25ffe1c","unresolved":true,"context_lines":[{"line_number":138,"context_line":"                    -X \"/var/log/containers/*/*err\" \\"},{"line_number":139,"context_line":"                    {{ LogrotatePurgeAfterDays|int +1 }}d \\"},{"line_number":140,"context_line":"                    /var/log/containers/ 2\u003e\u00261 | logger -t container-tmpwatch"},{"line_number":141,"context_line":"                  if {{ PruneOldAnsibleLogsInHome }};then"},{"line_number":142,"context_line":"                    find /home/stack -type f \\"},{"line_number":143,"context_line":"                      -iname \u0027ansible.log-*\u0027 \\"},{"line_number":144,"context_line":"                      -atime +{{ LogrotatePurgeAfterDays|int +1 }} \\"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1c822200_370ac89f","line":141,"range":{"start_line":141,"start_character":0,"end_line":141,"end_character":57},"updated":"2023-01-06 16:51:05.000000000","message":"I\u0027d rather not put the code at all in the file if we don\u0027t want to prune the old ansible logs. Making it as a standard {% if PruneOldAnsibleLogsInHome|bool %}...{% endif %} would allow a cleaner generated file.","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"e665546f27dc4fd3e366b63513cfbf2818d5e8d6","unresolved":true,"context_lines":[{"line_number":139,"context_line":"                    {{ LogrotatePurgeAfterDays|int +1 }}d \\"},{"line_number":140,"context_line":"                    /var/log/containers/ 2\u003e\u00261 | logger -t container-tmpwatch"},{"line_number":141,"context_line":"                  if {{ PruneOldAnsibleLogsInHome }};then"},{"line_number":142,"context_line":"                    find /home/stack -type f \\"},{"line_number":143,"context_line":"                      -iname \u0027ansible.log-*\u0027 \\"},{"line_number":144,"context_line":"                      -atime +{{ LogrotatePurgeAfterDays|int +1 }} \\"},{"line_number":145,"context_line":"                      -print -delete \u003e\u00261 | logger -t ansible-log-clean"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"bfcf1c0f_ceeaa10a","line":142,"range":{"start_line":142,"start_character":25,"end_line":142,"end_character":36},"updated":"2023-01-06 15:26:09.000000000","message":"Nit:\n\nIs /home/stack stored in a variable we should use here instead?\n\n99% of the time it will be /home/stack but...\n\nFor standalone deployments StandaloneHomeDir should have it.\nFor production deployments UndercloudHomeDir should have it.\n\nI wonder if we want get_param both and use ansible\u0027s ternary filter\n\nhttps://docs.ansible.com/ansible/devel/collections/ansible/builtin/ternary_filter.html","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"08d464bc288517bd54778bd14b6d94ca98098a61","unresolved":true,"context_lines":[{"line_number":139,"context_line":"                    {{ LogrotatePurgeAfterDays|int +1 }}d \\"},{"line_number":140,"context_line":"                    /var/log/containers/ 2\u003e\u00261 | logger -t container-tmpwatch"},{"line_number":141,"context_line":"                  if {{ PruneOldAnsibleLogsInHome }};then"},{"line_number":142,"context_line":"                    find /home/stack -type f \\"},{"line_number":143,"context_line":"                      -iname \u0027ansible.log-*\u0027 \\"},{"line_number":144,"context_line":"                      -atime +{{ LogrotatePurgeAfterDays|int +1 }} \\"},{"line_number":145,"context_line":"                      -print -delete \u003e\u00261 | logger -t ansible-log-clean"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"4b67cf3e_8e8c3746","line":142,"range":{"start_line":142,"start_character":25,"end_line":142,"end_character":36},"in_reply_to":"bfcf1c0f_ceeaa10a","updated":"2023-01-06 15:34:41.000000000","message":"Actually let\u0027s set StandaloneHomeDir/UndercloudHomeDir aside and do better.\n\nI think it\u0027s more correct to run this command not in /home/stack but in the config-download working directory within /home/stack. \n\nTripleO has more direct ownership of that directory (it\u0027s system, not person managed). In a standalone deployment it will get a name like standalone-ansible-m57b0n01. But I wonder if there\u0027s a Heat var we can use to determine in.\n\nIn a non-standalone production deployment its path is described here:\n\nhttps://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/deployment/ansible_config_download.html#ansible-project-directory\n\nSince running \u0027openstack overcloud deploy\u0027 commands will usually result in the working directory changing I think have a cron job prune that directory but not everything in /home/stack less controversial.","commit_id":"f17dcfb4157d0dcedcf6755e576689129f0e6916"}]}
