mirror of
https://github.com/bitnami/containers.git
synced 2026-02-17 11:17:17 +08:00
[bitnami/redis-cluster] fix nodes.conf not found (#28670)
When the container is stopped after the entrypoint scripts are completed and before the redis server starts, nodes.sh is created but nodes.conf is missing. This prevents the entrypoint to successfully complete on next restart. This change fixes this behavior by checking the existence of nodes.conf in the entrypoint scripts. Signed-off-by: Hisanobu Tomari <posco.grubb@gmail.com>
This commit is contained in:
@@ -204,7 +204,7 @@ redis_cluster_update_ips() {
|
||||
read -ra nodes <<< "$(tr ',;' ' ' <<< "${REDIS_NODES}")"
|
||||
declare -A host_2_ip_array # Array to map hosts and IPs
|
||||
# Update the IPs when a number of nodes > quorum change their IPs
|
||||
if [[ ! -f "${REDIS_DATA_DIR}/nodes.sh" ]]; then
|
||||
if [[ ! -f "${REDIS_DATA_DIR}/nodes.sh" || ! -f "${REDIS_DATA_DIR}/nodes.conf" ]]; then
|
||||
# It is the first initialization so store the nodes
|
||||
for node in "${nodes[@]}"; do
|
||||
read -r -a host_and_port <<< "$(to_host_and_port "$node")"
|
||||
|
||||
@@ -204,7 +204,7 @@ redis_cluster_update_ips() {
|
||||
read -ra nodes <<< "$(tr ',;' ' ' <<< "${REDIS_NODES}")"
|
||||
declare -A host_2_ip_array # Array to map hosts and IPs
|
||||
# Update the IPs when a number of nodes > quorum change their IPs
|
||||
if [[ ! -f "${REDIS_DATA_DIR}/nodes.sh" ]]; then
|
||||
if [[ ! -f "${REDIS_DATA_DIR}/nodes.sh" || ! -f "${REDIS_DATA_DIR}/nodes.conf" ]]; then
|
||||
# It is the first initialization so store the nodes
|
||||
for node in "${nodes[@]}"; do
|
||||
read -r -a host_and_port <<< "$(to_host_and_port "$node")"
|
||||
|
||||
Reference in New Issue
Block a user