From 0d7dd1ad6fea41e76f7ff2a94aacea9fde052aaa Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Tue, 7 Jul 2015 14:18:37 -0700 Subject: [PATCH] don't use PORTS Signed-off-by: Victor Vieux --- test/integration/helpers.bash | 1 - test/integration/mesos/mesos_helpers.bash | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/helpers.bash b/test/integration/helpers.bash index b510a5dc55..787e6b876d 100644 --- a/test/integration/helpers.bash +++ b/test/integration/helpers.bash @@ -161,7 +161,6 @@ function start_docker() { for ((i=current; i < (current + instances); i++)); do local port=$(($BASE_PORT + $i)) HOSTS[$i]=127.0.0.1:$port - PORTS[$i]=$port # We have to manually call `hostname` since --hostname and --net cannot # be used together. diff --git a/test/integration/mesos/mesos_helpers.bash b/test/integration/mesos/mesos_helpers.bash index 989ac1fd69..e7558bdc93 100644 --- a/test/integration/mesos/mesos_helpers.bash +++ b/test/integration/mesos/mesos_helpers.bash @@ -15,9 +15,10 @@ function start_mesos() { retry 10 1 eval "docker_host ps | grep 'mesos-master'" for ((i=0; i < current; i++)); do + local docker_port=$(echo ${HOSTS[$i]} | cut -d: -f2) MESOS_SLAVES[$i]=$( docker_host run --privileged -d --name mesos-slave-$i --volumes-from node-$i -e DOCKER_HOST="${HOSTS[$i]}" -v /sys/fs/cgroup:/sys/fs/cgroup --net=host \ - $MESOS_IMAGE /mesos/build/bin/mesos-slave.sh --master=127.0.0.1:$MESOS_MASTER_PORT --containerizers=docker --attributes="docker_port:${PORTS[$i]}" --hostname=127.0.0.1 --port=$(($MESOS_MASTER_PORT + (1 + $i))) + $MESOS_IMAGE /mesos/build/bin/mesos-slave.sh --master=127.0.0.1:$MESOS_MASTER_PORT --containerizers=docker --attributes="docker_port:$docker_port" --hostname=127.0.0.1 --port=$(($MESOS_MASTER_PORT + (1 + $i))) ) retry 10 1 eval "docker_host ps | grep 'mesos-slave-$i'" done