From 19279b0f87e2ab1c684d62078df296211d3a60cc Mon Sep 17 00:00:00 2001 From: Antoni Segura Puimedon Date: Fri, 16 Jun 2017 16:03:32 +0200 Subject: [PATCH] etcd3: Allow for multi-host deployments In Multi host deployments, it is possible to run ETCD in a different host than the SERVICE_HOST (where all the controllers run). This patch brings that distinction. Change-Id: I15fe6f25eedf1efebaab81cce26b080577b856cc Signed-off-by: Antoni Segura Puimedon --- lib/etcd3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/etcd3 b/lib/etcd3 index f8b113bae6..75c2ae93ae 100644 --- a/lib/etcd3 +++ b/lib/etcd3 @@ -53,9 +53,9 @@ function start_etcd3 { cmd+=" --initial-cluster-state new --initial-cluster-token etcd-cluster-01" cmd+=" --initial-cluster $HOSTNAME=http://$SERVICE_HOST:2380" cmd+=" --initial-advertise-peer-urls http://$SERVICE_HOST:2380" - cmd+=" --advertise-client-urls http://$SERVICE_HOST:$ETCD_PORT" + cmd+=" --advertise-client-urls http://${HOST_IP}:$ETCD_PORT" cmd+=" --listen-peer-urls http://0.0.0.0:2380 " - cmd+=" --listen-client-urls http://$SERVICE_HOST:$ETCD_PORT" + cmd+=" --listen-client-urls http://${HOST_IP}:$ETCD_PORT" local unitfile="$SYSTEMD_DIR/$ETCD_SYSTEMD_SERVICE" write_user_unit_file $ETCD_SYSTEMD_SERVICE "$cmd" "" "root"