mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #36741 from wojtek-t/fix_migration_ports
Automatic merge from submit-queue Fix ports in migration script This may fix problems with migration that you observed.
This commit is contained in:
commit
09a6da3207
@ -101,12 +101,12 @@ fi
|
|||||||
start_etcd() {
|
start_etcd() {
|
||||||
# Use random ports, so that apiserver cannot connect to etcd.
|
# Use random ports, so that apiserver cannot connect to etcd.
|
||||||
ETCD_PORT=18629
|
ETCD_PORT=18629
|
||||||
ETCD_PEER_PORT=18630
|
ETCD_PEER_PORT=2380
|
||||||
# Avoid collisions between etcd and event-etcd.
|
# Avoid collisions between etcd and event-etcd.
|
||||||
case "${DATA_DIRECTORY}" in
|
case "${DATA_DIRECTORY}" in
|
||||||
*event*)
|
*event*)
|
||||||
ETCD_PORT=18631
|
ETCD_PORT=18631
|
||||||
ETCD_PEER_PORT=18632
|
ETCD_PEER_PORT=2381
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
local ETCD_CMD="${ETCD:-/usr/local/bin/etcd-${START_VERSION}}"
|
local ETCD_CMD="${ETCD:-/usr/local/bin/etcd-${START_VERSION}}"
|
||||||
@ -117,7 +117,8 @@ start_etcd() {
|
|||||||
else
|
else
|
||||||
ETCDCTL_CMD="${ETCDCTL_CMD} --endpoints=http://127.0.0.1:${ETCD_PORT} put"
|
ETCDCTL_CMD="${ETCDCTL_CMD} --endpoints=http://127.0.0.1:${ETCD_PORT} put"
|
||||||
fi
|
fi
|
||||||
${ETCD_CMD} --data-dir=${DATA_DIRECTORY} \
|
${ETCD_CMD} --name="etcd-$(hostname)" \
|
||||||
|
--data-dir=${DATA_DIRECTORY} \
|
||||||
--listen-client-urls http://127.0.0.1:${ETCD_PORT} \
|
--listen-client-urls http://127.0.0.1:${ETCD_PORT} \
|
||||||
--advertise-client-urls http://127.0.0.1:${ETCD_PORT} \
|
--advertise-client-urls http://127.0.0.1:${ETCD_PORT} \
|
||||||
--listen-peer-urls http://127.0.0.1:${ETCD_PEER_PORT} \
|
--listen-peer-urls http://127.0.0.1:${ETCD_PEER_PORT} \
|
||||||
|
Loading…
Reference in New Issue
Block a user