Skip to content

Commit 09a6da3

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#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.
2 parents d60d9f3 + 2bccbaf commit 09a6da3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cluster/images/etcd/migrate-if-needed.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ fi
101101
start_etcd() {
102102
# Use random ports, so that apiserver cannot connect to etcd.
103103
ETCD_PORT=18629
104-
ETCD_PEER_PORT=18630
104+
ETCD_PEER_PORT=2380
105105
# Avoid collisions between etcd and event-etcd.
106106
case "${DATA_DIRECTORY}" in
107107
*event*)
108108
ETCD_PORT=18631
109-
ETCD_PEER_PORT=18632
109+
ETCD_PEER_PORT=2381
110110
;;
111111
esac
112112
local ETCD_CMD="${ETCD:-/usr/local/bin/etcd-${START_VERSION}}"
@@ -117,7 +117,8 @@ start_etcd() {
117117
else
118118
ETCDCTL_CMD="${ETCDCTL_CMD} --endpoints=http://127.0.0.1:${ETCD_PORT} put"
119119
fi
120-
${ETCD_CMD} --data-dir=${DATA_DIRECTORY} \
120+
${ETCD_CMD} --name="etcd-$(hostname)" \
121+
--data-dir=${DATA_DIRECTORY} \
121122
--listen-client-urls http://127.0.0.1:${ETCD_PORT} \
122123
--advertise-client-urls http://127.0.0.1:${ETCD_PORT} \
123124
--listen-peer-urls http://127.0.0.1:${ETCD_PEER_PORT} \

0 commit comments

Comments
 (0)