Fix connectivity problem in Scenario job

In Scenario job, tests consist of VMs mounting shares
provided by share servers.

Admin network is used by share migration tests and is
by default used in other tests as well. Previously it
used the same network address range as tenant networks
(used by VMs) and there was no conflict.

Recently some unknown change broke connectivity between
VMs and share server in scenario job. It seems as there
is now a conflict between those network addresses ranges.
This patch changes the admin network address range,
removing the existing conflict.

Closes-bug: #1616115

Change-Id: I5bdb70cae4eab2930f3f559a621643ad732909bb
This commit is contained in:
Rodrigo Barbieri 2016-08-23 09:25:52 -03:00 committed by Goutham Pacha Ravi
parent 3b73777227
commit 088747cb77
3 changed files with 27 additions and 13 deletions

View File

@ -65,6 +65,10 @@ else
echo "MANILA_MULTI_BACKEND=False" >> $localrc_path
fi
# Set MANILA_ADMIN_NET_RANGE for admin_network and data_service IP
echo "MANILA_ADMIN_NET_RANGE=${MANILA_ADMIN_NET_RANGE:=10.2.5.0/24}" >> $localrc_path
echo "MANILA_DATA_NODE_IP=${MANILA_DATA_NODE_IP:=$MANILA_ADMIN_NET_RANGE}" >> $localrc_path
MANILA_SERVICE_IMAGE_ENABLED=False
if [[ "$DRIVER" == "generic" ]]; then
MANILA_SERVICE_IMAGE_ENABLED=True

View File

@ -318,6 +318,7 @@ function create_service_share_servers {
iniset $MANILA_CONF $BE tenant_net_name_or_ip private
else
if is_service_enabled neutron; then
if ! [[ -z $MANILA_ADMIN_NET_RANGE ]]; then
if [ $created_admin_network == false ]; then
project_id=$(openstack project show $SERVICE_PROJECT_NAME -c id -f value)
local admin_net_id=$( neutron net-list --all-tenants | grep " admin_net " | get_field 1 )
@ -327,7 +328,7 @@ function create_service_share_servers {
local admin_subnet_id=$( neutron subnet-list --all-tenants | grep " admin_subnet " | get_field 1 )
if [[ -z $admin_subnet_id ]]; then
admin_subnet_id=$(neutron subnet-create --tenant-id $project_id --ip_version 4 --no-gateway --name admin_subnet --subnetpool None $admin_net_id $FIXED_RANGE | grep ' id ' | get_field 2)
admin_subnet_id=$(neutron subnet-create --tenant-id $project_id --ip_version 4 --no-gateway --name admin_subnet --subnetpool None $admin_net_id $MANILA_ADMIN_NET_RANGE | grep ' id ' | get_field 2)
fi
created_admin_network=true
fi
@ -336,6 +337,7 @@ function create_service_share_servers {
fi
fi
fi
fi
done
configure_data_service_generic_driver
}
@ -349,7 +351,9 @@ function configure_data_service_generic_driver {
if [[ $(trueorfalse False driver_handles_share_servers) == False ]]; then
iniset $MANILA_CONF DEFAULT data_node_access_ip $PUBLIC_NETWORK_GATEWAY
else
iniset $MANILA_CONF DEFAULT data_node_access_ip $FIXED_RANGE
if ! [[ -z $MANILA_DATA_NODE_IP ]]; then
iniset $MANILA_CONF DEFAULT data_node_access_ip $MANILA_DATA_NODE_IP
fi
fi
fi
}

View File

@ -170,6 +170,12 @@ MANILA_DOCKER_IMAGE_URL=${MANILA_DOCKER_IMAGE_URL:-"https://github.com/a-ovchinn
MANILA_NETWORK_API_CLASS=${MANILA_NETWORK_API_CLASS:-"manila.network.neutron.neutron_network_plugin.NeutronBindNetworkPlugin"}
MANILA_NEUTRON_VNIC_TYPE=${MANILA_NEUTRON_VNIC_TYPE:-"normal"}
# Admin Network setup
MANILA_ADMIN_NET_RANGE=${MANILA_ADMIN_NET_RANGE:=10.2.5.0/24}
# Data Service IP configuration
MANILA_DATA_NODE_IP=${MANILA_DATA_NODE_IP:=$MANILA_ADMIN_NET_RANGE}
# Enable manila services
# ----------------------
# We have to add Manila to enabled services for screen_it to work