Fix cluster mismatch when startup (#44)

Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
This commit is contained in:
shaoyue 2022-07-01 18:41:37 +08:00 committed by Bitnami Containers
parent e2d3e5d73b
commit 123be37878
3 changed files with 9 additions and 17 deletions

View File

@ -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")

View File

@ -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")

View File

@ -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")