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
This commit is contained in:
Kaiyu Zhu 2023-04-20 10:09:09 +08:00 committed by GitHub
parent 5fd6ac4fc5
commit 8adcd91420
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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.