)]}'
{"templates/logrotate/containers_logrotate.conf.erb":[{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"c32dcadc12033add03e81830130b735a204cfbc6","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\u003c%- if @compress %\u003e"},{"line_number":20,"context_line":"  compress"},{"line_number":21,"context_line":"\u003c%- end %\u003e"},{"line_number":22,"context_line":"  sharedscripts"},{"line_number":23,"context_line":"  postrotate"},{"line_number":24,"context_line":"    /usr/bin/find /var/log/containers -type f \\"},{"line_number":25,"context_line":"    \\( -mtime +\u003c%\u003d @purge_after_days %\u003e -or \\"}],"source_content_type":"application/x-erb","patch_set":6,"id":"9fdfeff1_3f95b8e4","side":"PARENT","line":22,"updated":"2019-02-26 13:11:35.000000000","message":"just not sure removing sharedscripts is that we should be ever doing. W/o that option, the postrotate is going to be executed after *each* log file got rotated. While we normally should do it once at the end of the batch...","commit_id":"7acd72e0f2e956ff459ce998ff1e18b543e40427"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"961fdb7df15009f9d643b24acafdfe5b3ab765f6","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\u003c%- if @compress %\u003e"},{"line_number":20,"context_line":"  compress"},{"line_number":21,"context_line":"\u003c%- end %\u003e"},{"line_number":22,"context_line":"  sharedscripts"},{"line_number":23,"context_line":"  postrotate"},{"line_number":24,"context_line":"    /usr/bin/find /var/log/containers -type f \\"},{"line_number":25,"context_line":"    \\( -mtime +\u003c%\u003d @purge_after_days %\u003e -or \\"}],"source_content_type":"application/x-erb","patch_set":6,"id":"9fdfeff1_12e198d0","side":"PARENT","line":22,"in_reply_to":"9fdfeff1_3f95b8e4","updated":"2019-02-28 08:57:17.000000000","message":"in the \"new version\", we use the $1 passed to the script in order to clean each directory. This allows to target things properly.","commit_id":"7acd72e0f2e956ff459ce998ff1e18b543e40427"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"d5e4194b14f64eb47b9a7d907603d20fd099fa0e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  compress"},{"line_number":21,"context_line":"\u003c%- end %\u003e"},{"line_number":22,"context_line":"  postrotate"},{"line_number":23,"context_line":"    directory\u003d$(dirname $1);"},{"line_number":24,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":25,"context_line":"    \\( -mtime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":26,"context_line":"    -atime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":27,"context_line":"    -ctime +\u003c%\u003d @purge_after_days %\u003e \\) -exec truncate -s0 {} \\;;"},{"line_number":28,"context_line":"    test $(ls ${directory} | wc -l) -ge \u003c%\u003d @purge_after_days %\u003e \u0026\u0026 \\"},{"line_number":29,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":30,"context_line":"    \\( -mtime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"}],"source_content_type":"application/x-erb","patch_set":6,"id":"9fdfeff1_a9c40861","line":27,"range":{"start_line":23,"start_character":0,"end_line":27,"end_character":65},"updated":"2019-02-27 03:07:59.000000000","message":"I\u0027m not sure whether we need this postrotate as all the log with content is truncated by copy truncated.\n\nPossible difference is that this script can deal with the logs which does not match the specified pattern, but for me it makes more sense to change log name pattern to wildcard (like /var/log/containers/*/*) then having customized script here.","commit_id":"a950a3a8aa072a6b33e46e2b9c1a6d5942264160"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"961fdb7df15009f9d643b24acafdfe5b3ab765f6","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  compress"},{"line_number":21,"context_line":"\u003c%- end %\u003e"},{"line_number":22,"context_line":"  postrotate"},{"line_number":23,"context_line":"    directory\u003d$(dirname $1);"},{"line_number":24,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":25,"context_line":"    \\( -mtime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":26,"context_line":"    -atime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":27,"context_line":"    -ctime +\u003c%\u003d @purge_after_days %\u003e \\) -exec truncate -s0 {} \\;;"},{"line_number":28,"context_line":"    test $(ls ${directory} | wc -l) -ge \u003c%\u003d @purge_after_days %\u003e \u0026\u0026 \\"},{"line_number":29,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":30,"context_line":"    \\( -mtime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"}],"source_content_type":"application/x-erb","patch_set":6,"id":"9fdfeff1_120af888","line":27,"range":{"start_line":23,"start_character":0,"end_line":27,"end_character":65},"in_reply_to":"9fdfeff1_a9c40861","updated":"2019-02-28 08:57:17.000000000","message":"True, but apparently there might be some other, anti-pattern logs that will never be matched by the initial pattern :(.\nThe main issue is, apparently no naming convention was accepted/established for the log files, meaning we have to do some extra cleanups in order to ensure nothing stays longer than the said period...\nI\u0027m not happy with that either, but...","commit_id":"a950a3a8aa072a6b33e46e2b9c1a6d5942264160"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"29a9fbac21028ffb3c7d8e995377f9776492ea3e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  compress"},{"line_number":21,"context_line":"\u003c%- end %\u003e"},{"line_number":22,"context_line":"  postrotate"},{"line_number":23,"context_line":"    directory\u003d$(dirname $1);"},{"line_number":24,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":25,"context_line":"    \\( -mtime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":26,"context_line":"    -atime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":27,"context_line":"    -ctime +\u003c%\u003d @purge_after_days %\u003e \\) -exec truncate -s0 {} \\;;"},{"line_number":28,"context_line":"    test $(ls ${directory} | wc -l) -ge \u003c%\u003d @purge_after_days %\u003e \u0026\u0026 \\"},{"line_number":29,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":30,"context_line":"    \\( -mtime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"}],"source_content_type":"application/x-erb","patch_set":6,"id":"9fdfeff1_fe9e1bb6","line":27,"range":{"start_line":23,"start_character":0,"end_line":27,"end_character":65},"in_reply_to":"9fdfeff1_a9c40861","updated":"2019-02-28 11:10:27.000000000","message":"Unfortunately there is not only logs under the path (yeah... I know...), AFAIK, there is some binary data from Ironic?.. anyway, it cannot be just a wildcard.\n\nWe want the postrotate to enforce GDPR policies for whatever cases what logrotate could think it should not manage this time (while it must be by some deadline period set to abide GDRP)","commit_id":"a950a3a8aa072a6b33e46e2b9c1a6d5942264160"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"a016b62f9ac1a79244cc45afe3b8c0de5e4c7870","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  compress"},{"line_number":21,"context_line":"\u003c%- end %\u003e"},{"line_number":22,"context_line":"  postrotate"},{"line_number":23,"context_line":"    directory\u003d$(dirname $1);"},{"line_number":24,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":25,"context_line":"    \\( -mtime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":26,"context_line":"    -atime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":27,"context_line":"    -ctime +\u003c%\u003d @purge_after_days %\u003e \\) -exec truncate -s0 {} \\;;"},{"line_number":28,"context_line":"    test $(ls ${directory} | wc -l) -ge \u003c%\u003d @purge_after_days %\u003e \u0026\u0026 \\"},{"line_number":29,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":30,"context_line":"    \\( -mtime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"}],"source_content_type":"application/x-erb","patch_set":6,"id":"9fdfeff1_b515d69d","line":27,"range":{"start_line":23,"start_character":0,"end_line":27,"end_character":65},"in_reply_to":"9fdfeff1_fe9e1bb6","updated":"2019-03-04 09:03:02.000000000","message":"quick question:\nwhy don\u0027t we just use tmpreaper or smth like that from the host directly? After all, it\u0027s exactly its purpose. And we reduce the amount of work for logrotate, which isn\u0027t a bad thing, while using a proper tool for removing stuff we want.\n\nI\u0027m pretty sure we can even set some PATTERN to ignore specific file name.","commit_id":"a950a3a8aa072a6b33e46e2b9c1a6d5942264160"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"d5e4194b14f64eb47b9a7d907603d20fd099fa0e","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \\( -mtime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":26,"context_line":"    -atime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":27,"context_line":"    -ctime +\u003c%\u003d @purge_after_days %\u003e \\) -exec truncate -s0 {} \\;;"},{"line_number":28,"context_line":"    test $(ls ${directory} | wc -l) -ge \u003c%\u003d @purge_after_days %\u003e \u0026\u0026 \\"},{"line_number":29,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":30,"context_line":"    \\( -mtime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"},{"line_number":31,"context_line":"    -atime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"}],"source_content_type":"application/x-erb","patch_set":6,"id":"9fdfeff1_a9eba8da","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":69},"updated":"2019-02-27 03:07:59.000000000","message":"I\u0027m afraid that this could cause unexpected effect if we have some log files in the same directory.\nFor example, in nova directory, we have multiple logs like api.log, nova-scheduler.log, and so on.","commit_id":"a950a3a8aa072a6b33e46e2b9c1a6d5942264160"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"961fdb7df15009f9d643b24acafdfe5b3ab765f6","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \\( -mtime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":26,"context_line":"    -atime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":27,"context_line":"    -ctime +\u003c%\u003d @purge_after_days %\u003e \\) -exec truncate -s0 {} \\;;"},{"line_number":28,"context_line":"    test $(ls ${directory} | wc -l) -ge \u003c%\u003d @purge_after_days %\u003e \u0026\u0026 \\"},{"line_number":29,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":30,"context_line":"    \\( -mtime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"},{"line_number":31,"context_line":"    -atime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"}],"source_content_type":"application/x-erb","patch_set":6,"id":"9fdfeff1_b231ac5b","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":69},"in_reply_to":"9fdfeff1_a9eba8da","updated":"2019-02-28 08:57:17.000000000","message":"at least this isn\u0027t the case for mysql and its long-lasting log file :/. The filters applied to the next find should prevent nasty outcomes in the other cases (I don\u0027t know of other services with \"non-existing log output\" such as mysql)","commit_id":"a950a3a8aa072a6b33e46e2b9c1a6d5942264160"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"d5e4194b14f64eb47b9a7d907603d20fd099fa0e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    -atime +\u003c%\u003d @purge_after_days %\u003e -or \\"},{"line_number":27,"context_line":"    -ctime +\u003c%\u003d @purge_after_days %\u003e \\) -exec truncate -s0 {} \\;;"},{"line_number":28,"context_line":"    test $(ls ${directory} | wc -l) -ge \u003c%\u003d @purge_after_days %\u003e \u0026\u0026 \\"},{"line_number":29,"context_line":"    /usr/bin/find ${directory} -maxdepth 1 -type f \\"},{"line_number":30,"context_line":"    \\( -mtime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"},{"line_number":31,"context_line":"    -atime +\u003c%\u003d (2*@purge_after_days) %\u003e -or \\"},{"line_number":32,"context_line":"    -ctime +\u003c%\u003d (2*@purge_after_days) %\u003e \\) -exec rm -f  {} \\;;"},{"line_number":33,"context_line":"  endscript"},{"line_number":34,"context_line":"}"}],"source_content_type":"application/x-erb","patch_set":6,"id":"9fdfeff1_09919452","line":32,"range":{"start_line":29,"start_character":0,"end_line":32,"end_character":63},"updated":"2019-02-27 03:07:59.000000000","message":"The same could be said here.\n\nI\u0027m afraid that this is duplicated with the functionality of rotate/maxage.","commit_id":"a950a3a8aa072a6b33e46e2b9c1a6d5942264160"}]}
