From 2b7f4b49d4ab053b54a2b79e2deae930751ee6eb Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Mon, 24 Apr 2023 19:35:43 +0200 Subject: [PATCH] [bitnami/etcd] Release 3.5.8-debian-11-r4 (#31524) Signed-off-by: Bitnami Containers --- bitnami/etcd/3.5/debian-11/Dockerfile | 6 +++--- .../opt/bitnami/.bitnami_components.json | 2 +- .../rootfs/opt/bitnami/scripts/libetcd.sh | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bitnami/etcd/3.5/debian-11/Dockerfile b/bitnami/etcd/3.5/debian-11/Dockerfile index 58c6e9f6d437..73cce2dfde0f 100644 --- a/bitnami/etcd/3.5/debian-11/Dockerfile +++ b/bitnami/etcd/3.5/debian-11/Dockerfile @@ -4,10 +4,10 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:109c7d51bd69bb6b3df71017440c1ea0699454f81fe188056c083f0b57c96ea6" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ - org.opencontainers.image.created="2023-04-22T20:14:56Z" \ + org.opencontainers.image.created="2023-04-24T17:20:16Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="3.5.8-debian-11-r3" \ + org.opencontainers.image.ref.name="3.5.8-debian-11-r4" \ org.opencontainers.image.title="etcd" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="3.5.8" @@ -24,7 +24,7 @@ RUN install_packages ca-certificates curl procps RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ COMPONENTS=( \ "yq-4.33.3-0-linux-${OS_ARCH}-debian-11" \ - "etcd-3.5.8-0-linux-${OS_ARCH}-debian-11" \ + "etcd-3.5.8-1-linux-${OS_ARCH}-debian-11" \ ) && \ for COMPONENT in "${COMPONENTS[@]}"; do \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \ diff --git a/bitnami/etcd/3.5/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/etcd/3.5/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json index c6460ef1a3ea..713c26b3fda0 100644 --- a/bitnami/etcd/3.5/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/etcd/3.5/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json @@ -3,7 +3,7 @@ "arch": "amd64", "distro": "debian-11", "type": "NAMI", - "version": "3.5.8-0" + "version": "3.5.8-1" }, "yq": { "arch": "amd64", diff --git a/bitnami/etcd/3.5/debian-11/rootfs/opt/bitnami/scripts/libetcd.sh b/bitnami/etcd/3.5/debian-11/rootfs/opt/bitnami/scripts/libetcd.sh index b4e771add8dd..8c927e9cb763 100644 --- a/bitnami/etcd/3.5/debian-11/rootfs/opt/bitnami/scripts/libetcd.sh +++ b/bitnami/etcd/3.5/debian-11/rootfs/opt/bitnami/scripts/libetcd.sh @@ -443,26 +443,26 @@ is_healthy_etcd_cluster() { export ETCD_ACTIVE_ENDPOINTS if is_boolean_yes "$ETCD_DISASTER_RECOVERY"; then - if [[ -f "${ETCD_SNAPSHOTS_DIR}/.disaster_recovery" ]]; then + if [[ -f "/snapshots/.disaster_recovery" ]]; then # Remove current node from the ones that need to recover - remove_in_file "${ETCD_SNAPSHOTS_DIR}/.disaster_recovery" "$host:$port" + remove_in_file "/snapshots/.disaster_recovery" "$host:$port" # Remove nodes that do not exist anymore from the ones that need to recover - read -r -a recovery_array <<<"$(tr '\n' ' ' <"${ETCD_SNAPSHOTS_DIR}/.disaster_recovery")" + read -r -a recovery_array <<<"$(tr '\n' ' ' <"/snapshots/.disaster_recovery")" for r in "${recovery_array[@]}"; do if [[ ! "${endpoints_array[*]}" =~ $r ]]; then - remove_in_file "${ETCD_SNAPSHOTS_DIR}/.disaster_recovery" "$r" + remove_in_file "/snapshots/.disaster_recovery" "$r" fi done - if [[ $(wc -w <"${ETCD_SNAPSHOTS_DIR}/.disaster_recovery") -eq 0 ]]; then + if [[ $(wc -w <"/snapshots/.disaster_recovery") -eq 0 ]]; then debug "Last member to recover from the disaster!" - rm "${ETCD_SNAPSHOTS_DIR}/.disaster_recovery" + rm "/snapshots/.disaster_recovery" fi return_value=1 else if [[ $active_endpoints -lt $(((cluster_size + 1) / 2)) ]]; then debug "There are no enough active endpoints!" for e in "${endpoints_array[@]}"; do - [[ "$e" != "$host:$port" ]] && [[ "$e" != ":$port" ]] && echo "$e" >>"${ETCD_SNAPSHOTS_DIR}/.disaster_recovery" + [[ "$e" != "$host:$port" ]] && [[ "$e" != ":$port" ]] && echo "$e" >>"/snapshots/.disaster_recovery" done return_value=1 fi @@ -669,7 +669,7 @@ etcd_initialize() { if ! is_healthy_etcd_cluster; then warn "Cluster not responding!" if is_boolean_yes "$ETCD_DISASTER_RECOVERY"; then - latest_snapshot_file="$(find "${ETCD_SNAPSHOTS_DIR}/" -maxdepth 1 -type f -name 'db-*' | sort | tail -n 1)" + latest_snapshot_file="$(find /snapshots/ -maxdepth 1 -type f -name 'db-*' | sort | tail -n 1)" if [[ "${latest_snapshot_file}" != "" ]]; then info "Restoring etcd cluster from snapshot" rm -rf "$ETCD_DATA_DIR"