Merge "Don't assume single sub_node in nic config"

This commit is contained in:
Zuul 2017-12-07 03:38:32 +00:00 committed by Gerrit Code Review
commit f11fd9b918
1 changed files with 2 additions and 2 deletions

View File

@ -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"