From 123be37878e722f49810edbdbb7cf3cc59f554a8 Mon Sep 17 00:00:00 2001 From: shaoyue Date: Fri, 1 Jul 2022 18:41:37 +0800 Subject: [PATCH] Fix cluster mismatch when startup (#44) Signed-off-by: shaoyue.chen --- .../3.3/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh | 9 +++------ .../3.4/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh | 9 +++------ .../3.5/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh | 8 +++----- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/bitnami/etcd/3.3/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh b/bitnami/etcd/3.3/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh index 11ac119f9691..53bb32f80341 100755 --- a/bitnami/etcd/3.3/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh +++ b/bitnami/etcd/3.3/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh @@ -20,12 +20,9 @@ set -o pipefail if [[ -f "$ETCD_NEW_MEMBERS_ENV_FILE" ]]; then debug "Loading env vars of existing cluster" . "$ETCD_NEW_MEMBERS_ENV_FILE" -else - # We do not rely on the original value of ETCD_INITIAL_CLUSTER even - # when bootstrapping a new cluster since we cannot assume - # that all nodes will come-up healthy - ETCD_INITIAL_CLUSTER="$(recalculate_initial_cluster)" - export ETCD_INITIAL_CLUSTER + # We rely on the original value of ETCD_INITIAL_CLUSTER + # when bootstrapping a new cluster since + # we need all intial members to calcualte a same cluster_id fi declare -a cmd=("etcd") diff --git a/bitnami/etcd/3.4/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh b/bitnami/etcd/3.4/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh index 11ac119f9691..53bb32f80341 100755 --- a/bitnami/etcd/3.4/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh +++ b/bitnami/etcd/3.4/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh @@ -20,12 +20,9 @@ set -o pipefail if [[ -f "$ETCD_NEW_MEMBERS_ENV_FILE" ]]; then debug "Loading env vars of existing cluster" . "$ETCD_NEW_MEMBERS_ENV_FILE" -else - # We do not rely on the original value of ETCD_INITIAL_CLUSTER even - # when bootstrapping a new cluster since we cannot assume - # that all nodes will come-up healthy - ETCD_INITIAL_CLUSTER="$(recalculate_initial_cluster)" - export ETCD_INITIAL_CLUSTER + # We rely on the original value of ETCD_INITIAL_CLUSTER + # when bootstrapping a new cluster since + # we need all intial members to calcualte a same cluster_id fi declare -a cmd=("etcd") diff --git a/bitnami/etcd/3.5/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh b/bitnami/etcd/3.5/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh index 11ac119f9691..79a35c2ed5bb 100755 --- a/bitnami/etcd/3.5/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh +++ b/bitnami/etcd/3.5/debian-11/rootfs/opt/bitnami/scripts/etcd/run.sh @@ -21,11 +21,9 @@ if [[ -f "$ETCD_NEW_MEMBERS_ENV_FILE" ]]; then debug "Loading env vars of existing cluster" . "$ETCD_NEW_MEMBERS_ENV_FILE" else - # We do not rely on the original value of ETCD_INITIAL_CLUSTER even - # when bootstrapping a new cluster since we cannot assume - # that all nodes will come-up healthy - ETCD_INITIAL_CLUSTER="$(recalculate_initial_cluster)" - export ETCD_INITIAL_CLUSTER + # We rely on the original value of ETCD_INITIAL_CLUSTER + # when bootstrapping a new cluster since + # we need all intial members to calcualte a same cluster_id fi declare -a cmd=("etcd")