Commit d23ff85 1 parent 4f5c8c1 commit d23ff85 Copy full SHA for d23ff85
File tree 1 file changed +10
-1
lines changed
charts/tidb-cluster/templates/scripts
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,16 @@ ARGS="--data-dir=/var/lib/pd \
62
62
--config=/etc/pd/pd.toml \
63
63
"
64
64
65
- if [[ ! -f /var/lib/pd/join && ! -d /var/lib/pd/member/wal ]]
65
+ if [[ -f /var/lib/pd/join ]]
66
+ then
67
+ # The content of the join file is:
68
+ # demo-pd-0=http://demo-pd-0.demo-pd-peer.demo.svc:2380,demo-pd-1=http://demo-pd-1.demo-pd-peer.demo.svc:2380
69
+ # The --join args must be:
70
+ # --join=http://demo-pd-0.demo-pd-peer.demo.svc:2380,http://demo-pd-1.demo-pd-peer.demo.svc:2380
71
+ join=` cat /var/lib/pd/join | tr " ," " \n" | awk -F' =' ' {print $2}' | tr " \n" " ," `
72
+ join=${join% ,}
73
+ ARGS=" ${ARGS} --join=${join} "
74
+ elif [[ ! -d /var/lib/pd/member/wal ]]
66
75
then
67
76
until result=$( wget -qO- -T 3 http://${discovery_url} /new/${encoded_domain_url} 2> /dev/null) ; do
68
77
echo " waiting for discovery service returns start args ..."
You can’t perform that action at this time.
0 commit comments