[bitnami/etcd] Release 3.5.8-debian-11-r4 (#31524)
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
parent
38ce0be61f
commit
2b7f4b49d4
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"arch": "amd64",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "3.5.8-0"
|
||||
"version": "3.5.8-1"
|
||||
},
|
||||
"yq": {
|
||||
"arch": "amd64",
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue