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:
parent
3b73777227
commit
088747cb77
@ -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
|
||||
|
@ -318,21 +318,23 @@ function create_service_share_servers {
|
||||
iniset $MANILA_CONF $BE tenant_net_name_or_ip private
|
||||
else
|
||||
if is_service_enabled neutron; 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 )
|
||||
if [[ -z $admin_net_id ]]; then
|
||||
admin_net_id=$(neutron net-create --tenant-id $project_id admin_net | grep ' id ' | get_field 2)
|
||||
fi
|
||||
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 )
|
||||
if [[ -z $admin_net_id ]]; then
|
||||
admin_net_id=$(neutron net-create --tenant-id $project_id admin_net | grep ' id ' | get_field 2)
|
||||
fi
|
||||
|
||||
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)
|
||||
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 $MANILA_ADMIN_NET_RANGE | grep ' id ' | get_field 2)
|
||||
fi
|
||||
created_admin_network=true
|
||||
fi
|
||||
created_admin_network=true
|
||||
iniset $MANILA_CONF $BE admin_network_id $admin_net_id
|
||||
iniset $MANILA_CONF $BE admin_subnet_id $admin_subnet_id
|
||||
fi
|
||||
iniset $MANILA_CONF $BE admin_network_id $admin_net_id
|
||||
iniset $MANILA_CONF $BE admin_subnet_id $admin_subnet_id
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user