File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,9 +40,13 @@ function start_etcd3 {
4040 cmd+=" --initial-cluster-state new --initial-cluster-token etcd-cluster-01"
4141 cmd+=" --initial-cluster $HOSTNAME =http://$SERVICE_HOST :2380"
4242 cmd+=" --initial-advertise-peer-urls http://$SERVICE_HOST :2380"
43- cmd+=" --advertise-client-urls http://${HOST_IP} :$ETCD_PORT "
44- cmd+=" --listen-peer-urls http://0.0.0.0:2380 "
45- cmd+=" --listen-client-urls http://${HOST_IP} :$ETCD_PORT "
43+ cmd+=" --advertise-client-urls http://$SERVICE_HOST :$ETCD_PORT "
44+ if [ " $SERVICE_LISTEN_ADDRESS " == " ::" ]; then
45+ cmd+=" --listen-peer-urls http://[::]:2380 "
46+ else
47+ cmd+=" --listen-peer-urls http://0.0.0.0:2380 "
48+ fi
49+ cmd+=" --listen-client-urls http://$SERVICE_HOST :$ETCD_PORT "
4650
4751 local unitfile=" $SYSTEMD_DIR /$ETCD_SYSTEMD_SERVICE "
4852 write_user_unit_file $ETCD_SYSTEMD_SERVICE " $cmd " " " " root"
You can’t perform that action at this time.
0 commit comments