diff options
author | randyl <r.levensalor@cablelabs.com> | 2015-09-14 18:11:23 -0600 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2015-09-18 14:09:29 +0000 |
commit | 27369695b4503ae4f3b17c7b0785d2490bd83298 (patch) | |
tree | 9edcf95634a40cab6f7e94d86ecfb822ca317849 | |
parent | c7dbe0fad10db9fe178ce18bbe501f8e678285a2 (diff) |
Corrects the default route on controllers
BGS-84
After the changes to br-ex on the control nodes. The default route
was no longer correct on the control nodes in bare metal deployments.
Added an admin_network paramater for barmetal deployments.
Added logic on br-ex in to set DEROUTE=no on the admin network
in the extern_net_presetup.
Tested on HA physical deployment.
Change-Id: Ic4b1ef521da2c55590990411f3f2444d4c94b019
Signed-off-by: randyl <r.levensalor@cablelabs.com>
(cherry picked from commit 7dc718a545c2da1b7bf150bf652705aeb98b245c)
-rw-r--r-- | common/puppet-opnfv/manifests/external_net_presetup.pp | 13 | ||||
-rwxr-xr-x | foreman/ci/deploy.sh | 8 | ||||
-rw-r--r-- | foreman/ci/opnfv_ksgen_settings.yml | 1 | ||||
-rw-r--r-- | foreman/ci/opnfv_ksgen_settings_no_HA.yml | 1 |
4 files changed, 22 insertions, 1 deletions
diff --git a/common/puppet-opnfv/manifests/external_net_presetup.pp b/common/puppet-opnfv/manifests/external_net_presetup.pp index 96038c0..f52b903 100644 --- a/common/puppet-opnfv/manifests/external_net_presetup.pp +++ b/common/puppet-opnfv/manifests/external_net_presetup.pp @@ -24,13 +24,24 @@ class opnfv::external_net_presetup { $controllers_hostnames_array_str = $controllers_hostnames_array $controllers_hostnames_array = split($controllers_hostnames_array, ',') + if ($admin_network != '') and ($admin_network != 'false') { + $admin_nic = get_nic_from_network("$admin_network") + if $admin_nic == '' { fail('admin_nic was not found') } + #Disable defalute route on Admin network + file_line { 'disable-defroute-admin': + path => "/etc/sysconfig/network-scripts/ifcfg-$admin_nic", + line => 'DEFROUTE=no', + match => '^DEFROUTE', + } + } + #find public NIC $public_nic = get_nic_from_network("$public_network") $public_nic_ip = get_ip_from_nic("$public_nic") $public_nic_netmask = get_netmask_from_nic("$public_nic") if ($public_nic == '') or ($public_nic_ip == '') or ($public_nic == "br-ex") or ($public_nic == "br_ex") { - notify {"Skipping augeas, public_nic ${public_nic}, public_nic_ip ${public_nic_ip}":} + notify {"Skipping augeas, public_nic ${public_nic}, public_nic_ip ${public_nic_ip}":} exec {'ovs-vsctl -t 10 -- --may-exist add-br br-ex': path => ["/usr/sbin/", "/usr/bin/"], diff --git a/foreman/ci/deploy.sh b/foreman/ci/deploy.sh index 83d1b81..6fffeca 100755 --- a/foreman/ci/deploy.sh +++ b/foreman/ci/deploy.sh @@ -593,6 +593,7 @@ configure_network() { subnet_mask=$(find_netmask $interface) if [ "$if_counter" -eq 0 ]; then admin_subnet_mask=$subnet_mask + admin_ip=$new_ip if ! verify_subnet_size $admin_subnet_mask 5; then echo "${red} Not enough IPs in admin subnet: ${interface_ip_arr[$if_counter]} ${admin_subnet_mask}. Need at least 5 IPs. Please resize subnet! Exiting ${reset}" exit 1 @@ -887,6 +888,13 @@ configure_network() { done <<< "$public_output" fi + ##replace admin_network param for bare metal deployments + if [ -z "$virtual" ]; then + admin_subnet=$(find_subnet $admin_ip $admin_subnet_mask) + sed -i 's/^.*admin_network:.*$/ admin_network:'" $admin_subnet"'/' opnfv_ksgen_settings.yml + else + sed -i 's/^.*admin_network:.*$/ admin_network:'" \"false\""'/' opnfv_ksgen_settings.yml + fi ##replace public_network param public_subnet=$(find_subnet $next_public_ip $public_subnet_mask) sed -i 's/^.*public_network:.*$/ public_network:'" $public_subnet"'/' opnfv_ksgen_settings.yml diff --git a/foreman/ci/opnfv_ksgen_settings.yml b/foreman/ci/opnfv_ksgen_settings.yml index a6d2207..2859616 100644 --- a/foreman/ci/opnfv_ksgen_settings.yml +++ b/foreman/ci/opnfv_ksgen_settings.yml @@ -7,6 +7,7 @@ global_params: controllers_hostnames_array: oscontroller1,oscontroller2,oscontroller3 controllers_ip_array: amqp_vip: + admin_network: private_subnet: cinder_admin_vip: cinder_private_vip: diff --git a/foreman/ci/opnfv_ksgen_settings_no_HA.yml b/foreman/ci/opnfv_ksgen_settings_no_HA.yml index 71d3108..3066038 100644 --- a/foreman/ci/opnfv_ksgen_settings_no_HA.yml +++ b/foreman/ci/opnfv_ksgen_settings_no_HA.yml @@ -3,6 +3,7 @@ global_params: ha_flag: "false" odl_flag: "true" odl_control_ip: + admin_network: private_network: storage_network: public_network: |