From 614f6a6a83c1db617c9f4fa11e86f45bb30094f6 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Wed, 7 Jul 2021 15:52:52 +0000 Subject: [PATCH] 6.2.4-debian-10-r29 release --- .../redis-sentinel/6.2/debian-10/Dockerfile | 2 +- .../prebuildfs/opt/bitnami/scripts/libfile.sh | 39 +++++++++++++++++++ bitnami/redis-sentinel/README.md | 2 +- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/bitnami/redis-sentinel/6.2/debian-10/Dockerfile b/bitnami/redis-sentinel/6.2/debian-10/Dockerfile index d4fbe42b9990..785c9b0bbe70 100644 --- a/bitnami/redis-sentinel/6.2/debian-10/Dockerfile +++ b/bitnami/redis-sentinel/6.2/debian-10/Dockerfile @@ -17,7 +17,7 @@ RUN chmod g+rwX /opt/bitnami COPY rootfs / RUN /opt/bitnami/scripts/redis-sentinel/postunpack.sh ENV BITNAMI_APP_NAME="redis-sentinel" \ - BITNAMI_IMAGE_VERSION="6.2.4-debian-10-r28" + BITNAMI_IMAGE_VERSION="6.2.4-debian-10-r29" EXPOSE 26379 diff --git a/bitnami/redis-sentinel/6.2/debian-10/prebuildfs/opt/bitnami/scripts/libfile.sh b/bitnami/redis-sentinel/6.2/debian-10/prebuildfs/opt/bitnami/scripts/libfile.sh index b09575cbe4a6..dd47f25e4e45 100644 --- a/bitnami/redis-sentinel/6.2/debian-10/prebuildfs/opt/bitnami/scripts/libfile.sh +++ b/bitnami/redis-sentinel/6.2/debian-10/prebuildfs/opt/bitnami/scripts/libfile.sh @@ -2,6 +2,11 @@ # # Library for managing files +# shellcheck disable=SC1091 + +# Load Generic Libraries +. /opt/bitnami/scripts/libos.sh + # Functions ######################## @@ -78,3 +83,37 @@ append_file_after_last_match() { result="$(tac "$file" | sed -E "0,/($match_regex)/s||${value}\n\1|" | tac)" echo "$result" > "$file" } + +######################## +# Wait until certain entry is present in a log file +# Arguments: +# $1 - entry to look for +# $2 - log file +# $3 - max retries. Default: 12 +# $4 - sleep between retries (in seconds). Default: 5 +# Returns: +# Boolean +######################### +wait_for_log_entry() { + local -r entry="${1:-missing entry}" + local -r log_file="${2:-missing log file}" + local -r retries="${3:-12}" + local -r interval_time="${4:-5}" + local attempt=0 + + check_log_file_for_entry() { + if ! grep -qE "$entry" "$log_file"; then + debug "Entry \"${entry}\" still not present in ${log_file} (attempt $((++attempt))/${retries})" + return 1 + fi + } + debug "Checking that ${log_file} log file contains entry \"${entry}\"" + if retry_while check_log_file_for_entry "$retries" "$interval_time"; then + debug "Found entry \"${entry}\" in ${log_file}" + true + else + error "Could not find entry \"${entry}\" in ${log_file} after ${retries} retries" + debug_execute cat "$log_file" + return 1 + fi +} diff --git a/bitnami/redis-sentinel/README.md b/bitnami/redis-sentinel/README.md index 5b6f312651b8..977db47b1d15 100644 --- a/bitnami/redis-sentinel/README.md +++ b/bitnami/redis-sentinel/README.md @@ -47,7 +47,7 @@ Non-root container images add an extra layer of security and are generally recom Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/). -* [`6.2`, `6.2-debian-10`, `6.2.4`, `6.2.4-debian-10-r28`, `latest` (6.2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-redis-sentinel/blob/6.2.4-debian-10-r28/6.2/debian-10/Dockerfile) +* [`6.2`, `6.2-debian-10`, `6.2.4`, `6.2.4-debian-10-r29`, `latest` (6.2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-redis-sentinel/blob/6.2.4-debian-10-r29/6.2/debian-10/Dockerfile) * [`6.0`, `6.0-debian-10`, `6.0.14`, `6.0.14-debian-10-r27` (6.0/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-redis-sentinel/blob/6.0.14-debian-10-r27/6.0/debian-10/Dockerfile) * [`5.0`, `5.0-debian-10`, `5.0.12`, `5.0.12-debian-10-r106` (5.0/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-redis-sentinel/blob/5.0.12-debian-10-r106/5.0/debian-10/Dockerfile)