X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=foreman%2Fci%2Fdeploy.sh;h=080399325113e45d801e0974a9e3d3a1e955f4f8;hb=d689ac34fd5844888decbdb973275a6bf20264c0;hp=6771da0c1243da598ee3ee1a9a5b07415d4cd61a;hpb=e65ed372ee84b1f634ec24002fb7bfd7d48fd7e7;p=genesis.git diff --git a/foreman/ci/deploy.sh b/foreman/ci/deploy.sh index 6771da0..0803993 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