From 8adcd914205e75c490dee70272aaad937c27796c Mon Sep 17 00:00:00 2001 From: Kaiyu Zhu Date: Thu, 20 Apr 2023 10:09:09 +0800 Subject: [PATCH] fix: tdengine swarm cluster(3 mnodes) startup error (#20966) * fix: tdengine swarm cluster(3 mnodes) startup error add check if dnode has been created when TDengine docker image starts Resolves #19837 * refactor: change the check (#6f53e8ed76) location --- packaging/docker/bin/entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/docker/bin/entrypoint.sh b/packaging/docker/bin/entrypoint.sh index f4be349c0d..f2811de7bd 100755 --- a/packaging/docker/bin/entrypoint.sh +++ b/packaging/docker/bin/entrypoint.sh @@ -42,8 +42,9 @@ if [ "$DISABLE_ADAPTER" = "0" ]; then done fi -# if has mnode ep set or the host is first ep or not for cluster, just start. -if [ -f "$DATA_DIR/dnode/mnodeEpSet.json" ] || +# if dnode has been created or has mnode ep set or the host is first ep or not for cluster, just start. +if [ -f "$DATA_DIR/dnode/dnode.json" ] || + [ -f "$DATA_DIR/dnode/mnodeEpSet.json" ] || [ "$TAOS_FQDN" = "$FIRST_EP_HOST" ]; then $@ # others will first wait the first ep ready. -- GitLab