From 50bab952e49d425b17c8306162bb3726a3ab6717 Mon Sep 17 00:00:00 2001 From: Blaisonneau David Date: Fri, 31 Mar 2017 18:38:53 +0200 Subject: change default network gateway on containers with a public network Change-Id: Ic6b08b2942e94e8d8b9e7f46519058fcf3536d74 Signed-off-by: Blaisonneau David --- ci/03-maasdeploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ci/03-maasdeploy.sh') diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh index 4307088f..04066c9b 100755 --- a/ci/03-maasdeploy.sh +++ b/ci/03-maasdeploy.sh @@ -558,9 +558,10 @@ if [ -e ./labconfig.json ]; then NODE_SYS_ID=$(maas $PROFILE nodes read | jq -r ".[] | select(.hostname==\"$NODE_NAME\")".system_id) echo ">>> Configuring node $NODE_NAME [$NODE_ID][$NODE_SYS_ID]" # Recover the network interfaces list and configure each one - # with sorting the list, we have hardware interface first the vlan interfaces + # with sorting the list, we have hardware interface first, than the vlan interfaces IF_LIST=$(cat labconfig.json | jq --raw-output ".lab.racks[0].nodes[$NODE_ID].nics[] ".ifname | sort -u) for IF_NAME in $IF_LIST; do + # get the space of the interface IF_SPACE=$(cat labconfig.json | jq --raw-output ".lab.racks[0].nodes[$NODE_ID].nics[] | select(.ifname==\"$IF_NAME\") ".spaces[]) case "$IF_SPACE" in 'data') SUBNET_CIDR=$SUBNETDATA_CIDR; IF_MODE='AUTO' ;; -- cgit 1.2.3-korg