X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Finclude-raw-integration-deploy-openstack-run-test.sh;h=f3b63c24decd92a3e336d094e22ef5e61c20af05;hb=b5be33b878d75af8df189ee55974405b9a08dff1;hp=92617cf5e94fdb956689f9985b2c155a56f04676;hpb=ec49935051ddb4550d35a0f20bde5248b9166837;p=releng%2Fbuilder.git diff --git a/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh b/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh index 92617cf5e..f3b63c24d 100644 --- a/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh +++ b/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh @@ -8,7 +8,7 @@ source ${ROBOT_VENV}/bin/activate echo "showing recent changes that made it in to the distribution used by this job" pip install --upgrade urllib3 python ${WORKSPACE}/test/tools/distchanges/changes.py -d /tmp/distribution_folder \ - -u ${ACTUALBUNDLEURL} -b ${BRANCH} \ + -u ${ACTUALBUNDLEURL} -b ${DISTROBRANCH} \ -r ssh://jenkins-${SILO}@git.opendaylight.org:29418 || true echo "#################################################" @@ -19,13 +19,16 @@ echo "#################################################" SSH="ssh -t -t" function create_control_node_local_conf { -local_conf_file_name=${WORKSPACE}/local.conf_control +HOSTIP=$1 +MGRIP=$2 +ODL_OVS_MANAGERS="$3" #Needs to be removed if [ "${ODL_ML2_BRANCH}" != "stable/ocata" ]; then RECLONE=no else RECLONE=yes fi +local_conf_file_name=${WORKSPACE}/local.conf_control_${HOSTIP} cat > ${local_conf_file_name} << EOF [[local|localrc]] LOGFILE=stack.sh.log @@ -47,13 +50,35 @@ cat >> ${local_conf_file_name} << EOF enable_service ${service_name} EOF done +for plugin_name in ${ENABLE_OS_PLUGINS} +do +if [ "$plugin_name" == "networking-odl" ]; then + ENABLE_PLUGIN_ARGS="${ODL_ML2_DRIVER_REPO} ${ODL_ML2_BRANCH}" +elif [ "$plugin_name" == "kuryr-kubernetes" ]; then + ENABLE_PLUGIN_ARGS="${DEVSTACK_KUBERNETES_PLUGIN_REPO} master" # note: kuryr-kubernetes only exists in master at the moment +elif [ "$plugin_name" == "neutron-lbaas" ]; then + ENABLE_PLUGIN_ARGS="${DEVSTACK_LBAAS_PLUGIN_REPO} ${OPENSTACK_BRANCH}" +elif [ "$plugin_name" == "networking-sfc" ]; then + ENABLE_PLUGIN_ARGS="${DEVSTACK_NETWORKING_SFC_PLUGIN_REPO} ${OPENSTACK_BRANCH}" +else + echo "Error: Invalid plugin $plugin_name, unsupported" + continue +fi +cat >> ${local_conf_file_name} << EOF +enable_plugin ${plugin_name} ${ENABLE_PLUGIN_ARGS} +EOF +done unset IFS - +if [ "${OPENSTACK_BRANCH}" == "master" ] || [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then # Ocata+ + # placement is mandatory for nova since Ocata, note that this requires computes to enable placement-client + # this should be moved into enabled_services for each job (but only for Ocata) + echo "enable_service placement-api" >> ${local_conf_file_name} +fi cat >> ${local_conf_file_name} << EOF -HOST_IP=$OPENSTACK_CONTROL_NODE_IP +HOST_IP=${HOSTIP} SERVICE_HOST=\$HOST_IP -NEUTRON_CREATE_INITIAL_NETWORKS=False +NEUTRON_CREATE_INITIAL_NETWORKS=${CREATE_INITIAL_NETWORKS} Q_PLUGIN=ml2 Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE} Q_OVS_USE_VETH=True @@ -72,12 +97,16 @@ SERVICE_TOKEN=service SERVICE_PASSWORD=admin ADMIN_PASSWORD=admin -enable_plugin networking-odl ${ODL_ML2_DRIVER_REPO} ${ODL_ML2_BRANCH} - ODL_PORT=8080 ODL_MODE=externalodl +ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING} + LIBVIRT_TYPE=qemu +ODL_MGR_IP=${MGRIP} +NEUTRON_LBAAS_SERVICE_PROVIDERV2=${LBAAS_SERVICE_PROVIDER} # Only relevant if neutron-lbaas plugin is enabled +NEUTRON_SFC_DRIVERS=odl_v2 # Only relevant if networking-sfc plugin is enabled +NEUTRON_FLOWCLASSIFIER_DRIVERS=odl_v2 # Only relevant if networking-sfc plugin is enabled EOF if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then @@ -94,37 +123,15 @@ if [ "${ODL_ML2_DRIVER_VERSION}" == "v2" ]; then echo "ODL_V2DRIVER=True" >> ${local_conf_file_name} fi -if [ "${NUM_ODL_SYSTEM}" -gt 1 ]; then -odl_list=${ODL_SYSTEM_1_IP} -for i in `seq 2 ${NUM_ODL_SYSTEM}` -do -odlip=ODL_SYSTEM_${i}_IP -odl_list=${odl_list},${!odlip} -done -if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then -HA_PROXY_INDEX=${NUM_OPENSTACK_SYSTEM} -odlmgrip=OPENSTACK_COMPUTE_NODE_${HA_PROXY_INDEX}_IP -odl_mgr_ip=${!odlmgrip} -else -odl_mgr_ip=${ODL_SYSTEM_1_IP} -fi -cat >> ${local_conf_file_name} << EOF -ODL_OVS_MANAGERS=${odl_list} -ODL_MGR_IP=${odl_mgr_ip} -EOF -else -cat >> ${local_conf_file_name} << EOF -ODL_MGR_IP=${ODL_SYSTEM_1_IP} -EOF -fi +echo "ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS}" >> ${local_conf_file_name} # if we are using the old netvirt impl, as determined by the feature name # odl-ovsdb-openstack (note: new impl is odl-netvirt-openstack) then we # want ODL_L3 to be True. New impl wants it False if [[ ${CONTROLLERFEATURES} == *"odl-ovsdb-openstack"* ]]; then - ODL_L3=True + ODL_L3=True else - ODL_L3=False + ODL_L3=False fi # if we are using the new netvirt impl, as determined by the feature name @@ -140,26 +147,36 @@ fi if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then cat >> ${local_conf_file_name} << EOF PUBLIC_BRIDGE=${PUBLIC_BRIDGE} -PUBLIC_PHYSICAL_NETWORK=physnet1 # FIXME this should be a parameter -ML2_VLAN_RANGES=physnet1 +PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK} +ML2_VLAN_RANGES=${PUBLIC_PHYSICAL_NETWORK} ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS} disable_service q-l3 PUBLIC_INTERFACE=br100 EOF -if [ -z ${DISABLE_ODL_L3_PLUGIN} ] || [ "${DISABLE_ODL_L3_PLUGIN}" == "no" ]; then if [ "${ODL_ML2_BRANCH}" == "stable/mitaka" ]; then cat >> ${local_conf_file_name} << EOF Q_L3_ENABLED=True ODL_L3=${ODL_L3} + +EOF +if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then +cat >> ${local_conf_file_name} << EOF [[post-config|\$NEUTRON_CONF]] [DEFAULT] -service_plugins = networking_odl.l3.l3_odl.OpenDaylightL3RouterPlugin +service_plugins = networking_odl.l3.l3_odl.OpenDaylightL3RouterPlugin, networking_l2gw.services.l2gateway.plugin.L2GatewayPlugin EOF +else +cat >> ${local_conf_file_name} << EOF +[[post-config|\$NEUTRON_CONF]] +[DEFAULT] +service_plugins = networking_odl.l3.l3_odl.OpenDaylightL3RouterPlugin +EOF +fi #check for ENABLE_NETWORKING_L2GW + fi #check for ODL_ML2_BRANCH -fi #check for DISABLE_ODL_L3_PLUGIN fi #ODL_ENABLE_L3_FWD check @@ -169,9 +186,10 @@ cat >> ${local_conf_file_name} << EOF minimize_polling=True [ml2] -# Needed for VLAN provider tests - because our provider networks are always encapsulated in VXLAN (br-physnet1) -# MTU(1440) + VXLAN(50) + VLAN(4) = 1494 < MTU eth0/br-phynset1(1500) -physical_network_mtus = physnet1:1440 +# Needed for VLAN provider tests - because our provider networks are always encapsulated in VXLAN (br-phys1) +# MTU(1440) + VXLAN(50) + VLAN(4) = 1494 < MTU eth0/br-phys1(1500) +physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1440 +path_mtu = 1490 [[post-config|/etc/neutron/dhcp_agent.ini]] [DEFAULT] @@ -190,12 +208,22 @@ cat ${local_conf_file_name} function create_compute_node_local_conf { HOSTIP=$1 +SERVICEHOST=$2 +MGRIP=$3 +ODL_OVS_MANAGERS="$4" #Needs to be removed if [ "${ODL_ML2_BRANCH}" != "stable/ocata" ]; then RECLONE=no else RECLONE=yes fi +if [ "${OPENSTACK_BRANCH}" == "master" ] || [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then # Ocata+ + # placement is mandatory for nova since Ocata, note that this requires controller to enable placement-api + ENABLED_SERVICES="n-cpu,placement-client" +else + ENABLED_SERVICES="n-cpu" +fi + local_conf_file_name=${WORKSPACE}/local.conf_compute_${HOSTIP} cat > ${local_conf_file_name} << EOF [[local|localrc]] @@ -206,10 +234,9 @@ RECLONE=${RECLONE} NOVA_VNC_ENABLED=True MULTI_HOST=1 -ENABLED_SERVICES=n-cpu - +ENABLED_SERVICES=${ENABLED_SERVICES} HOST_IP=${HOSTIP} -SERVICE_HOST=${OPENSTACK_CONTROL_NODE_IP} +SERVICE_HOST=${SERVICEHOST} Q_PLUGIN=ml2 ENABLE_TENANT_TUNNELS=True @@ -228,35 +255,20 @@ SERVICE_TOKEN=service SERVICE_PASSWORD=admin ADMIN_PASSWORD=admin -enable_plugin networking-odl ${ODL_ML2_DRIVER_REPO} ${ODL_ML2_BRANCH} ODL_MODE=compute +ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING} LIBVIRT_TYPE=qemu +ODL_MGR_IP=${MGRIP} EOF -if [ "${NUM_ODL_SYSTEM}" -gt 1 ]; then -odl_list=${ODL_SYSTEM_1_IP} -for i in `seq 2 ${NUM_ODL_SYSTEM}` -do -odlip=ODL_SYSTEM_${i}_IP -odl_list=${odl_list},${!odlip} -done -if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then -HA_PROXY_INDEX=${NUM_OPENSTACK_SYSTEM} -odlmgrip=OPENSTACK_COMPUTE_NODE_${HA_PROXY_INDEX}_IP -odl_mgr_ip=${!odlmgrip} -else -odl_mgr_ip=${ODL_SYSTEM_1_IP} -fi -cat >> ${local_conf_file_name} << EOF -ODL_OVS_MANAGERS=${odl_list} -ODL_MGR_IP=${odl_mgr_ip} -EOF -else +if [[ "${ENABLE_OS_PLUGINS}" =~ networking-odl ]]; then cat >> ${local_conf_file_name} << EOF -ODL_MGR_IP=${ODL_SYSTEM_1_IP} +enable_plugin networking-odl ${ODL_ML2_DRIVER_REPO} ${ODL_ML2_BRANCH} EOF fi +echo "ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS}" >> ${local_conf_file_name} + # if we are using the new netvirt impl, as determined by the feature name # odl-netvirt-openstack (note: old impl is odl-ovsdb-openstack) then we # want PROVIDER_MAPPINGS to be used -- this should be fixed if we want to support @@ -274,7 +286,7 @@ Q_L3_ENABLED=True ODL_L3=${ODL_L3} PUBLIC_INTERFACE=br100 # FIXME do we use br100 at all? PUBLIC_BRIDGE=${PUBLIC_BRIDGE} -PUBLIC_PHYSICAL_NETWORK=physnet1 # FIXME this should be a parameter +PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK} ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS} EOF fi @@ -283,9 +295,8 @@ cat ${local_conf_file_name} } function configure_haproxy_for_neutron_requests () { -HA_PROXY_INDEX=${NUM_OPENSTACK_SYSTEM} -odlmgrip=OPENSTACK_COMPUTE_NODE_${HA_PROXY_INDEX}_IP -ha_proxy_ip=${!odlmgrip} +MGRIP=$1 +ODL_IPS=(${2//,/ }) cat > ${WORKSPACE}/install_ha_proxy.sh<< EOF sudo systemctl stop firewalld @@ -314,32 +325,37 @@ defaults timeout check 10s listen opendaylight - bind ${ha_proxy_ip}:8080 + bind ${MGRIP}:8080 balance source EOF -for i in `seq 1 ${NUM_ODL_SYSTEM}` +odlindex=1 +for odlip in ${ODL_IPS[*]} do -odlip=ODL_SYSTEM_${i}_IP cat >> ${WORKSPACE}/haproxy.cfg << EOF - server controller-$i ${!odlip}:8080 check fall 5 inter 2000 rise 2 + server controller-${odlindex} ${odlip}:8080 check fall 5 inter 2000 rise 2 EOF +odlindex=$((odlindex+1)) done cat >> ${WORKSPACE}/haproxy.cfg << EOF listen opendaylight_rest - bind ${ha_proxy_ip}:8181 + bind ${MGRIP}:8181 balance source EOF -for i in `seq 1 ${NUM_ODL_SYSTEM}` +odlindex=1 +for odlip in ${ODL_IPS[*]} do -odlip=ODL_SYSTEM_${i}_IP cat >> ${WORKSPACE}/haproxy.cfg << EOF - server controller-rest-$i ${!odlip}:8181 check fall 5 inter 2000 rise 2 + server controller-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2 EOF +odlindex=$((odlindex+1)) done +echo "Dump haproxy.cfg" +cat ${WORKSPACE}/haproxy.cfg + cat > ${WORKSPACE}/deploy_ha_proxy.sh<< EOF sudo chown haproxy:haproxy /tmp/haproxy.cfg sudo sed -i 's/\\/etc\\/haproxy\\/haproxy.cfg/\\/tmp\\/haproxy.cfg/g' /usr/lib/systemd/system/haproxy.service @@ -350,14 +366,14 @@ sudo netstat -tunpl sudo systemctl status haproxy true EOF -scp ${WORKSPACE}/install_ha_proxy.sh ${ha_proxy_ip}:/tmp -${SSH} ${ha_proxy_ip} "sudo bash /tmp/install_ha_proxy.sh" -scp ${WORKSPACE}/haproxy.cfg ${ha_proxy_ip}:/tmp -scp ${WORKSPACE}/deploy_ha_proxy.sh ${ha_proxy_ip}:/tmp -${SSH} ${ha_proxy_ip} "sudo bash /tmp/deploy_ha_proxy.sh" +scp ${WORKSPACE}/install_ha_proxy.sh ${MGRIP}:/tmp +${SSH} ${MGRIP} "sudo bash /tmp/install_ha_proxy.sh" +scp ${WORKSPACE}/haproxy.cfg ${MGRIP}:/tmp +scp ${WORKSPACE}/deploy_ha_proxy.sh ${MGRIP}:/tmp +${SSH} ${MGRIP} "sudo bash /tmp/deploy_ha_proxy.sh" } -function collect_logs_and_exit (){ +function collect_logs_and_exit () { set +e # We do not want to create red dot just because something went wrong while fetching logs. for i in `seq 1 ${NUM_ODL_SYSTEM}` do @@ -382,8 +398,9 @@ do ${SSH} "${!CONTROLLERIP}" "tar -cf /tmp/odl${i}_karaf.log.tar /tmp/odl_log/*" scp "${!CONTROLLERIP}:/tmp/odl${i}_karaf.log.tar" "${WORKSPACE}/odl${i}_karaf.log.tar" tar -xvf ${WORKSPACE}/odl${i}_karaf.log.tar -C . --strip-components 2 --transform s/karaf/odl${i}_karaf/g - grep "ROBOT MESSAGE\| ERROR " odl1_karaf.log > odl${i}_err.log - grep "ROBOT MESSAGE\| ERROR \| WARN " odl1_karaf.log > odl${i}_err_warn.log + grep "ROBOT MESSAGE\| ERROR " odl${i}_karaf.log > odl${i}_err.log + grep "ROBOT MESSAGE\|Exception" odl${i}_karaf.log > odl${i}_exception.log + grep "ROBOT MESSAGE\| ERROR \| WARN \|Exception" odl${i}_karaf.log > odl${i}_err_warn_exception.log rm ${WORKSPACE}/odl${i}_karaf.log.tar done @@ -393,29 +410,38 @@ done mkdir -p ${WORKSPACE}/archives # Control Node -OS_CTRL_FOLDER="control" -mkdir -p ${OS_CTRL_FOLDER} -scp ${OPENSTACK_CONTROL_NODE_IP}:/opt/stack/devstack/nohup.out ${OS_CTRL_FOLDER}/stack.log -scp ${OPENSTACK_CONTROL_NODE_IP}:/var/log/openvswitch/ovs-vswitchd.log ${OS_CTRL_FOLDER}/ovs-vswitchd.log -rsync -avhe ssh ${OPENSTACK_CONTROL_NODE_IP}:/opt/stack/logs/* ${OS_CTRL_FOLDER} # rsync to prevent copying of symbolic links -scp extra_debug.sh ${OPENSTACK_CONTROL_NODE_IP}:/tmp -${SSH} ${OPENSTACK_CONTROL_NODE_IP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log" -scp ${OPENSTACK_CONTROL_NODE_IP}:/tmp/extra_debug.log ${OS_CTRL_FOLDER}/extra_debug.log -mv local.conf_control ${OS_CTRL_FOLDER}/local.conf -mv ${OS_CTRL_FOLDER} ${WORKSPACE}/archives/ +for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}` +do + OS_CTRL_IP=OPENSTACK_CONTROL_NODE_${i}_IP + OS_CTRL_FOLDER="control_${i}" + mkdir -p ${OS_CTRL_FOLDER} + scp ${!OS_CTRL_IP}:/opt/stack/devstack/nohup.out ${OS_CTRL_FOLDER}/stack.log + scp ${!OS_CTRL_IP}:/var/log/openvswitch/ovs-vswitchd.log ${OS_CTRL_FOLDER}/ovs-vswitchd.log + scp ${!OS_CTRL_IP}:/etc/neutron/neutron.conf ${OS_CTRL_FOLDER}/neutron.conf + scp ${!OS_CTRL_IP}:/etc/nova/nova.conf ${OS_CTRL_FOLDER}/nova.conf + rsync -avhe ssh ${!OS_CTRL_IP}:/opt/stack/logs/* ${OS_CTRL_FOLDER} # rsync to prevent copying of symbolic links + scp extra_debug.sh ${!OS_CTRL_IP}:/tmp + ${SSH} ${!OS_CTRL_IP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log" + scp ${!OS_CTRL_IP}:/tmp/extra_debug.log ${OS_CTRL_FOLDER}/extra_debug.log + scp ${!OS_CTRL_IP}:/tmp/*.xz ${OS_CTRL_FOLDER}/ + mv local.conf_control_${!OS_CTRL_IP} ${OS_CTRL_FOLDER}/local.conf + mv ${OS_CTRL_FOLDER} ${WORKSPACE}/archives/ +done # Compute Nodes -for i in `seq 1 $((NUM_OPENSTACK_SYSTEM - 1))` +for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}` do OSIP=OPENSTACK_COMPUTE_NODE_${i}_IP OS_COMPUTE_FOLDER="compute_${i}" mkdir -p ${OS_COMPUTE_FOLDER} scp ${!OSIP}:/opt/stack/devstack/nohup.out ${OS_COMPUTE_FOLDER}/stack.log scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${OS_COMPUTE_FOLDER}/ovs-vswitchd.log + scp ${!OSIP}:/etc/nova/nova.conf ${OS_COMPUTE_FOLDER}/nova.conf rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${OS_COMPUTE_FOLDER} # rsync to prevent copying of symbolic links scp extra_debug.sh ${!OSIP}:/tmp ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log" scp ${!OSIP}:/tmp/extra_debug.log ${OS_COMPUTE_FOLDER}/extra_debug.log + scp ${!OSIP}:/tmp/*.xz ${OS_COMPUTE_FOLDER}/ mv local.conf_compute_${!OSIP} ${OS_COMPUTE_FOLDER}/local.conf mv ${OS_COMPUTE_FOLDER} ${WORKSPACE}/archives/ done @@ -424,13 +450,13 @@ ls local.conf* | xargs -I % mv % %.log # Tempest DEVSTACK_TEMPEST_DIR="/opt/stack/tempest" -if $(ssh ${OPENSTACK_CONTROL_NODE_IP} "sudo sh -c '[ -f ${DEVSTACK_TEMPEST_DIR}/.testrepository/0 ]'"); then # if Tempest results exist - ssh ${OPENSTACK_CONTROL_NODE_IP} "for I in \$(sudo ls ${DEVSTACK_TEMPEST_DIR}/.testrepository/ | grep -E '^[0-9]+$'); do sudo sh -c \"${DEVSTACK_TEMPEST_DIR}/.tox/tempest/bin/subunit-1to2 < ${DEVSTACK_TEMPEST_DIR}/.testrepository/\${I} >> ${DEVSTACK_TEMPEST_DIR}/subunit_log.txt\"; done" - ssh ${OPENSTACK_CONTROL_NODE_IP} "sudo sh -c '${DEVSTACK_TEMPEST_DIR}/.tox/tempest/bin/python ${DEVSTACK_TEMPEST_DIR}/.tox/tempest/lib/python2.7/site-packages/os_testr/subunit2html.py ${DEVSTACK_TEMPEST_DIR}/subunit_log.txt ${DEVSTACK_TEMPEST_DIR}/tempest_results.html'" +if $(ssh ${OPENSTACK_CONTROL_NODE_1_IP} "sudo sh -c '[ -f ${DEVSTACK_TEMPEST_DIR}/.testrepository/0 ]'"); then # if Tempest results exist + ssh ${OPENSTACK_CONTROL_NODE_1_IP} "for I in \$(sudo ls ${DEVSTACK_TEMPEST_DIR}/.testrepository/ | grep -E '^[0-9]+$'); do sudo sh -c \"${DEVSTACK_TEMPEST_DIR}/.tox/tempest/bin/subunit-1to2 < ${DEVSTACK_TEMPEST_DIR}/.testrepository/\${I} >> ${DEVSTACK_TEMPEST_DIR}/subunit_log.txt\"; done" + ssh ${OPENSTACK_CONTROL_NODE_1_IP} "sudo sh -c '${DEVSTACK_TEMPEST_DIR}/.tox/tempest/bin/python ${DEVSTACK_TEMPEST_DIR}/.tox/tempest/lib/python2.7/site-packages/os_testr/subunit2html.py ${DEVSTACK_TEMPEST_DIR}/subunit_log.txt ${DEVSTACK_TEMPEST_DIR}/tempest_results.html'" TEMPEST_LOGS_DIR=${WORKSPACE}/archives/tempest mkdir -p ${TEMPEST_LOGS_DIR} - scp ${OPENSTACK_CONTROL_NODE_IP}:${DEVSTACK_TEMPEST_DIR}/tempest_results.html ${TEMPEST_LOGS_DIR} - scp ${OPENSTACK_CONTROL_NODE_IP}:${DEVSTACK_TEMPEST_DIR}/tempest.log ${TEMPEST_LOGS_DIR} + scp ${OPENSTACK_CONTROL_NODE_1_IP}:${DEVSTACK_TEMPEST_DIR}/tempest_results.html ${TEMPEST_LOGS_DIR} + scp ${OPENSTACK_CONTROL_NODE_1_IP}:${DEVSTACK_TEMPEST_DIR}/tempest.log ${TEMPEST_LOGS_DIR} mv ${WORKSPACE}/tempest_output* ${TEMPEST_LOGS_DIR} fi } @@ -463,61 +489,96 @@ cd devstack git checkout $OPENSTACK_BRANCH EOF -echo "Create HAProxy if needed" -if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then - echo "Need to configure HAProxy" - configure_haproxy_for_neutron_requests -fi - +[ "$NUM_OPENSTACK_SITES" ] || NUM_OPENSTACK_SITES=1 +compute_index=1 +odl_index=1 os_node_list=() -echo "Stack the Control Node" -scp ${WORKSPACE}/get_devstack.sh ${OPENSTACK_CONTROL_NODE_IP}:/tmp -${SSH} ${OPENSTACK_CONTROL_NODE_IP} "bash /tmp/get_devstack.sh" -create_control_node_local_conf -scp ${WORKSPACE}/local.conf_control ${OPENSTACK_CONTROL_NODE_IP}:/opt/stack/devstack/local.conf - - -# Workworund for successful stacking with Mitaka -if [ "${ODL_ML2_BRANCH}" == "stable/mitaka" ]; then +os_interval=$(( ${NUM_OPENSTACK_SYSTEM} / ${NUM_OPENSTACK_SITES} )) +ha_proxy_index=${os_interval} - # Workaround for problems with latest versions/specified versions in requirements of openstack - # Openstacksdk,libvirt-python -> the current version does not work with Mitaka diue to some requirements - # conflict and breaks when trying to stack - # paramiko -> Problems with tempest tests due to paramiko incompatibility with pycrypto. - # the problem has been solved with version 1.17. If the latest version of paramiko is used, it causes - # other timeout problems - ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/mitaka; sed -i /openstacksdk/d upper-constraints.txt; sed -i /libvirt-python/d upper-constraints.txt; sed -i /paramiko/d upper-constraints.txt" - ssh ${OPENSTACK_CONTROL_NODE_IP} "sudo pip install deprecation" - ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack; git clone https://github.com/openstack/python-openstacksdk; cd python-openstacksdk; sudo python setup.py install" - ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack; git clone https://github.com/paramiko/paramiko; cd paramiko; git checkout 1.17; sudo python setup.py install" -fi - -ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &" -ssh ${OPENSTACK_CONTROL_NODE_IP} "ps -ef | grep stack.sh" -ssh ${OPENSTACK_CONTROL_NODE_IP} "ls -lrt /opt/stack/devstack/nohup.out" -os_node_list+=(${OPENSTACK_CONTROL_NODE_IP}) +cat > "${WORKSPACE}/manual_install_package.sh" << EOF +cd /opt/stack +git clone "\$1" +cd "\$2" +git checkout "\$3" +sudo python setup.py install +EOF -#Workaround for stable/newton jobs -if [ "${ODL_ML2_BRANCH}" == "stable/newton" ]; then - ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/newton; sed -i /appdirs/d upper-constraints.txt" -fi +for i in `seq 1 ${NUM_OPENSTACK_SITES}` +do + if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then + echo "Configure HAProxy" + ODL_HAPROXYIP_PARAM=OPENSTACK_HAPROXY_${i}_IP + ha_proxy_index=$(( $ha_proxy_index + $os_interval )) + odl_index=$(((i - 1) * 3 + 1)) + ODL_IP_PARAM1=ODL_SYSTEM_$((odl_index++))_IP + ODL_IP_PARAM2=ODL_SYSTEM_$((odl_index++))_IP + ODL_IP_PARAM3=ODL_SYSTEM_$((odl_index++))_IP + ODLMGRIP[$i]=${!ODL_HAPROXYIP_PARAM} # ODL Northbound uses HAProxy VIP + ODL_OVS_MGRS[$i]="${!ODL_IP_PARAM1},${!ODL_IP_PARAM2},${!ODL_IP_PARAM3}" # OVSDB connects to all ODL IPs + + configure_haproxy_for_neutron_requests ${!ODL_HAPROXYIP_PARAM} "${ODL_OVS_MGRS[$i]}" + else + ODL_IP_PARAM=ODL_SYSTEM_${i}_IP + ODL_OVS_MGRS[$i]="${!ODL_IP_PARAM}" # ODL Northbound uses ODL IP + ODLMGRIP[$i]=${!ODL_IP_PARAM} # OVSDB connects to ODL IP + fi +done +for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}` +do + echo "Stack the Control Node" + CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP + scp ${WORKSPACE}/get_devstack.sh ${!CONTROLIP}:/tmp + ${SSH} ${!CONTROLIP} "bash /tmp/get_devstack.sh" + create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP[$i]} "${ODL_OVS_MGRS[$i]}" + scp ${WORKSPACE}/local.conf_control_${!CONTROLIP} ${!CONTROLIP}:/opt/stack/devstack/local.conf + if [ "${ODL_ML2_BRANCH}" == "stable/mitaka" ]; then + # Workaround for problems with latest versions/specified versions in requirements of openstack + # Openstacksdk,libvirt-python -> the current version does not work with Mitaka diue to some requirements + # conflict and breaks when trying to stack + # paramiko -> Problems with tempest tests due to paramiko incompatibility with pycrypto. + # the problem has been solved with version 1.17. If the latest version of paramiko is used, it causes + # other timeout problems + ssh ${!CONTROLIP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/mitaka; sed -i /openstacksdk/d upper-constraints.txt; sed -i /libvirt-python/d upper-constraints.txt; sed -i /paramiko/d upper-constraints.txt" + scp "${WORKSPACE}/manual_install_package.sh" "${!CONTROLIP}:/tmp" + ssh ${!CONTROLIP} "sudo pip install deprecation" + # Fix for recent requirements update in the master branch of the sdk.The section must be replaced with a better fix. + ssh "${!CONTROLIP}" "sh /tmp/manual_install_package.sh https://github.com/openstack/python-openstacksdk python-openstacksdk 0.9.14" + ssh "${!CONTROLIP}" "sh /tmp/manual_install_package.sh https://github.com/paramiko/paramiko paramiko 1.17" + fi + ssh ${!CONTROLIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &" + ssh ${!CONTROLIP} "ps -ef | grep stack.sh" + ssh ${!CONTROLIP} "ls -lrt /opt/stack/devstack/nohup.out" + os_node_list+=(${!CONTROLIP}) + + #Workaround for stable/newton jobs + if [ "${ODL_ML2_BRANCH}" == "stable/newton" ]; then + ssh ${!CONTROLIP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/newton; sed -i /appdirs/d upper-constraints.txt" + fi +done -for i in `seq 1 $((NUM_OPENSTACK_SYSTEM - 1))` +for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}` do + echo "Stack the Compute Node" + NUM_COMPUTES_PER_SITE=$((NUM_OPENSTACK_COMPUTE_NODES / NUM_OPENSTACK_SITES)) + SITE_INDEX=$((((i - 1) / NUM_COMPUTES_PER_SITE) + 1)) # We need the site index to infer the control node IP for this compute COMPUTEIP=OPENSTACK_COMPUTE_NODE_${i}_IP + CONTROLIP=OPENSTACK_CONTROL_NODE_${SITE_INDEX}_IP scp ${WORKSPACE}/get_devstack.sh ${!COMPUTEIP}:/tmp ${SSH} ${!COMPUTEIP} "bash /tmp/get_devstack.sh" - create_compute_node_local_conf ${!COMPUTEIP} + create_compute_node_local_conf ${!COMPUTEIP} ${!CONTROLIP} ${ODLMGRIP[$SITE_INDEX]} "${ODL_OVS_MGRS[$SITE_INDEX]}" scp ${WORKSPACE}/local.conf_compute_${!COMPUTEIP} ${!COMPUTEIP}:/opt/stack/devstack/local.conf if [ "${ODL_ML2_BRANCH}" == "stable/mitaka" ]; then - ssh ${!COMPUTEIP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/mitaka; sed -i /libvirt-python/d upper-constraints.txt" + ssh ${!COMPUTEIP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/mitaka; sed -i /libvirt-python/d upper-constraints.txt" fi ssh ${!COMPUTEIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &" ssh ${!COMPUTEIP} "ps -ef | grep stack.sh" os_node_list+=(${!COMPUTEIP}) done +echo ${os_node_list[*]} + cat > ${WORKSPACE}/check_stacking.sh << EOF > /tmp/stack_progress ps -ef | grep "stack.sh" | grep -v grep @@ -568,82 +629,161 @@ done fi done -#Need to disable firewalld and iptables in control node -echo "Stop Firewall in Control Node for compute nodes to be able to reach the ports and add to hypervisor-list" -scp ${WORKSPACE}/disable_firewall.sh ${OPENSTACK_CONTROL_NODE_IP}:/tmp -${SSH} ${OPENSTACK_CONTROL_NODE_IP} "sudo bash /tmp/disable_firewall.sh" -echo "sleep for a minute and print hypervisor-list" -sleep 60 -${SSH} ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack/devstack; source openrc admin admin; nova hypervisor-list" -# in the case that we are doing openstack (control + compute) all in one node, then the number of hypervisors -# will be the same as the number of openstack systems. However, if we are doing multinode openstack then the -# assumption is we have a single control node and the rest are compute nodes, so the number of expected hypervisors -# is one less than the total number of openstack systems -if [ "${NUM_OPENSTACK_SYSTEM}" -eq 1 ]; then - expected_num_hypervisors=1 -else - expected_num_hypervisors=$((NUM_OPENSTACK_SYSTEM - 1)) -fi -num_hypervisors=$(${SSH} ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack/devstack; source openrc admin admin; openstack hypervisor list -f value | wc -l" | tail -1 | tr -d "\r") -if ! [ "${num_hypervisors}" ] || ! [ ${num_hypervisors} -eq ${expected_num_hypervisors} ]; then - echo "Error: Only $num_hypervisors hypervisors detected, expected $expected_num_hypervisors" - collect_logs_and_exit - exit 1 -fi - -#Need to disable firewalld and iptables in compute nodes as well -for i in `seq 1 $((NUM_OPENSTACK_SYSTEM - 1))` -do - OSIP=OPENSTACK_COMPUTE_NODE_${i}_IP - scp ${WORKSPACE}/disable_firewall.sh "${!OSIP}:/tmp" - ${SSH} "${!OSIP}" "sudo bash /tmp/disable_firewall.sh" -done - -# upgrading pip, urllib3 and httplib2 so that tempest tests can be run on ${OPENSTACK_CONTROL_NODE_IP} -# this needs to happen after devstack runs because it seems devstack is pulling in specific versions -# of these libs that are not working for tempest. -${SSH} ${OPENSTACK_CONTROL_NODE_IP} "sudo pip install --upgrade pip" -${SSH} ${OPENSTACK_CONTROL_NODE_IP} "sudo pip install urllib3 --upgrade" -${SSH} ${OPENSTACK_CONTROL_NODE_IP} "sudo pip install httplib2 --upgrade" - -for i in `seq 1 $((NUM_OPENSTACK_SYSTEM - 1))` +NUM_COMPUTES_PER_SITE=$((NUM_OPENSTACK_COMPUTE_NODES / NUM_OPENSTACK_SITES)) +for i in `seq 1 ${NUM_OPENSTACK_SITES}` do - IP_VAR=OPENSTACK_COMPUTE_NODE_${i}_IP - COMPUTE_IPS[$((i-1))]=${!IP_VAR} -done + echo "Configure the Control Node" + CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP + + #Need to disable firewalld and iptables in control node + echo "Stop Firewall in Control Node for compute nodes to be able to reach the ports and add to hypervisor-list" + scp ${WORKSPACE}/disable_firewall.sh ${!CONTROLIP}:/tmp + ${SSH} ${!CONTROLIP} "sudo bash /tmp/disable_firewall.sh" + + echo "sleep for 60s and print hypervisor-list" + sleep 60 + ${SSH} ${!CONTROLIP} "cd /opt/stack/devstack; source openrc admin admin; nova hypervisor-list" + # in the case that we are doing openstack (control + compute) all in one node, then the number of hypervisors + # will be the same as the number of openstack systems. However, if we are doing multinode openstack then the + # assumption is we have a single control node and the rest are compute nodes, so the number of expected hypervisors + # is one less than the total number of openstack systems + if [ $((NUM_OPENSTACK_SYSTEM / NUM_OPENSTACK_SITES - 1)) -eq 1 ]; then + expected_num_hypervisors=1 + else + expected_num_hypervisors=${NUM_COMPUTES_PER_SITE} + fi + num_hypervisors=$(${SSH} ${!CONTROLIP} "cd /opt/stack/devstack; source openrc admin admin; openstack hypervisor list -f value | wc -l" | tail -1 | tr -d "\r") + if ! [ "${num_hypervisors}" ] || ! [ ${num_hypervisors} -eq ${expected_num_hypervisors} ]; then + echo "Error: Only $num_hypervisors hypervisors detected, expected $expected_num_hypervisors" + collect_logs_and_exit + exit 1 + fi -# External Network -echo "prepare external networks by adding vxlan tunnels between all nodes on a separate bridge..." -devstack_index=1 -for ip in ${OPENSTACK_CONTROL_NODE_IP} ${COMPUTE_IPS[*]} -do - # FIXME - Workaround, ODL (new netvirt) currently adds PUBLIC_BRIDGE as a port in br-int since it doesn't see such a bridge existing when we stack - ${SSH} $ip "sudo ovs-vsctl --if-exists del-port br-int $PUBLIC_BRIDGE" - ${SSH} $ip "sudo ovs-vsctl --may-exist add-br $PUBLIC_BRIDGE -- set bridge $PUBLIC_BRIDGE other-config:disable-in-band=true other_config:hwaddr=f6:00:00:ff:01:0$((devstack_index++))" -done + # upgrading pip, urllib3 and httplib2 so that tempest tests can be run on openstack control node + # this needs to happen after devstack runs because it seems devstack is pulling in specific versions + # of these libs that are not working for tempest. + ${SSH} ${!CONTROLIP} "sudo pip install --upgrade pip" + ${SSH} ${!CONTROLIP} "sudo pip install urllib3 --upgrade" + ${SSH} ${!CONTROLIP} "sudo pip install httplib2 --upgrade" + + # Gather Compute IPs for the site + for j in `seq 1 ${NUM_COMPUTES_PER_SITE}` + do + COMPUTE_INDEX=$(((i-1) * NUM_COMPUTES_PER_SITE + j)) + IP_VAR=OPENSTACK_COMPUTE_NODE_${COMPUTE_INDEX}_IP + COMPUTE_IPS[$((j-1))]=${!IP_VAR} + done + + # Need to disable firewalld and iptables in compute nodes as well + for ip in ${COMPUTE_IPS[*]} + do + scp ${WORKSPACE}/disable_firewall.sh "${ip}:/tmp" + ${SSH} "${ip}" "sudo bash /tmp/disable_firewall.sh" + done + + # External Network + echo "prepare external networks by adding vxlan tunnels between all nodes on a separate bridge..." + # FIXME Should there be a unique gateway IP and devstack index for each site? + devstack_index=1 + for ip in ${!CONTROLIP} ${COMPUTE_IPS[*]} + do + # FIXME - Workaround, ODL (new netvirt) currently adds PUBLIC_BRIDGE as a port in br-int since it doesn't see such a bridge existing when we stack + ${SSH} $ip "sudo ovs-vsctl --if-exists del-port br-int $PUBLIC_BRIDGE" + ${SSH} $ip "sudo ovs-vsctl --may-exist add-br $PUBLIC_BRIDGE -- set bridge $PUBLIC_BRIDGE other-config:disable-in-band=true other_config:hwaddr=f6:00:00:ff:01:0$((devstack_index++))" + done + + # ipsec support + if [ "${IPSEC_VXLAN_TUNNELS_ENABLED}" == "yes" ]; then + ALL_NODES=(${!CONTROLIP} ${COMPUTE_IPS[*]}) + for ((inx_ip1=0; inx_ip1<$((${#ALL_NODES[@]} - 1)); inx_ip1++)) + do + for ((inx_ip2=$((inx_ip1 + 1)); inx_ip2<${#ALL_NODES[@]}; inx_ip2++)) + do + KEY1=0x$(dd if=/dev/urandom count=32 bs=1 2> /dev/null| xxd -p -c 64) + KEY2=0x$(dd if=/dev/urandom count=32 bs=1 2> /dev/null| xxd -p -c 64) + ID=0x$(dd if=/dev/urandom count=4 bs=1 2> /dev/null| xxd -p -c 8) + ip1=${ALL_NODES[$inx_ip1]} + ip2=${ALL_NODES[$inx_ip2]} + ${SSH} $ip1 "sudo ip xfrm state add src $ip1 dst $ip2 proto esp spi $ID reqid $ID mode transport auth sha256 $KEY1 enc aes $KEY2" + ${SSH} $ip1 "sudo ip xfrm state add src $ip2 dst $ip1 proto esp spi $ID reqid $ID mode transport auth sha256 $KEY1 enc aes $KEY2" + ${SSH} $ip1 "sudo ip xfrm policy add src $ip1 dst $ip2 proto udp dir out tmpl src $ip1 dst $ip2 proto esp reqid $ID mode transport" + ${SSH} $ip1 "sudo ip xfrm policy add src $ip2 dst $ip1 proto udp dir in tmpl src $ip2 dst $ip1 proto esp reqid $ID mode transport" + + ${SSH} $ip2 "sudo ip xfrm state add src $ip2 dst $ip1 proto esp spi $ID reqid $ID mode transport auth sha256 $KEY1 enc aes $KEY2" + ${SSH} $ip2 "sudo ip xfrm state add src $ip1 dst $ip2 proto esp spi $ID reqid $ID mode transport auth sha256 $KEY1 enc aes $KEY2" + ${SSH} $ip2 "sudo ip xfrm policy add src $ip2 dst $ip1 proto udp dir out tmpl src $ip2 dst $ip1 proto esp reqid $ID mode transport" + ${SSH} $ip2 "sudo ip xfrm policy add src $ip1 dst $ip2 proto udp dir in tmpl src $ip1 dst $ip2 proto esp reqid $ID mode transport" + done + done + + for ip in ${!CONTROLIP} ${COMPUTE_IPS[*]} + do + echo "ip xfrm configuration for node $ip:" + ${SSH} $ip "sudo ip xfrm policy list" + ${SSH} $ip "sudo ip xfrm state list" + done + fi -# Control Node - PUBLIC_BRIDGE will act as the external router -GATEWAY_IP="10.10.10.250" # FIXME this should be a parameter, also shared with integration-test -${SSH} ${OPENSTACK_CONTROL_NODE_IP} "sudo ifconfig $PUBLIC_BRIDGE up ${GATEWAY_IP}/24" -compute_index=1 -for compute_ip in ${COMPUTE_IPS[*]} -do - # Tunnel from controller to compute - PORT_NAME=compute$((compute_index++))_vxlan - ${SSH} ${OPENSTACK_CONTROL_NODE_IP} "sudo ovs-vsctl add-port $PUBLIC_BRIDGE $PORT_NAME -- set interface $PORT_NAME type=vxlan options:local_ip="${OPENSTACK_CONTROL_NODE_IP}" options:remote_ip="$compute_ip" options:dst_port=9876 options:key=flow" + # Control Node - PUBLIC_BRIDGE will act as the external router + # Parameter values below are used in integration/test - changing them requires updates in intergration/test as well + EXTNET_GATEWAY_IP="10.10.10.250" + EXTNET_VLAN_ID=167 + EXTNET_INTERNET_IP="10.9.9.9" + EXTNET_PNF_IP="10.10.10.253" + if [[ ${CONTROLLERFEATURES} == *"odl-ovsdb-openstack"* ]]; then + ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE} up ${EXTNET_GATEWAY_IP}/24" + else + ${SSH} ${!CONTROLIP} "sudo ip link add link ${PUBLIC_BRIDGE} name ${PUBLIC_BRIDGE}.${EXTNET_VLAN_ID} type vlan id ${EXTNET_VLAN_ID}" + ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE} up" + ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE}.${EXTNET_VLAN_ID} up ${EXTNET_GATEWAY_IP}/24" + + # Control Node - external net PNF simulation + ${SSH} ${!CONTROLIP} " + sudo ip netns add pnf_ns; + sudo ip link add pnf_veth0 type veth peer name pnf_veth1; + sudo ip link set pnf_veth1 netns pnf_ns; + sudo ip link set pnf_veth0 up; + sudo ip netns exec pnf_ns ifconfig pnf_veth1 up; + sudo ip netns exec pnf_ns ip link add link pnf_veth1 name pnf_veth1.${EXTNET_VLAN_ID} type vlan id ${EXTNET_VLAN_ID}; + sudo ip netns exec pnf_ns ifconfig pnf_veth1.${EXTNET_VLAN_ID} up ${EXTNET_PNF_IP}/24; + sudo ovs-vsctl add-port ${PUBLIC_BRIDGE} pnf_veth0; + " + + # Control Node - external net internet address simulation + ${SSH} ${!CONTROLIP} " + sudo ip tuntap add dev internet_tap mode tap; + sudo ifconfig internet_tap up ${EXTNET_INTERNET_IP}/24; + " + fi - # Tunnel from compute to controller - PORT_NAME=control_vxlan - ${SSH} ${compute_ip} "sudo ovs-vsctl add-port $PUBLIC_BRIDGE $PORT_NAME -- set interface $PORT_NAME type=vxlan options:local_ip="$compute_ip" options:remote_ip="${OPENSTACK_CONTROL_NODE_IP}" options:dst_port=9876 options:key=flow" + # Computes + compute_index=1 + for compute_ip in ${COMPUTE_IPS[*]} + do + # Tunnel from controller to compute + COMPUTEPORT=compute$(( compute_index++ ))_vxlan + ${SSH} ${!CONTROLIP} "sudo ovs-vsctl add-port $PUBLIC_BRIDGE $COMPUTEPORT -- set interface $COMPUTEPORT type=vxlan options:local_ip="${!CONTROLIP}" options:remote_ip="$compute_ip" options:dst_port=9876 options:key=flow" + # Tunnel from compute to controller + CONTROLPORT="control_vxlan" + ${SSH} $compute_ip "sudo ovs-vsctl add-port $PUBLIC_BRIDGE $CONTROLPORT -- set interface $CONTROLPORT type=vxlan options:local_ip="$compute_ip" options:remote_ip="${!CONTROLIP}" options:dst_port=9876 options:key=flow" + done done -if [ "${NUM_ODL_SYSTEM}" -gt 1 ]; then - HA_PROXY_INDEX=${NUM_OPENSTACK_SYSTEM} - odlmgrip=OPENSTACK_COMPUTE_NODE_${HA_PROXY_INDEX}_IP - HA_PROXY_IP=${!odlmgrip} +if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then + odlmgrip=OPENSTACK_HAPROXY_1_IP + HA_PROXY_IP=${!odlmgrip} + HA_PROXY_1_IP=${!odlmgrip} + odlmgrip2=OPENSTACK_HAPROXY_2_IP + HA_PROXY_2_IP=${!odlmgrip2} + odlmgrip3=OPENSTACK_HAPROXY_1_IP + HA_PROXY_3_IP=${!odlmgrip3} else - HA_PROXY_IP=${ODL_SYSTEM_IP} + HA_PROXY_IP=${ODL_SYSTEM_IP} + HA_PROXY_1_IP=${ODL_SYSTEM_1_IP} + HA_PROXY_2_IP=${ODL_SYSTEM_2_IP} + HA_PROXY_3_IP=${ODL_SYSTEM_3_IP} fi + echo "Locating test plan to use..." testplan_filepath="${WORKSPACE}/test/csit/testplans/${STREAMTESTPLAN}" if [ ! -f "${testplan_filepath}" ]; then @@ -656,6 +796,7 @@ cat testplan.txt SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '` +#FIXME currently support only 1 site echo "Starting Robot test suites ${SUITES} ..." # please add pybot -v arguments on a single line and alphabetized pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude \ @@ -664,9 +805,13 @@ pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude \ -v CONTROLLER_USER:${USER} \ -v DEVSTACK_DEPLOY_PATH:/opt/stack/devstack \ -v HA_PROXY_IP:${HA_PROXY_IP} \ + -v HA_PROXY_1_IP:${HA_PROXY_1_IP} \ + -v HA_PROXY_2_IP:${HA_PROXY_2_IP} \ + -v HA_PROXY_3_IP:${HA_PROXY_3_IP} \ -v JDKVERSION:${JDKVERSION} \ -v NEXUSURL_PREFIX:${NEXUSURL_PREFIX} \ -v NUM_ODL_SYSTEM:${NUM_ODL_SYSTEM} \ + -v NUM_OPENSTACK_SITES:${NUM_OPENSTACK_SITES} \ -v NUM_OS_SYSTEM:${NUM_OPENSTACK_SYSTEM} \ -v NUM_TOOLS_SYSTEM:${NUM_TOOLS_SYSTEM} \ -v ODL_STREAM:${DISTROSTREAM} \ @@ -674,12 +819,26 @@ pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude \ -v ODL_SYSTEM_1_IP:${ODL_SYSTEM_1_IP} \ -v ODL_SYSTEM_2_IP:${ODL_SYSTEM_2_IP} \ -v ODL_SYSTEM_3_IP:${ODL_SYSTEM_3_IP} \ - -v OS_CONTROL_NODE_IP:${OPENSTACK_CONTROL_NODE_IP} \ + -v ODL_SYSTEM_4_IP:${ODL_SYSTEM_4_IP} \ + -v ODL_SYSTEM_5_IP:${ODL_SYSTEM_5_IP} \ + -v ODL_SYSTEM_6_IP:${ODL_SYSTEM_6_IP} \ + -v ODL_SYSTEM_7_IP:${ODL_SYSTEM_7_IP} \ + -v ODL_SYSTEM_8_IP:${ODL_SYSTEM_8_IP} \ + -v ODL_SYSTEM_9_IP:${ODL_SYSTEM_9_IP} \ + -v OS_CONTROL_NODE_IP:${OPENSTACK_CONTROL_NODE_1_IP} \ + -v OS_CONTROL_NODE_1_IP:${OPENSTACK_CONTROL_NODE_1_IP} \ + -v OS_CONTROL_NODE_2_IP:${OPENSTACK_CONTROL_NODE_2_IP} \ + -v OS_CONTROL_NODE_3_IP:${OPENSTACK_CONTROL_NODE_3_IP} \ -v OPENSTACK_BRANCH:${OPENSTACK_BRANCH} \ -v OS_COMPUTE_1_IP:${OPENSTACK_COMPUTE_NODE_1_IP} \ -v OS_COMPUTE_2_IP:${OPENSTACK_COMPUTE_NODE_2_IP} \ + -v OS_COMPUTE_3_IP:${OPENSTACK_COMPUTE_NODE_3_IP} \ + -v OS_COMPUTE_4_IP:${OPENSTACK_COMPUTE_NODE_4_IP} \ + -v OS_COMPUTE_5_IP:${OPENSTACK_COMPUTE_NODE_5_IP} \ + -v OS_COMPUTE_6_IP:${OPENSTACK_COMPUTE_NODE_6_IP} \ -v OS_USER:${USER} \ -v PUBLIC_PHYSICAL_NETWORK:${PUBLIC_PHYSICAL_NETWORK} \ + -v SECURITY_GROUP_MODE:${SECURITY_GROUP_MODE} \ -v TOOLS_SYSTEM_IP:${TOOLS_SYSTEM_1_IP} \ -v TOOLS_SYSTEM_1_IP:${TOOLS_SYSTEM_1_IP} \ -v TOOLS_SYSTEM_2_IP:${TOOLS_SYSTEM_2_IP} \