From: Tim Rozet Date: Wed, 9 Sep 2015 13:45:16 +0000 (+0000) Subject: Merge "Fixes horizon IP URL for non-HA deployments" X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=55846e9216601a5e3eeb0b16d0ede70fb684c03a;hp=db4a9ac5492659cd435b4e4e84868510259c6b29;p=genesis.git Merge "Fixes horizon IP URL for non-HA deployments" --- diff --git a/foreman/ci/deploy.sh b/foreman/ci/deploy.sh index 18a0301..29ad83c 100755 --- a/foreman/ci/deploy.sh +++ b/foreman/ci/deploy.sh @@ -539,6 +539,13 @@ configure_network() { ##set variable info if [ ! -z "$static_ip_range" ]; then new_ip=$(echo $static_ip_range | cut -d , -f1) + subnet_mask=$(find_netmask $this_default_gw_interface) + host_subnet=$(find_subnet $interface_ip $subnet_mask) + ip_range_subnet=$(find_subnet $new_ip $subnet_mask) + if [ "$ip_range_subnet" != "$host_subnet" ]; then + echo "${red}static_ip_range: ${static_ip_range} is not in the same subnet as your default gateway interface: ${host_subnet}. Please use a correct range!${reset}" + exit 1 + fi else new_ip=$(next_usable_ip $interface_ip) if [ ! "$new_ip" ]; then