From 86608ee51af46cf6c56ed50b616b9014e90e61e7 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Mon, 27 Nov 2017 16:01:44 -0500 Subject: [PATCH] Don't assume single sub_node in nic config This nic config only works when there is one sub_node since we were cat'ing /etc/nodepool/sub_nodes_private expecting to get a single IP back. Instead, cat /etc/nodepool/node_private which will be the IP address of the given sub_node. Change-Id: I4958170b77838ea57c8f27531f70bf8d7a44302e --- ci/common/net-config-multinode-os-net-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/common/net-config-multinode-os-net-config.yaml b/ci/common/net-config-multinode-os-net-config.yaml index 7105a14da7..f72bc8938f 100644 --- a/ci/common/net-config-multinode-os-net-config.yaml +++ b/ci/common/net-config-multinode-os-net-config.yaml @@ -56,14 +56,14 @@ resources: function network_config_hook { primary_private_ip=$(cat /etc/nodepool/primary_node_private) sed -i "s/primary_private_ip/$primary_private_ip/" /etc/os-net-config/config.json - subnode_private_ip=$(cat /etc/nodepool/sub_nodes_private) + subnode_private_ip=$(cat /etc/nodepool/node_private) sed -i "s/subnode_private_ip/$subnode_private_ip/" /etc/os-net-config/config.json # We start with an arbitrarily high vni key so that we don't # overlap with Neutron created values. These will also match the # values that we've been using previously from the devstack-gate # code. vni=1000002 - subnode_index=$(grep -n $(cat /etc/nodepool/sub_nodes_private) /etc/nodepool/sub_nodes_private | cut -d: -f1) + subnode_index=$(grep -n $(cat /etc/nodepool/node_private) /etc/nodepool/sub_nodes_private | cut -d: -f1) let vni+=$subnode_index sed -i "s/vni/$vni/" /etc/os-net-config/config.json export interface_name="br-ex_$primary_private_ip"