diff options
author | Tim Rozet <trozet@redhat.com> | 2016-11-30 15:37:12 -0500 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2016-12-02 14:27:30 -0500 |
commit | ffeea8b7aff158a65b5f8c7baf445c6f2206790f (patch) | |
tree | 410b0d3ffc8b4c6a49864717fb1db4c7c14599dd /lib/post-install-functions.sh | |
parent | 71b677dcf162eb6eb22f116ee1b08714efb24db3 (diff) |
Fixes using single network (previously called flat) for deploy
Also contains various network parsing fixes.
JIRA: APEX-361
Change-Id: I5e40ed67267d5ded85adc2982a8726ebbceaeae5
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/post-install-functions.sh')
-rwxr-xr-x | lib/post-install-functions.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh index 1055994e..102b86f5 100755 --- a/lib/post-install-functions.sh +++ b/lib/post-install-functions.sh @@ -13,7 +13,10 @@ function configure_post_install { local opnfv_attach_networks ovs_ip ip_range net_cidr tmp_ip af external_network_ipv6 external_network_ipv6=False - opnfv_attach_networks="admin external" + opnfv_attach_networks="admin" + if [[ $enabled_network_list =~ "external" ]]; then + opnfv_attach_networks+=' external' + fi echo -e "${blue}INFO: Post Install Configuration Running...${reset}" @@ -94,8 +97,11 @@ else fi if [ "$external_network_ipv6" == "True" ]; then neutron subnet-create --name external-net --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') external --ip_version 6 --ipv6_ra_mode slaac --ipv6_address_mode slaac --gateway ${external_gateway} --allocation-pool start=${external_floating_ip_range%%,*},end=${external_floating_ip_range##*,} ${external_cidr} -else +elif [[ "$enabled_network_list" =~ "external" ]]; then neutron subnet-create --name external-net --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') --disable-dhcp external --gateway ${external_gateway} --allocation-pool start=${external_floating_ip_range%%,*},end=${external_floating_ip_range##*,} ${external_cidr} +else + # we re-use the introspection range for floating ips with single admin network + neutron subnet-create --name external-net --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') --disable-dhcp external --gateway ${admin_gateway} --allocation-pool start=${admin_introspection_range%%,*},end=${admin_introspection_range##*,} ${admin_cidr} fi echo "Removing sahara endpoint and service" @@ -145,8 +151,13 @@ EOI # for virtual, we NAT external network through Undercloud # same goes for baremetal if only jumphost has external connectivity if [ "$virtual" == "TRUE" ] || ! test_overcloud_connectivity && [ "$external_network_ipv6" != "True" ]; then - if ! configure_undercloud_nat ${external_cidr}; then - echo -e "${red}ERROR: Unable to NAT undercloud with external net: ${external_cidr}${reset}" + if [[ "$enabled_network_list" =~ "external" ]]; then + nat_cidr=${external_cidr} + else + nat_cidr=${admin_cidr} + fi + if ! configure_undercloud_nat ${nat_cidr}; then + echo -e "${red}ERROR: Unable to NAT undercloud with external net: ${nat_cidr}${reset}" exit 1 else echo -e "${blue}INFO: Undercloud VM has been setup to NAT Overcloud external network${reset}" |