X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-deploy-openstack-run-test.sh;h=1eef8c16efd216f39b011506e09812fe7ed86d9c;hb=e78660e3060a7c6fb147367bedea5848f1bbf5de;hp=aa8a735ec621bf179b97d8d60b21ab66219caf06;hpb=3e1838bb1e69a32cac75b80890e8c914e2a202ae;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-deploy-openstack-run-test.sh b/jjb/integration/integration-deploy-openstack-run-test.sh index aa8a735ec..1eef8c16e 100644 --- a/jjb/integration/integration-deploy-openstack-run-test.sh +++ b/jjb/integration/integration-deploy-openstack-run-test.sh @@ -5,11 +5,17 @@ # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091 source ${ROBOT_VENV}/bin/activate source /tmp/common-functions.sh ${BUNDLEFOLDER} +# Ensure we fail the job if any steps fail. +set -ex -o pipefail +totaltmr=$(timer) +get_os_deploy PYTHON="${ROBOT_VENV}/bin/python" SSH="ssh -t -t" ADMIN_PASSWORD="admin" OPENSTACK_MASTER_CLIENTS_VERSION="queens" +#Size of the partition to /opt/stack in control and compute nodes +TMPFS_SIZE=2G # TODO: remove this work to run changes.py if/when it's moved higher up to be visible at the Robot level printf "\nshowing recent changes that made it into the distribution used by this job:\n" @@ -20,9 +26,10 @@ python ${WORKSPACE}/test/tools/distchanges/changes.py -d /tmp/distribution_folde printf "\nshowing recent changes that made it into integration/test used by this job:\n" cd ${WORKSPACE}/test -printf "Hash Author Date Commit Date Author Subject" -printf "------- ------------------------------ ------------------------------ -------------------- -----------------------------" -git --no-pager log --pretty=format:'%h %<(30)%ad%<(30)%cd %<(20,trunc)%an%d %s' -n20 +printf "Hash Author Date Commit Date Author Subject\n" +printf "%s\n" "------- ------------------------------ ------------------------------ -------------------- -----------------------------" +git --no-pager log --pretty=format:'%h %<(30)%ad %<(30)%cd %<(20,trunc)%an%d %s' -n20 +printf "\n" cd - cat << EOF @@ -37,65 +44,20 @@ function trap_handler() { local prog="$0" local lastline="$1" local lasterr="$2" - echo "trap_hanlder: ${prog}: line ${lastline}: exit status of last command: ${lasterr}" + echo "trap_handler: ${prog}: line ${lastline}: exit status of last command: ${lasterr}" echo "trap_handler: command: ${BASH_COMMAND}" - collect_logs exit 1 } # trap_handler() trap 'trap_handler ${LINENO} ${$?}' ERR -function print_job_parameters() { - cat << EOF - -Job parameters: -DISTROBRANCH: ${DISTROBRANCH} -DISTROSTREAM: ${DISTROSTREAM} -BUNDLE_URL: ${BUNDLE_URL} -CONTROLLERFEATURES: ${CONTROLLERFEATURES} -CONTROLLERDEBUGMAP: ${CONTROLLERDEBUGMAP} -TESTPLAN: ${TESTPLAN} -SUITES: ${SUITES} -PATCHREFSPEC: ${PATCHREFSPEC} -OPENSTACK_BRANCH: ${OPENSTACK_BRANCH} -DEVSTACK_HASH: ${DEVSTACK_HASH} -ODL_ML2_DRIVER_REPO: ${ODL_ML2_DRIVER_REPO} -ODL_ML2_BRANCH: ${ODL_ML2_BRANCH} -ODL_ML2_DRIVER_VERSION: ${ODL_ML2_DRIVER_VERSION} -ODL_ML2_PORT_BINDING: ${ODL_ML2_PORT_BINDING} -DEVSTACK_KUBERNETES_PLUGIN_REPO: ${DEVSTACK_KUBERNETES_PLUGIN_REPO} -DEVSTACK_LBAAS_PLUGIN_REPO: ${DEVSTACK_LBAAS_PLUGIN_REPO} -DEVSTACK_NETWORKING_SFC_PLUGIN_REPO: ${DEVSTACK_NETWORKING_SFC_PLUGIN_REPO} -ODL_ENABLE_L3_FWD: ${ODL_ENABLE_L3_FWD} -IPSEC_VXLAN_TUNNELS_ENABLED: ${IPSEC_VXLAN_TUNNELS_ENABLED} -PUBLIC_BRIDGE: ${PUBLIC_BRIDGE} -ENABLE_HAPROXY_FOR_NEUTRON: ${ENABLE_HAPROXY_FOR_NEUTRON} -ENABLE_OS_SERVICES: ${ENABLE_OS_SERVICES} -ENABLE_OS_COMPUTE_SERVICES: ${ENABLE_OS_COMPUTE_SERVICES} -ENABLE_OS_NETWORK_SERVICES: ${ENABLE_OS_NETWORK_SERVICES} -ENABLE_OS_PLUGINS: ${ENABLE_OS_PLUGINS} -DISABLE_OS_SERVICES: ${DISABLE_OS_SERVICES} -TENANT_NETWORK_TYPE: ${TENANT_NETWORK_TYPE} -SECURITY_GROUP_MODE: ${SECURITY_GROUP_MODE} -PUBLIC_PHYSICAL_NETWORK: ${PUBLIC_PHYSICAL_NETWORK} -ENABLE_NETWORKING_L2GW: ${ENABLE_NETWORKING_L2GW} -CREATE_INITIAL_NETWORKS: ${CREATE_INITIAL_NETWORKS} -LBAAS_SERVICE_PROVIDER: ${LBAAS_SERVICE_PROVIDER} -NUM_OPENSTACK_SITES: ${NUM_OPENSTACK_SITES} -ODL_SFC_DRIVER: ${ODL_SFC_DRIVER} -ODL_SNAT_MODE: ${ODL_SNAT_MODE} - -EOF -} - print_job_parameters function create_etc_hosts() { NODE_IP=$1 CTRL_IP=$2 : > ${WORKSPACE}/hosts_file - for iter in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}` - do + for iter in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do COMPUTE_IP=OPENSTACK_COMPUTE_NODE_${iter}_IP if [ "${!COMPUTE_IP}" == "${NODE_IP}" ]; then CONTROL_HNAME=$(${SSH} ${CTRL_IP} "hostname") @@ -137,34 +99,11 @@ function install_openstack_clients_in_robot_vm() { done if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then - #networking-l2gw is not officially available in any release yet. Gettting the latest stable version. + #networking-l2gw is not officially available in any release yet. Getting the latest stable version. $PYTHON -m pip install networking-l2gw==11.0.0 fi } -function is_openstack_feature_enabled() { - local feature=$1 - for enabled_feature in $(csv2ssv ${ENABLE_OS_SERVICES}) - do - if [ "${enabled_feature}" == "${feature}" ]; then - echo 1 - return - fi - done - echo 0 -} - -function fix_libvirt_version_n_cpu_pike() { - local ip=$1 - ${SSH} ${ip} " - cd /opt/stack; - git clone https://git.openstack.org/openstack/requirements; - cd requirements; - git checkout stable/pike; - sed -i s/libvirt-python===3.5.0/libvirt-python===4.2.0/ upper-constraints.txt - " -} - #Function to install rdo release # This will help avoiding installing wrong version of packages which causes # functionality failures @@ -185,6 +124,44 @@ function install_rdo_release() { esac } +# Involves just setting up the shared directory +function setup_live_migration_control() { + local control_ip=$1 + printf "${control_ip}:Setup directory Share with NFS" + cat > ${WORKSPACE}/setup_live_migration_control.sh << EOF +sudo mkdir --mode=777 /vm_instances +sudo chown -R jenkins:jenkins /vm_instances +sudo yum install -y nfs-utils +printf "/vm_instances *(rw,no_root_squash)" | sudo tee -a /etc/exports +sudo systemctl start rpcbind nfs-server +sudo exportfs +EOF + scp ${WORKSPACE}/setup_live_migration_control.sh ${control_ip}:/tmp/setup_live_migration_control.sh + ssh ${control_ip} "bash /tmp/setup_live_migration_control.sh" +} + +# Involves mounting the share and configuring the libvirtd +function setup_live_migration_compute() { + local compute_ip=$1 + local control_ip=$2 + printf "${compute_ip}:Mount Shared directory from ${control_ip}" + printf "${compute_ip}:Configure libvirt in listen mode" + cat > ${WORKSPACE}/setup_live_migration_compute.sh << EOF +sudo yum install -y libvirt libvirt-devel nfs-utils +sudo crudini --verbose --set --inplace /etc/libvirt/libvirtd.conf '' listen_tls 0 +sudo crudini --verbose --set --inplace /etc/libvirt/libvirtd.conf '' listen_tcp 1 +sudo crudini --verbose --set --inplace /etc/libvirt/libvirtd.conf '' auth_tcp '"none"' +sudo crudini --verbose --set --inplace /etc/sysconfig/libvirtd '' LIBVIRTD_ARGS '"--listen"' +sudo mkdir --mode=777 -p /var/instances +sudo chown -R jenkins:jenkins /var/instances +sudo chmod o+x /var/instances +sudo systemctl start rpcbind +sudo mount -t nfs ${control_ip}:/vm_instances /var/instances +sudo mount +EOF + scp ${WORKSPACE}/setup_live_migration_compute.sh ${compute_ip}:/tmp/setup_live_migration_compute.sh + ssh ${compute_ip} "bash /tmp/setup_live_migration_compute.sh" +} # Add enable_services and disable_services to the local.conf function add_os_services() { @@ -223,9 +200,8 @@ function create_control_node_local_conf() { cat > ${local_conf_file_name} << EOF [[local|localrc]] LOGFILE=stack.sh.log -USE_SCREEN=True -SCREEN_LOGDIR=/opt/stack/data/log LOG_COLOR=False +USE_SYSTEMD=True RECLONE=${RECLONE} # Increase the wait used by stack to poll for services SERVICE_TIMEOUT=120 @@ -264,6 +240,10 @@ NEUTRON_LBAAS_SERVICE_PROVIDERV2=${LBAAS_SERVICE_PROVIDER} # Only relevant if ne NEUTRON_SFC_DRIVERS=${ODL_SFC_DRIVER} # Only relevant if networking-sfc plugin is enabled NEUTRON_FLOWCLASSIFIER_DRIVERS=${ODL_SFC_DRIVER} # Only relevant if networking-sfc plugin is enabled ETCD_PORT=2379 +PUBLIC_BRIDGE=${PUBLIC_BRIDGE} +PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK} +ML2_VLAN_RANGES=${PUBLIC_PHYSICAL_NETWORK} +ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS} EOF if [ "${TENANT_NETWORK_TYPE}" == "local" ]; then cat >> ${local_conf_file_name} << EOF @@ -284,7 +264,7 @@ EOF ENABLE_PLUGIN_ARGS="${DEVSTACK_LBAAS_PLUGIN_REPO} ${OPENSTACK_BRANCH}" IS_LBAAS_PLUGIN_ENABLED="yes" elif [ "$plugin_name" == "networking-sfc" ]; then - ENABLE_PLUGIN_ARGS="${DEVSTACK_NETWORKING_SFC_PLUGIN_REPO} master" + ENABLE_PLUGIN_ARGS="${DEVSTACK_NETWORKING_SFC_PLUGIN_REPO} ${OPENSTACK_BRANCH}" IS_SFC_PLUGIN_ENABLED="yes" else echo "Error: Invalid plugin $plugin_name, unsupported" @@ -305,36 +285,27 @@ NETWORKING_L2GW_SERVICE_DRIVER=L2GW:OpenDaylight:networking_odl.l2gateway.driver EOF fi - if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then - cat >> ${local_conf_file_name} << EOF - -PUBLIC_BRIDGE=${PUBLIC_BRIDGE} -PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK} -ML2_VLAN_RANGES=${PUBLIC_PHYSICAL_NETWORK} -ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS} -EOF - - if [ "${ODL_ML2_DRIVER_VERSION}" == "v2" ]; then - SERVICE_PLUGINS="odl-router_v2" - else - SERVICE_PLUGINS="odl-router" - fi - if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then - SERVICE_PLUGINS+=", networking_l2gw.services.l2gateway.plugin.L2GatewayPlugin" - fi - if [ "${IS_LBAAS_PLUGIN_ENABLED}" == "yes" ]; then - SERVICE_PLUGINS+=", lbaasv2" - fi - if [ "${IS_SFC_PLUGIN_ENABLED}" == "yes" ]; then - SERVICE_PLUGINS+=", networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,networking_sfc.services.sfc.plugin.SfcPlugin" - fi - fi #check for ODL_ENABLE_L3_FWD + if [ "${ODL_ML2_DRIVER_VERSION}" == "v2" ]; then + SERVICE_PLUGINS="odl-router_v2" + else + SERVICE_PLUGINS="odl-router" + fi + if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then + SERVICE_PLUGINS+=", networking_l2gw.services.l2gateway.plugin.L2GatewayPlugin" + fi + if [ "${IS_LBAAS_PLUGIN_ENABLED}" == "yes" ]; then + SERVICE_PLUGINS+=", lbaasv2" + fi + if [ "${IS_SFC_PLUGIN_ENABLED}" == "yes" ]; then + SERVICE_PLUGINS+=", networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,networking_sfc.services.sfc.plugin.SfcPlugin" + fi cat >> ${local_conf_file_name} << EOF [[post-config|\$NEUTRON_CONF]] [DEFAULT] service_plugins = ${SERVICE_PLUGINS} +log_dir = /opt/stack/logs [[post-config|/etc/neutron/plugins/ml2/ml2_conf.ini]] [agent] @@ -345,22 +316,61 @@ minimize_polling=True # MTU(1400) + VXLAN(50) + VLAN(4) = 1454 < MTU eth0/br-physnet1(1458) physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1400 path_mtu = 1458 +EOF + if [ "${ENABLE_GRE_TYPE_DRIVERS}" == "yes" ]; then + cat >> ${local_conf_file_name} << EOF +type_drivers = local,flat,vlan,gre,vxlan +[ml2_type_gre] +tunnel_id_ranges = 1:1000 +EOF + fi + if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then + cat >> ${local_conf_file_name} << EOF + +[ml2_odl] +enable_dhcp_service = True +EOF + fi + + cat >> ${local_conf_file_name} << EOF + +[ml2_odl] +# Trigger n-odl full sync every 30 secs. +maintenance_interval = 30 [[post-config|/etc/neutron/dhcp_agent.ini]] [DEFAULT] force_metadata = True enable_isolated_metadata = True +log_dir = /opt/stack/logs [[post-config|/etc/nova/nova.conf]] +[scheduler] +discover_hosts_in_cells_interval = 30 + [DEFAULT] force_config_drive = False force_raw_images = False +log_dir = /opt/stack/logs -[scheduler] -discover_hosts_in_cells_interval = 30 EOF - echo "Control local.conf created:" + if [ "$(is_openstack_feature_enabled n-cpu)" == "1" ]; then + cat >> ${local_conf_file_name} << EOF +use_neutron = True +force_raw_images = False +log_dir = /opt/stack/logs +[libvirt] +live_migration_uri = qemu+tcp://%s/system +virt_type = qemu +EOF + fi + + if [ "$(is_openstack_feature_enabled n-cpu)" == "1" ]; then + echo "Combo local.conf created:" + else + echo "Control local.conf created:" + fi cat ${local_conf_file_name} } # create_control_node_local_conf() @@ -375,8 +385,7 @@ function create_compute_node_local_conf() { [[local|localrc]] LOGFILE=stack.sh.log LOG_COLOR=False -USE_SCREEN=True -SCREEN_LOGDIR=/opt/stack/data/log +USE_SYSTEMD=True RECLONE=${RECLONE} # Increase the wait used by stack to poll for the nova service on the control node NOVA_READY_TIMEOUT=1800 @@ -409,6 +418,10 @@ DATABASE_PASSWORD=${ADMIN_PASSWORD} RABBIT_PASSWORD=${ADMIN_PASSWORD} SERVICE_TOKEN=${ADMIN_PASSWORD} SERVICE_PASSWORD=${ADMIN_PASSWORD} + +PUBLIC_BRIDGE=${PUBLIC_BRIDGE} +PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK} +ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS} EOF if [[ "${ENABLE_OS_PLUGINS}" =~ networking-odl ]]; then @@ -418,17 +431,6 @@ enable_plugin networking-odl ${ODL_ML2_DRIVER_REPO} ${ODL_ML2_BRANCH} EOF fi - if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then - cat >> ${local_conf_file_name} << EOF - -PUBLIC_BRIDGE=${PUBLIC_BRIDGE} -PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK} -ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS} -Q_L3_ENABLED=True -ODL_L3=${ODL_L3} -EOF - fi - cat >> ${local_conf_file_name} << EOF [[post-config|/etc/nova/nova.conf]] @@ -437,6 +439,10 @@ auth_strategy = keystone [DEFAULT] use_neutron = True force_raw_images = False +log_dir = /opt/stack/logs +[libvirt] +live_migration_uri = qemu+tcp://%s/system +virt_type = qemu EOF echo "Compute local.conf created:" @@ -444,16 +450,16 @@ EOF } # create_compute_node_local_conf() function configure_haproxy_for_neutron_requests() { - MGRIP=$1 + local -r haproxy_ip=$1 # shellcheck disable=SC2206 - ODL_IPS=(${2//,/ }) + local -r odl_ips=(${2//,/ }) cat > ${WORKSPACE}/install_ha_proxy.sh<< EOF sudo systemctl stop firewalld sudo yum -y install policycoreutils-python haproxy EOF -cat > ${WORKSPACE}/haproxy.cfg << EOF + cat > ${WORKSPACE}/haproxy.cfg << EOF global daemon group haproxy @@ -475,28 +481,39 @@ defaults timeout check 10s listen opendaylight - bind ${MGRIP}:8080 + bind ${haproxy_ip}:8181 transparent + mode http + http-request set-header X-Forwarded-Proto https if { ssl_fc } + http-request set-header X-Forwarded-Proto http if !{ ssl_fc } + option httpchk GET /diagstatus + option httplog balance source +EOF -listen opendaylight_rest - bind ${MGRIP}:8181 - balance source + odlindex=1 + for odlip in ${odl_ips[*]}; do + echo " server opendaylight-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2" >> ${WORKSPACE}/haproxy.cfg + odlindex=$((odlindex+1)) + done -listen opendaylight_websocket - bind ${MGRIP}:8185 - balance source + cat >> ${WORKSPACE}/haproxy.cfg << EOF +listen opendaylight_ws + bind ${haproxy_ip}:8185 transparent + mode http + timeout connect 5s + timeout client 25s + timeout server 25s + timeout tunnel 3600s + balance source EOF odlindex=1 - for odlip in ${ODL_IPS[*]}; do - sed -i "/listen opendaylight$/a server controller-${odlindex} ${odlip}:8080 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg - sed -i "/listen opendaylight_rest$/a server controller-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg - sed -i "/listen opendaylight_websocket$/a server controller-websocket-${odlindex} ${odlip}:8185 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg + for odlip in ${odl_ips[*]}; do + echo " server opendaylight-ws-${odlindex} ${odlip}:8185 check fall 5 inter 2000 rise 2" >> ${WORKSPACE}/haproxy.cfg odlindex=$((odlindex+1)) done - echo "Dump haproxy.cfg" cat ${WORKSPACE}/haproxy.cfg @@ -511,294 +528,13 @@ sudo systemctl status haproxy true EOF - 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" + scp ${WORKSPACE}/install_ha_proxy.sh ${haproxy_ip}:/tmp + ${SSH} ${haproxy_ip} "sudo bash /tmp/install_ha_proxy.sh" + scp ${WORKSPACE}/haproxy.cfg ${haproxy_ip}:/tmp + scp ${WORKSPACE}/deploy_ha_proxy.sh ${haproxy_ip}:/tmp + ${SSH} ${haproxy_ip} "sudo bash /tmp/deploy_ha_proxy.sh" } # configure_haproxy_for_neutron_requests() -# Collect the list of files on the hosts -function collect_files() { - local -r ip=$1 - local -r folder=$2 - finddir=/tmp/finder - ${SSH} ${ip} "mkdir -p ${finddir}" - ${SSH} ${ip} "sudo find /etc > ${finddir}/find.etc.txt" - ${SSH} ${ip} "sudo find /opt/stack > ${finddir}/find.opt.stack.txt" - ${SSH} ${ip} "sudo find /var > ${finddir}/find2.txt" - ${SSH} ${ip} "sudo find /var > ${finddir}/find.var.txt" - ${SSH} ${ip} "sudo tar -cf - -C /tmp finder | xz -T 0 > /tmp/find.tar.xz" - scp ${ip}:/tmp/find.tar.xz ${folder} - mkdir -p ${finddir} - rsync --rsync-path="sudo rsync" --list-only -arvhe ssh ${ip}:/etc/ > ${finddir}/rsync.etc.txt - rsync --rsync-path="sudo rsync" --list-only -arvhe ssh ${ip}:/opt/stack/ > ${finddir}/rsync.opt.stack.txt - rsync --rsync-path="sudo rsync" --list-only -arvhe ssh ${ip}:/var/ > ${finddir}/rsync.var.txt - tar -cf - -C /tmp finder | xz -T 0 > /tmp/rsync.tar.xz - cp /tmp/rsync.tar.xz ${folder} -} - -# List of extra services to extract from journalctl -# Add new services on a separate line, in alpha order, add \ at the end -extra_services_cntl=" \ - dnsmasq.service \ - httpd.service \ - libvirtd.service \ - openvswitch.service \ - ovs-vswitchd.service \ - ovsdb-server.service \ - rabbitmq-server.service \ -" - -extra_services_cmp=" \ - libvirtd.service \ - openvswitch.service \ - ovs-vswitchd.service \ - ovsdb-server.service \ -" - -# Collect the logs for the openstack services -# First get all the services started by devstack which would have devstack@ as a prefix -# Next get all the extra services -function collect_openstack_logs() { - local -r ip=${1} - local -r folder=${2} - local -r node_type=${3} - local oslogs="${folder}/oslogs" - - printf "collect_openstack_logs for ${node_type} node: ${ip} into ${oslogs}\n" - rm -rf ${oslogs} - mkdir -p ${oslogs} - # There are always some logs in /opt/stack/logs and this also covers the - # pre-queens branches which always use /opt/stack/logs - rsync -avhe ssh ${ip}:/opt/stack/logs/* ${oslogs} # rsync to prevent copying of symbolic links - - # Starting with queens break out the logs from journalctl - if [ "${OPENSTACK_BRANCH}" = "stable/queens" ]; then - cat > ${WORKSPACE}/collect_openstack_logs.sh << EOF -extra_services_cntl="${extra_services_cntl}" -extra_services_cmp="${extra_services_cmp}" - -function extract_from_journal() { - local -r services=\${1} - local -r folder=\${2} - local -r node_type=\${3} - printf "extract_from_journal folder: \${folder}, services: \${services}\n" - for service in \${services}; do - # strip anything before @ and anything after . - # devstack@g-api.service will end as g-api - service_="\${service#*@}" - service_="\${service_%.*}" - sudo journalctl -u "\${service}" > "\${folder}/\${service_}.log" - done -} - -rm -rf /tmp/oslogs -mkdir -p /tmp/oslogs -systemctl list-unit-files --all > /tmp/oslogs/systemctl.units.log 2>&1 -svcs=\$(grep devstack@ /tmp/oslogs/systemctl.units.log | awk '{print \$1}') -extract_from_journal "\${svcs}" "/tmp/oslogs" -if [ "\${node_type}" = "control" ]; then - extract_from_journal "\${extra_services_cntl}" "/tmp/oslogs" -else - extract_from_journal "\${extra_services_cmp}" "/tmp/oslogs" -fi -ls -al /tmp/oslogs -EOF - printf "collect_openstack_logs for ${node_type} node: ${ip} into ${oslogs}, executing script\n" - cat ${WORKSPACE}/collect_openstack_logs.sh - scp ${WORKSPACE}/collect_openstack_logs.sh ${ip}:/tmp - ${SSH} ${ip} "bash /tmp/collect_openstack_logs.sh > /tmp/collect_openstack_logs.log 2>&1" - rsync -avhe ssh ${ip}:/tmp/oslogs/* ${oslogs} - scp ${ip}:/tmp/collect_openstack_logs.log ${oslogs} - fi -} - -function collect_logs() { - set +e # We do not want to create red dot just because something went wrong while fetching logs. - - cat > extra_debug.sh << EOF -echo -e "/usr/sbin/lsmod | /usr/bin/grep openvswitch\n" -/usr/sbin/lsmod | /usr/bin/grep openvswitch -echo -e "\nsudo grep ct_ /var/log/openvswitch/ovs-vswitchd.log\n" -sudo grep "Datapath supports" /var/log/openvswitch/ovs-vswitchd.log -echo -e "\nsudo netstat -punta\n" -sudo netstat -punta -echo -e "\nsudo getenforce\n" -sudo getenforce -echo -e "\nsudo systemctl status httpd\n" -sudo systemctl status httpd -echo -e "\nenv\n" -env -source /opt/stack/devstack/openrc admin admin -echo -e "\nenv after openrc\n" -env -echo -e "\nsudo du -hs /opt/stack" -sudo du -hs /opt/stack -echo -e "\nsudo mount" -sudo mount -echo -e "\ndmesg -T > /tmp/dmesg.log" -dmesg -T > /tmp/dmesg.log -echo -e "\njournalctl > /tmp/journalctl.log\n" -sudo journalctl > /tmp/journalctl.log -echo -e "\novsdb-tool -mm show-log > /tmp/ovsdb-tool.log" -ovsdb-tool -mm show-log > /tmp/ovsdb-tool.log -EOF - - # Since this log collection work is happening before the archive build macro which also - # creates the ${WORKSPACE}/archives dir, we have to do it here first. The mkdir in the - # archives build step will essentially be a noop. - mkdir -p ${WORKSPACE}/archives - - mv /tmp/changes.txt ${WORKSPACE}/archives - mv ${WORKSPACE}/rabbit.txt ${WORKSPACE}/archives - - sleep 5 - # FIXME: Do not create .tar and gzip before copying. - for i in `seq 1 ${NUM_ODL_SYSTEM}`; do - CONTROLLERIP=ODL_SYSTEM_${i}_IP - echo "collect_logs: for opendaylight controller ip: ${!CONTROLLERIP}" - NODE_FOLDER="odl_${i}" - mkdir -p ${NODE_FOLDER} - echo "Lets's take the karaf thread dump again..." - ssh ${!CONTROLLERIP} "sudo ps aux" > ${WORKSPACE}/ps_after.log - pid=$(grep org.apache.karaf.main.Main ${WORKSPACE}/ps_after.log | grep -v grep | tr -s ' ' | cut -f2 -d' ') - echo "karaf main: org.apache.karaf.main.Main, pid:${pid}" - ssh ${!CONTROLLERIP} "jstack ${pid}" > ${WORKSPACE}/karaf_${i}_${pid}_threads_after.log || true - echo "killing karaf process..." - ${SSH} "${!CONTROLLERIP}" bash -c 'ps axf | grep karaf | grep -v grep | awk '"'"'{print "kill -9 " $1}'"'"' | sh' - ${SSH} ${!CONTROLLERIP} "sudo journalctl > /tmp/journalctl.log" - scp ${!CONTROLLERIP}:/tmp/journalctl.log ${NODE_FOLDER} - ${SSH} ${!CONTROLLERIP} "dmesg -T > /tmp/dmesg.log" - scp ${!CONTROLLERIP}:/tmp/dmesg.log ${NODE_FOLDER} - ${SSH} ${!CONTROLLERIP} "tar -cf - -C /tmp/${BUNDLEFOLDER} etc | xz -T 0 > /tmp/etc.tar.xz" - scp ${!CONTROLLERIP}:/tmp/etc.tar.xz ${NODE_FOLDER} - ${SSH} ${!CONTROLLERIP} "cp -r /tmp/${BUNDLEFOLDER}/data/log /tmp/odl_log" - ${SSH} ${!CONTROLLERIP} "tar -cf /tmp/odl${i}_karaf.log.tar /tmp/odl_log/*" - scp ${!CONTROLLERIP}:/tmp/odl${i}_karaf.log.tar ${NODE_FOLDER} - ${SSH} ${!CONTROLLERIP} "tar -cf /tmp/odl${i}_zrpcd.log.tar /tmp/zrpcd.init.log" - scp ${!CONTROLLERIP}:/tmp/odl${i}_zrpcd.log.tar ${NODE_FOLDER} - tar -xvf ${NODE_FOLDER}/odl${i}_karaf.log.tar -C ${NODE_FOLDER} --strip-components 2 --transform s/karaf/odl${i}_karaf/g - grep "ROBOT MESSAGE\| ERROR " ${NODE_FOLDER}/odl${i}_karaf.log > ${NODE_FOLDER}/odl${i}_err.log - grep "ROBOT MESSAGE\| ERROR \| WARN \|Exception" \ - ${NODE_FOLDER}/odl${i}_karaf.log > ${NODE_FOLDER}/odl${i}_err_warn_exception.log - # Print ROBOT lines and print Exception lines. For exception lines also print the previous line for context - sed -n -e '/ROBOT MESSAGE/P' -e '$!N;/Exception/P;D' ${NODE_FOLDER}/odl${i}_karaf.log > ${NODE_FOLDER}/odl${i}_exception.log - mv /tmp/odl${i}_exceptions.txt ${NODE_FOLDER} - rm ${NODE_FOLDER}/odl${i}_karaf.log.tar - mv *_threads* ${NODE_FOLDER} - mv ps_* ${NODE_FOLDER} - mv ${NODE_FOLDER} ${WORKSPACE}/archives/ - done - - print_job_parameters > ${WORKSPACE}/archives/params.txt - - # Control Node - for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do - OSIP=OPENSTACK_CONTROL_NODE_${i}_IP - echo "collect_logs: for openstack control node ip: ${!OSIP}" - NODE_FOLDER="control_${i}" - mkdir -p ${NODE_FOLDER} - scp extra_debug.sh ${!OSIP}:/tmp - ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log 2>&1" - scp ${!OSIP}:/etc/dnsmasq.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/keystone/keystone.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/keystone/keystone-uwsgi-admin.ini ${NODE_FOLDER} - scp ${!OSIP}:/etc/keystone/keystone-uwsgi-public.ini ${NODE_FOLDER} - scp ${!OSIP}:/etc/kuryr/kuryr.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/neutron/dhcp_agent.ini ${NODE_FOLDER} - scp ${!OSIP}:/etc/neutron/metadata_agent.ini ${NODE_FOLDER} - scp ${!OSIP}:/etc/neutron/neutron.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/neutron/neutron_lbaas.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/neutron/plugins/ml2/ml2_conf.ini ${NODE_FOLDER} - scp ${!OSIP}:/etc/neutron/services/loadbalancer/haproxy/lbaas_agent.ini ${NODE_FOLDER} - scp ${!OSIP}:/etc/nova/nova.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/nova/nova-api-uwsgi.ini ${NODE_FOLDER} - scp ${!OSIP}:/etc/nova/nova_cell1.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/nova/nova-cpu.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/nova/placement-uwsgi.ini ${NODE_FOLDER} - scp ${!OSIP}:/etc/openstack/clouds.yaml ${NODE_FOLDER} - scp ${!OSIP}:/opt/stack/devstack/.stackenv ${NODE_FOLDER} - scp ${!OSIP}:/opt/stack/devstack/nohup.out ${NODE_FOLDER}/stack.log - scp ${!OSIP}:/opt/stack/devstack/openrc ${NODE_FOLDER} - scp ${!OSIP}:/opt/stack/requirements/upper-constraints.txt ${NODE_FOLDER} - scp ${!OSIP}:/opt/stack/tempest/etc/tempest.conf ${NODE_FOLDER} - scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER} - scp ${!OSIP}:/tmp/dmesg.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/get_devstack.sh.txt ${NODE_FOLDER} - scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/ovsdb-tool.log ${NODE_FOLDER} - collect_files "${!OSIP}" "${NODE_FOLDER}" - ${SSH} ${!OSIP} "sudo tar -cf - -C /var/log rabbitmq | xz -T 0 > /tmp/rabbitmq.tar.xz " - scp ${!OSIP}:/tmp/rabbitmq.tar.xz ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/etc/hosts ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/usr/lib/systemd/system/haproxy.service ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/audit/audit.log ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/httpd/keystone_access.log ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/httpd/keystone.log ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages* ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER} - collect_openstack_logs "${!OSIP}" "${NODE_FOLDER}" "control" - mv local.conf_control_${!OSIP} ${NODE_FOLDER}/local.conf - # qdhcp files are created by robot tests and copied into /tmp/qdhcp during the test - tar -cf - -C /tmp qdhcp | xz -T 0 > /tmp/qdhcp.tar.xz - mv /tmp/qdhcp.tar.xz ${NODE_FOLDER} - mv ${NODE_FOLDER} ${WORKSPACE}/archives/ - done - - # Compute Nodes - for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do - OSIP=OPENSTACK_COMPUTE_NODE_${i}_IP - echo "collect_logs: for openstack compute node ip: ${!OSIP}" - NODE_FOLDER="compute_${i}" - mkdir -p ${NODE_FOLDER} - scp extra_debug.sh ${!OSIP}:/tmp - ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log 2>&1" - scp ${!OSIP}:/etc/nova/nova.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/nova/nova-cpu.conf ${NODE_FOLDER} - scp ${!OSIP}:/etc/openstack/clouds.yaml ${NODE_FOLDER} - scp ${!OSIP}:/opt/stack/devstack/.stackenv ${NODE_FOLDER} - scp ${!OSIP}:/opt/stack/devstack/nohup.out ${NODE_FOLDER}/stack.log - scp ${!OSIP}:/opt/stack/devstack/openrc ${NODE_FOLDER} - scp ${!OSIP}:/opt/stack/requirements/upper-constraints.txt ${NODE_FOLDER} - scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}/ - scp ${!OSIP}:/tmp/dmesg.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/get_devstack.sh.txt ${NODE_FOLDER} - scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/ovsdb-tool.log ${NODE_FOLDER} - collect_files "${!OSIP}" "${NODE_FOLDER}" - ${SSH} ${!OSIP} "sudo tar -cf - -C /var/log libvirt | xz -T 0 > /tmp/libvirt.tar.xz " - scp ${!OSIP}:/tmp/libvirt.tar.xz ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/etc/hosts ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/audit/audit.log ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages* ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/nova-agent.log ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER} - collect_openstack_logs "${!OSIP}" "${NODE_FOLDER}" "compute" - mv local.conf_compute_${!OSIP} ${NODE_FOLDER}/local.conf - mv ${NODE_FOLDER} ${WORKSPACE}/archives/ - done - - # Tempest - DEVSTACK_TEMPEST_DIR="/opt/stack/tempest" - TESTREPO=".stestr" - TEMPEST_LOGS_DIR=${WORKSPACE}/archives/tempest - # Look for tempest test results in the $TESTREPO dir and copy if found - if ${SSH} ${OPENSTACK_CONTROL_NODE_1_IP} "sudo sh -c '[ -f ${DEVSTACK_TEMPEST_DIR}/${TESTREPO}/0 ]'"; then - ${SSH} ${OPENSTACK_CONTROL_NODE_1_IP} "for I in \$(sudo ls ${DEVSTACK_TEMPEST_DIR}/${TESTREPO}/ | grep -E '^[0-9]+$'); do sudo sh -c \"${DEVSTACK_TEMPEST_DIR}/.tox/tempest/bin/subunit-1to2 < ${DEVSTACK_TEMPEST_DIR}/${TESTREPO}/\${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'" - mkdir -p ${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} - else - echo "tempest results not found in ${DEVSTACK_TEMPEST_DIR}/${TESTREPO}/0" - fi -} # collect_logs() - # Following three functions are debugging helpers when debugging devstack changes. # Keeping them for now so we can simply call them when needed. ctrlhn="" @@ -905,25 +641,27 @@ function retry() { return ${rc} } -# 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 -# external networks in legacy netvirt -if [[ ${CONTROLLERFEATURES} == *"odl-netvirt-openstack"* ]]; then - ODL_PROVIDER_MAPPINGS="\${PUBLIC_PHYSICAL_NETWORK}:${PUBLIC_BRIDGE}" -else - ODL_PROVIDER_MAPPINGS= -fi - -# 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 -else - ODL_L3=False -fi +function install_ovs() { + local -r node=${1} + local -r rpm_path=${2} + + if [ "${OVS_INSTALL:0:1}" = "v" ]; then + # An OVS version was given, so we build it ourselves from OVS git repo. + # Only on the first node though, consecutive nodes will use RPMs + # built for the first one. + [ ! -d "${rpm_path}" ] && mkdir -p "${rpm_path}" && build_ovs ${node} ${OVS_INSTALL} "${rpm_path}" + # Install OVS from path + install_ovs_from_path ${node} "${rpm_path}" + elif [ "${OVS_INSTALL:0:4}" = "http" ]; then + # Otherwise, install from rpm repo directly. + install_ovs_from_repo ${node} ${OVS_INSTALL} + else + echo "Expected either an OVS version git tag or a repo http url" + exit 1 + fi +} +ODL_PROVIDER_MAPPINGS="\${PUBLIC_PHYSICAL_NETWORK}:${PUBLIC_BRIDGE}" RECLONE=False ODL_PORT=8181 @@ -964,6 +702,10 @@ sudo iptables --line-numbers -nvL true EOF +#For SFC Tests a larger partition is required for creating instances with Ubuntu +if [[ "${ENABLE_OS_PLUGINS}" =~ networking-sfc ]]; then + TMPFS_SIZE=12G +fi cat > ${WORKSPACE}/get_devstack.sh << EOF sudo systemctl stop firewalld sudo yum install bridge-utils python-pip -y @@ -978,7 +720,7 @@ echo "::1 localhost \${HOSTNAME}" >> /tmp/hosts sudo mv /tmp/hosts /etc/hosts sudo mkdir /opt/stack echo "Create RAM disk for /opt/stack" -sudo mount -t tmpfs -o size=2G tmpfs /opt/stack +sudo mount -t tmpfs -o size=${TMPFS_SIZE} tmpfs /opt/stack sudo chmod 777 /opt/stack cd /opt/stack echo "git clone https://git.openstack.org/openstack-dev/devstack --branch ${OPENSTACK_BRANCH}" @@ -988,6 +730,8 @@ if [ -n "${DEVSTACK_HASH}" ]; then echo "git checkout ${DEVSTACK_HASH}" git checkout ${DEVSTACK_HASH} fi +wget https://raw.githubusercontent.com/shague/odl_tools/master/fix-logging.patch.txt -O /tmp/fix-logging.patch.txt +patch --verbose -p1 -i /tmp/fix-logging.patch.txt git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s%b' -n20 echo @@ -1007,32 +751,52 @@ sudo nova-manage db sync sudo nova-manage cell_v2 discover_hosts EOF +cat > "${WORKSPACE}/workaround_networking_sfc.sh" << EOF +cd /opt/stack +git clone https://git.openstack.org/openstack/networking-sfc +cd networking-sfc +git checkout ${OPENSTACK_BRANCH} +git checkout master -- devstack/plugin.sh +EOF + NUM_OPENSTACK_SITES=${NUM_OPENSTACK_SITES:-1} compute_index=1 -odl_index=1 os_node_list=() -os_interval=$(( ${NUM_OPENSTACK_SYSTEM} / ${NUM_OPENSTACK_SITES} )) -ha_proxy_index=${os_interval} - -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 + +if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then + echo "Configure HAProxy" + ODL_HAPROXYIP_PARAM=OPENSTACK_HAPROXY_1_IP + ODL_IP_PARAM1=ODL_SYSTEM_1_IP + ODL_IP_PARAM2=ODL_SYSTEM_2_IP + ODL_IP_PARAM3=ODL_SYSTEM_3_IP + ODLMGRIP=${!ODL_HAPROXYIP_PARAM} # ODL Northbound uses HAProxy VIP + ODL_OVS_MGRS="${!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}" +else + ODL_IP_PARAM=ODL_SYSTEM_1_IP + ODLMGRIP=${!ODL_IP_PARAM} # OVSDB connects to ODL IP + ODL_OVS_MGRS="${!ODL_IP_PARAM}" # ODL Northbound uses ODL IP +fi + +os_ip_list=() +for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do + cip=OPENSTACK_CONTROL_NODE_${i}_IP + ip=${!cip} + os_ip_list+=("${ip}") done +for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do + cip=OPENSTACK_COMPUTE_NODE_${i}_IP + ip=${!cip} + os_ip_list+=("${ip}") +done + +for i in "${!os_ip_list[@]}"; do + ip=${os_ip_list[i]} + tcpdump_start "${i}" "${ip}" "port 6653" +done + + # Begin stacking the nodes, starting with the controller(s) and then the compute(s) for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do @@ -1045,17 +809,31 @@ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do scp ${WORKSPACE}/get_devstack.sh ${!CONTROLIP}:/tmp # devstack Master is yet to migrate fully to lib/neutron, there are some ugly hacks that is # affecting the stacking. - #Workaround For Queens, Make the physical Network as physnet1 in lib/neutron - #Workaround Comment out creating initial Networks in lib/neutron + # Workaround For Queens, Make the physical Network as physnet1 in lib/neutron + # In Queens the neutron new libs are used and do not have the following options from Pike and earlier: + # Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS could be used for the flat_networks + # and Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS could be used for the ml2_type_vlan ${SSH} ${!CONTROLIP} "bash /tmp/get_devstack.sh > /tmp/get_devstack.sh.txt 2>&1" if [ "${ODL_ML2_BRANCH}" == "stable/queens" ]; then ssh ${!CONTROLIP} "sed -i 's/flat_networks public/flat_networks public,physnet1/' /opt/stack/devstack/lib/neutron" ssh ${!CONTROLIP} "sed -i '186i iniset \$NEUTRON_CORE_PLUGIN_CONF ml2_type_vlan network_vlan_ranges public:1:4094,physnet1:1:4094' /opt/stack/devstack/lib/neutron" + #Workaround for networking-sfc to configure the paramaters in neutron.conf if the + # services used are neutron-api, neutron-dhcp etc instead of q-agt. + # Can be removed if the patch https://review.openstack.org/#/c/596287/ gets merged + if [[ "${ENABLE_OS_PLUGINS}" =~ networking-sfc ]]; then + scp ${WORKSPACE}/workaround_networking_sfc.sh ${!CONTROLIP}:/tmp/ + ssh ${!CONTROLIP} "bash -x /tmp/workaround_networking_sfc.sh" + fi fi - create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP[$i]} "${ODL_OVS_MGRS[$i]}" + create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP} "${ODL_OVS_MGRS}" scp ${WORKSPACE}/local.conf_control_${!CONTROLIP} ${!CONTROLIP}:/opt/stack/devstack/local.conf echo "Install rdo release to avoid incompatible Package versions" install_rdo_release ${!CONTROLIP} + setup_live_migration_control ${!CONTROLIP} + if [ "$(is_openstack_feature_enabled n-cpu)" == "1" ]; then + setup_live_migration_compute ${!CONTROLIP} ${!CONTROLIP} + fi + [ -n "${OVS_INSTALL}" ] && install_ovs ${!CONTROLIP} /tmp/ovs_rpms echo "Stack the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${CONTROLIP}" ssh ${!CONTROLIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &" ssh ${!CONTROLIP} "ps -ef | grep stack.sh" @@ -1086,16 +864,13 @@ if [ ${NUM_OPENSTACK_COMPUTE_NODES} -gt 0 ]; then echo "rabbitmq is ready, starting ${NUM_OPENSTACK_COMPUTE_NODES} compute(s)" else echo "rabbitmq was not ready in ${WAIT_FOR_RABBITMQ_MINUTES}m" - collect_logs exit 1 fi fi for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do - 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 + CONTROLIP=OPENSTACK_CONTROL_NODE_1_IP echo "Configure the stack of the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${!COMPUTEIP}" scp ${WORKSPACE}/disable_firewall.sh "${!COMPUTEIP}:/tmp" ${SSH} "${!COMPUTEIP}" "sudo bash /tmp/disable_firewall.sh" @@ -1103,17 +878,13 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do scp ${WORKSPACE}/hosts_file ${!COMPUTEIP}:/tmp/hosts scp ${WORKSPACE}/get_devstack.sh ${!COMPUTEIP}:/tmp ${SSH} ${!COMPUTEIP} "bash /tmp/get_devstack.sh > /tmp/get_devstack.sh.txt 2>&1" - if [ "${ODL_ML2_BRANCH}" == "stable/pike" ]; then - echo "Updating requirements for ${ODL_ML2_BRANCH}" - echo "Workaround for libvirt-python failing installation" - echo "Modify upper-constraints to use libvirt-python 4.2.0" - fix_libvirt_version_n_cpu_pike ${!COMPUTEIP} - fi - create_compute_node_local_conf ${!COMPUTEIP} ${!CONTROLIP} ${ODLMGRIP[$SITE_INDEX]} "${ODL_OVS_MGRS[$SITE_INDEX]}" + create_compute_node_local_conf ${!COMPUTEIP} ${!CONTROLIP} ${ODLMGRIP} "${ODL_OVS_MGRS}" scp ${WORKSPACE}/local.conf_compute_${!COMPUTEIP} ${!COMPUTEIP}:/opt/stack/devstack/local.conf echo "Install rdo release to avoid incompatible Package versions" install_rdo_release ${!COMPUTEIP} - echo "Stack the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${COMPUTEIP}" + setup_live_migration_compute ${!COMPUTEIP} ${!CONTROLIP} + [ -n "${OVS_INSTALL}" ] && install_ovs ${!COMPUTEIP} /tmp/ovs_rpms + echo "Stack the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${!COMPUTEIP}" 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}") @@ -1161,7 +932,6 @@ while [ ${in_progress} -eq 1 ]; do continue elif [ "$stacking_status" == "Stacking Failed" ]; then echo "node $index ${os_node_list[index]}: stacking has failed" - collect_logs exit 1 elif [ "$stacking_status" == "Stacking Complete" ]; then echo "node $index ${os_node_list[index]}: stacking complete" @@ -1175,126 +945,116 @@ while [ ${in_progress} -eq 1 ]; do sleep 60 if [ ${iteration} -eq 60 ]; then echo "stacking has failed - took longer than 60m" - collect_logs exit 1 fi done # Further configuration now that stacking is complete. -NUM_COMPUTES_PER_SITE=$((NUM_OPENSTACK_COMPUTE_NODES / NUM_OPENSTACK_SITES)) -for i in `seq 1 ${NUM_OPENSTACK_SITES}`; do - echo "Configure the Control Node" - CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP - # 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 +echo "Configure the Control Node" +CONTROLIP=OPENSTACK_CONTROL_NODE_1_IP +# Gather Compute IPs for the site +for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do + IP_VAR=OPENSTACK_COMPUTE_NODE_${i}_IP + COMPUTE_IPS[$((i-1))]=${!IP_VAR} +done - 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)) -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 - exit 1 +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} -eq 1 ]; then + expected_num_hypervisors=1 +else + expected_num_hypervisors=${NUM_OPENSTACK_COMPUTE_NODES} + if [ "$(is_openstack_feature_enabled n-cpu)" == "1" ]; then + expected_num_hypervisors=$((expected_num_hypervisors + 1)) fi +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" + exit 1 +fi - # 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} +# 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 + # shellcheck disable=SC2206 + 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 - # 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++))" + echo "ip xfrm configuration for node $ip:" + ${SSH} $ip "sudo ip xfrm policy list" + ${SSH} $ip "sudo ip xfrm state list" done +fi - # ipsec support - if [ "${IPSEC_VXLAN_TUNNELS_ENABLED}" == "yes" ]; then - # shellcheck disable=SC2206 - 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 +# 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_INTERNET_IP="10.9.9.9" +EXTNET_PNF_IP="10.10.10.253" +${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE} 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 ${EXTNET_PNF_IP}/24; + sudo ovs-vsctl add-port ${PUBLIC_BRIDGE} pnf_veth0; +" - # 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_INTERNET_IP="10.9.9.9" - EXTNET_PNF_IP="10.10.10.253" - ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE} up ${EXTNET_GATEWAY_IP}/24" +# 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; +" - # Control Node - external net PNF simulation +# Computes +compute_index=1 +for compute_ip in ${COMPUTE_IPS[*]}; do + # Tunnel from controller to compute + COMPUTEPORT=compute$(( compute_index++ ))_vxlan ${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 ${EXTNET_PNF_IP}/24; - sudo ovs-vsctl add-port ${PUBLIC_BRIDGE} pnf_veth0; + 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 " - - # 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; + # 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 " - - # 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 [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then @@ -1370,6 +1130,9 @@ echo "neutron --version" which neutron neutron --version +stacktime=$(timer $totaltmr) +printf "Stacking elapsed time: %s\n" "${stacktime}" + echo "Starting Robot test suites ${SUITES} ..." # please add pybot -v arguments on a single line and alphabetized suite_num=0 @@ -1382,16 +1145,18 @@ for suite in ${SUITES}; do log_name="${suite_index}_${suite_name}" pybot -N ${log_name} \ -c critical -e exclude -e skip_if_${DISTROSTREAM} \ - --log log_${log_name}.html --report None --output output_${log_name}.xml \ + --log log_${log_name}.html --report report_${log_name}.html --output output_${log_name}.xml \ --removekeywords wuks \ --removekeywords name:SetupUtils.Setup_Utils_For_Setup_And_Teardown \ --removekeywords name:SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing \ --removekeywords name:OpenStackOperations.Add_OVS_Logging_On_All_OpenStack_Nodes \ -v BUNDLEFOLDER:${BUNDLEFOLDER} \ -v BUNDLE_URL:${ACTUAL_BUNDLE_URL} \ + -v CMP_INSTANCES_SHARED_PATH:/var/instances \ -v CONTROLLERFEATURES:"${CONTROLLERFEATURES}" \ -v CONTROLLER_USER:${USER} \ -v DEVSTACK_DEPLOY_PATH:/opt/stack/devstack \ + -v ENABLE_ITM_DIRECT_TUNNELS:${ENABLE_ITM_DIRECT_TUNNELS} \ -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} \ @@ -1400,11 +1165,9 @@ for suite in ${SUITES}; do -v JENKINS_WORKSPACE:${WORKSPACE} \ -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_SNAT_MODE:${ODL_SNAT_MODE} \ - -v ODL_ENABLE_L3_FWD:${ODL_ENABLE_L3_FWD} \ -v ODL_STREAM:${DISTROSTREAM} \ -v ODL_SYSTEM_IP:${ODL_SYSTEM_IP} \ -v ODL_SYSTEM_1_IP:${ODL_SYSTEM_1_IP} \ @@ -1427,6 +1190,7 @@ for suite in ${SUITES}; do -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 OPENSTACK_TOPO:${OPENSTACK_TOPO} \ -v OS_USER:${USER} \ -v PUBLIC_PHYSICAL_NETWORK:${PUBLIC_PHYSICAL_NETWORK} \ -v SECURITY_GROUP_MODE:${SECURITY_GROUP_MODE} \ @@ -1438,14 +1202,13 @@ for suite in ${SUITES}; do ${TESTOPTIONS} ${suite} || true done #rebot exit codes seem to be different -rebot --output ${WORKSPACE}/output.xml --log log_full.html --report None -N openstack output_*.xml || true +rebot --output ${WORKSPACE}/output.xml --log log_full.html --report report.html -N openstack output_*.xml || true echo "Examining the files in data/log and checking file size" ssh ${ODL_SYSTEM_IP} "ls -altr /tmp/${BUNDLEFOLDER}/data/log/" ssh ${ODL_SYSTEM_IP} "du -hs /tmp/${BUNDLEFOLDER}/data/log/*" echo "Tests Executed" -collect_logs - +printf "Total elapsed time: %s, stacking time: %s\n" "$(timer $totaltmr)" "${stacktime}" true # perhaps Jenkins is testing last exit code # vim: ts=4 sw=4 sts=4 et ft=sh :