diff options
author | Feng Pan <fpan@redhat.com> | 2016-09-19 14:29:03 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2016-09-20 00:59:07 +0000 |
commit | e6d610962e039ef212814eee564221d96f5d5f5a (patch) | |
tree | 98757d2871fcaddb5f3530149130c0138d15d304 /lib/overcloud-deploy-functions.sh | |
parent | 8de69c788492bdaa694b4cba2ec8099bc88c0db1 (diff) |
Fix TenantNIC and PublicNIC config
- We now check if vairables (public/private)_(compute/controller)_interface
are set before performing substitution. If those variables are not set,
default values (nic2 for private and nic3 for public) are used.
- Change TenantNIC and PublicNIC variables to be role specific.
opnfv-tht-pr: 80
Change-Id: I4c0c9d5c2239ea1914b5d2de63f2b5c4f63c8fb0
Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'lib/overcloud-deploy-functions.sh')
-rwxr-xr-x | lib/overcloud-deploy-functions.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index 498fd135..c7301fdd 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -178,8 +178,20 @@ EOI # set NIC heat params and resource registry ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI -sudo sed -i '/TenantNIC:/c\ TenantNIC: '${private_network_compute_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml -sudo sed -i '/PublicNIC:/c\ PublicNIC: '${public_network_compute_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml +if [ -n "${private_network_compute_interface}" ]; then + sudo sed -i '/ComputeTenantNIC:/c\ ComputeTenantNIC: '${private_network_compute_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml +fi +if [ -n "${private_network_controller_interface}" ]; then + sudo sed -i '/ControllerTenantNIC:/c\ ControllerTenantNIC: '${private_network_controller_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml +fi +# TODO: PublicNIC is not used today, however, in the future, we'll bind public nic to DPDK as well for certain scenarios. At that time, +# we'll need to make sure public network is enabled. +if [ -n "${public_network_compute_interface}" ]; then + sudo sed -i '/ComputePublicNIC:/c\ ComputePublicNIC: '${public_network_compute_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml +fi +if [ -n "${public_network_controller_interface}" ]; then + sudo sed -i '/ControllerPublicNIC:/c\ ControllerPublicNIC: '${public_network_controller_interface} /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml +fi EOI DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml" |