Skip to content

Commit

Permalink
Avoid log-groomer container failures when log persistence is enabled (#…
Browse files Browse the repository at this point in the history
…37222)

* Avoid log-groomer container failures when log persistence is enabled

* Ignore erros on rm file command only

---------

Co-authored-by: Arnau Rovira <[email protected]>
  • Loading branch information
arovira and arnaurovira81 authored Feb 7, 2024
1 parent daa2bce commit b39a2bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ while true; do
find "${DIRECTORY}"/logs \
-type d -name 'lost+found' -prune -o \
-type f -mtime +"${RETENTION}" -name '*.log' -print0 | \
xargs -0 rm -f
xargs -0 rm -f || true

find "${DIRECTORY}"/logs -type d -empty -delete || true

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/clean-logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ while true; do
find "${DIRECTORY}"/logs \
-type d -name 'lost+found' -prune -o \
-type f -mtime +"${RETENTION}" -name '*.log' -print0 | \
xargs -0 rm -f
xargs -0 rm -f || true

find "${DIRECTORY}"/logs -type d -empty -delete || true

Expand Down

0 comments on commit b39a2bf

Please sign in to comment.