X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-deploy-openstack-run-test.sh;h=4d331abd32f15dc9c71fef12054c5c56152f5fdc;hb=d2728da8c27b3fa350c24308ff364f2a469596c7;hp=e33bc6d412f3012f1db087e169a57c278d38954e;hpb=8d1cf7dd5a3b2810e0640bac08cab52d721419c9;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 e33bc6d41..4d331abd3 100644 --- a/jjb/integration/integration-deploy-openstack-run-test.sh +++ b/jjb/integration/integration-deploy-openstack-run-test.sh @@ -428,6 +428,19 @@ EOF ${SSH} ${MGRIP} "sudo bash /tmp/deploy_ha_proxy.sh" } # configure_haproxy_for_neutron_requests() +# Collect the list of files on the hosts +function list_files () { + local ip=$1 + local folder=$2 + ${SSH} ${ip} "sudo find /etc > /tmp/find.etc.txt" + ${SSH} ${ip} "sudo find /opt/stack > /tmp/find.opt.stack.txt" + ${SSH} ${ip} "sudo find /var > /tmp/find2.txt" + rsync --rsync-path="sudo rsync" -arv --list-only ssh ${ip}:/var/ > ${folder}/rsync.var.txt + scp ${ip}:/tmp/find.etc.txt ${folder} + scp ${ip}:/tmp/find.opt.stack.txt ${folder} + scp ${ip}:/tmp/find2.txt ${folder} +} + function collect_logs () { set +e # We do not want to create red dot just because something went wrong while fetching logs. @@ -453,31 +466,46 @@ echo -e "\nsudo getenforce\n" sudo getenforce echo -e "\njournalctl > /tmp/journalctl.log\n" sudo journalctl > /tmp/journalctl.log +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 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 + 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 - ${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" "${WORKSPACE}/odl${i}_karaf.log.tar" - ${SSH} "${!CONTROLLERIP}" "tar -cf /tmp/odl${i}_zrpcd.log.tar /tmp/zrpcd.init.log" - scp "${!CONTROLLERIP}:/tmp/odl${i}_zrpcd.log.tar" "${WORKSPACE}/odl${i}_zrpcd.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 " odl${i}_karaf.log > odl${i}_err.log - # Print ROBOT lines, Print Caused by...Exception: lines, - # Print Exception{ lines as well as the previous line that has the timestamp for context - sed -n -e '/ROBOT MESSAGE/P' -e '/Caused by.*Exception:/P' -e '$!N;/Exception{/P;D' 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 + NODE_FOLDER="odl_${i}" + mkdir -p ${NODE_FOLDER} + ${SSH} ${!CONTROLLERIP} "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} "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 + rm ${NODE_FOLDER}/odl${i}_karaf.log.tar + mv karaf_${i}_threads* ${NODE_FOLDER} + mv ${NODE_FOLDER} ${WORKSPACE}/archives/ done - # 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 - print_job_parameters > ${WORKSPACE}/archives/params.txt # Control Node @@ -485,6 +513,9 @@ EOF OSIP=OPENSTACK_CONTROL_NODE_${i}_IP NODE_FOLDER="control_${i}" mkdir -p ${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} @@ -493,15 +524,28 @@ EOF 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/get_devstack.sh.txt ${NODE_FOLDER} + scp ${!OSIP}:/var/log/httpd/keystone_access.log ${NODE_FOLDER} + scp ${!OSIP}:/var/log/httpd/keystone.log ${NODE_FOLDER} scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER} scp ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER} + list_files "${!OSIP}" "${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/dmesg.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/rabbitmq ${NODE_FOLDER} rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${NODE_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" @@ -518,11 +562,16 @@ EOF NODE_FOLDER="compute_${i}" mkdir -p ${NODE_FOLDER} 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/get_devstack.sh.txt ${NODE_FOLDER} scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER} scp ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER} + list_files "${!OSIP}" "${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/dmesg.log ${NODE_FOLDER} @@ -556,6 +605,113 @@ EOF 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="" +comp1hn="" +comp2hn="" +function get_hostnames () { + set +e + local ctrlip=${OPENSTACK_CONTROL_NODE_1_IP} + local comp1ip=${OPENSTACK_COMPUTE_NODE_1_IP} + local comp2ip=${OPENSTACK_COMPUTE_NODE_2_IP} + ctrlhn=$(${SSH} ${ctrlip} "hostname") + comp1hn=$(${SSH} ${comp1ip} "hostname") + comp2hn=$(${SSH} ${comp2ip} "hostname") + echo "hostnames: ${ctrlhn}, ${comp1hn}, ${comp2hn}" + set -e +} + +function check_firewall() { + set +e + echo $- + local ctrlip=${OPENSTACK_CONTROL_NODE_1_IP} + local comp1ip=${OPENSTACK_COMPUTE_NODE_1_IP} + local comp2ip=${OPENSTACK_COMPUTE_NODE_2_IP} + + echo "check_firewall on control" + ${SSH} ${ctrlip} " + sudo systemctl status firewalld + sudo systemctl -l status iptables + sudo iptables --line-numbers -nvL + " || true + echo "check_firewall on compute 1" + ${SSH} ${comp1ip} " + sudo systemctl status firewalld + sudo systemctl -l status iptables + sudo iptables --line-numbers -nvL + " || true + echo "check_firewall on compute 2" + ${SSH} ${comp2ip} " + sudo systemctl status firewalld + sudo systemctl -l status iptables + sudo iptables --line-numbers -nvL + " || true +} + +function get_service () { + set +e + local iter=$1 + #local idx=$2 + local ctrlip=${OPENSTACK_CONTROL_NODE_1_IP} + local comp1ip=${OPENSTACK_COMPUTE_NODE_1_IP} + + #if [ ${idx} -eq 1 ]; then + if [ ${iter} -eq 1 ] || [ ${iter} -gt 16 ]; then + curl http://${ctrlip}:5000 + curl http://${ctrlip}:35357 + curl http://${ctrlip}/identity + ${SSH} ${ctrlip} " + source /opt/stack/devstack/openrc admin admin; + env + openstack configuration show --unmask; + openstack service list + openstack --os-cloud devstack-admin --os-region RegionOne compute service list + openstack hypervisor list; + " || true + check_firewall + fi + #fi + set -e +} + +# Check if rabbitmq is ready by looking for a pid in it's status. +# The function returns the status of the grep command which callers can check. +function is_rabbitmq_ready() { + local -r ip=$1 + rm -f rabbit.txt + ${SSH} ${ip} "sudo rabbitmqctl status" > rabbit.txt + grep pid rabbit.txt +} + +# retry the given command ($3) until success for a number of iterations ($1) +# sleeping ($2) between tries. +function retry() { + set +e + local -r -i max_tries=${1} + local -r -i sleep_time=${2} + local -r cmd=${3} + local -i retries=1 + local -i rc=1 + while true; do + echo "retry ${cmd}: attempt: ${retries}" + ${cmd} + rc=$? + if ((${rc} == 0)); then + break; + else + if ((${retries} == ${max_tries})); then + break + else + ((retries++)) + sleep ${sleep_time} + fi + fi + done + set -e + 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 @@ -600,7 +756,17 @@ CORE_OS_COMPUTE_SERVICES="n-cpu,odl-compute" cat > ${WORKSPACE}/disable_firewall.sh << EOF sudo systemctl stop firewalld -sudo systemctl stop iptables +# Open these ports to match the tutorial vms +# http/https (80/443), samba (445), netbios (137,138,139) +sudo iptables -I INPUT -p tcp -m multiport --dports 80,443,139,445 -j ACCEPT +sudo iptables -I INPUT -p udp -m multiport --dports 137,138 -j ACCEPT +# OpenStack services as well as vxlan tunnel ports 4789 and 9876 +# identity public/admin (5000/35357), ampq (5672), vnc (6080), nova (8774), glance (9292), neutron (9696) +sudo sudo iptables -I INPUT -p tcp -m multiport --dports 5000,5672,6080,8774,9292,9696,35357 -j ACCEPT +sudo sudo iptables -I INPUT -p udp -m multiport --dports 4789,9876 -j ACCEPT +sudo iptables-save > /etc/sysconfig/iptables +sudo systemctl restart iptables +sudo iptables --line-numbers -nvL true EOF @@ -627,6 +793,10 @@ if [ -n "${DEVSTACK_HASH}" ]; then git checkout ${DEVSTACK_HASH} fi git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s\n%b' -n20 +echo "workaround: adjust wait from 60s to 1800s (30m)" +sed -i 's/wait_for_compute 60/wait_for_compute 1800/g' /opt/stack/devstack/lib/nova +# TODO: modify sleep 1 to sleep 60, search wait_for_compute, then first sleep 1 +# that would just reduce the number of logs in the compute stack.log EOF cat > "${WORKSPACE}/setup_host_cell_mapping.sh" << EOF @@ -666,13 +836,16 @@ done for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP - echo "Stack the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${CONTROLIP}" + echo "Configure the stack of the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${CONTROLIP}" + scp ${WORKSPACE}/disable_firewall.sh ${!CONTROLIP}:/tmp + ${SSH} ${!CONTROLIP} "sudo bash /tmp/disable_firewall.sh" create_etc_hosts ${!CONTROLIP} scp ${WORKSPACE}/hosts_file ${!CONTROLIP}:/tmp/hosts scp ${WORKSPACE}/get_devstack.sh ${!CONTROLIP}:/tmp ${SSH} ${!CONTROLIP} "bash /tmp/get_devstack.sh > /tmp/get_devstack.sh.txt 2>&1" create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP[$i]} "${ODL_OVS_MGRS[$i]}" scp ${WORKSPACE}/local.conf_control_${!CONTROLIP} ${!CONTROLIP}:/opt/stack/devstack/local.conf + 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" ssh ${!CONTROLIP} "ls -lrt /opt/stack/devstack/nohup.out" @@ -684,24 +857,46 @@ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do fi done +# This is a backup to the CELLSV2_SETUP=singleconductor workaround. Keeping it here as an easy lookup +# if needed. +# Let the control node get started to avoid a race condition where the computes start and try to access +# the nova_cell1 on the control node before it is created. If that happens, the nova-compute service on the +# compute exits and does not attempt to restart. +# 180s is chosen because in test runs the control node usually finished in 17-20 minutes and the computes finished +# in 17 minutes, so take the max difference of 3 minutes and the jobs should still finish around the same time. +# one of the following errors is seen in the compute n-cpu.log: +# Unhandled error: NotAllowed: Connection.open: (530) NOT_ALLOWED - access to vhost 'nova_cell1' refused for user 'stackrabbit' +# AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile. +# Compare that timestamp to this log in the control stack.log: sudo rabbitmqctl set_permissions -p nova_cell1 stackrabbit +# If the n-cpu.log is earlier than the control stack.log timestamp then the failure condition is likely hit. + +echo "Wait a maximum of 30m until rabbitmq is ready to allow the controller to create nova_cell1 before the computes need it" +retry 30 60 "is_rabbitmq_ready ${OPENSTACK_CONTROL_NODE_1_IP}" +rc=$? +if ((${rc} == 0)); then + echo "rabbitmq is ready, starting ${NUM_OPENSTACK_COMPUTE_NODES} compute(s)" +else + echo "rabbitmq was not ready in " + collect_logs + exit 1 +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 - echo "Stack the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${COMPUTEIP}" + 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" create_etc_hosts ${!COMPUTEIP} ${!CONTROLIP} 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" - 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 - 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}) - # Workaround for https://review.openstack.org/#/c/491032/ - # Modify upper-constraints to use libvirt-python 3.2.0 if [ "${ODL_ML2_BRANCH}" == "stable/ocata" ]; then + echo "Updating requirements for ${ODL_ML2_BRANCH}" + echo "Workaround for https://review.openstack.org/#/c/491032/" + echo "Modify upper-constraints to use libvirt-python 3.2.0" ${SSH} ${!COMPUTEIP} " cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; @@ -710,6 +905,12 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do sed -i s/libvirt-python===2.5.0/libvirt-python===3.2.0/ upper-constraints.txt " fi + 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 + 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}) done echo "nodelist: ${os_node_list[*]}" @@ -733,6 +934,9 @@ elif [ \${ret} -eq 0 ]; then fi EOF +# devstack debugging +# get_hostnames + # Check if the stacking is finished. Poll all nodes every 60s for one hour. iteration=0 in_progress=1 @@ -745,6 +949,8 @@ while [ ${in_progress} -eq 1 ]; do scp ${os_node_list[index]}:/tmp/stack_progress . cat stack_progress stacking_status=`cat stack_progress` + # devstack debugging + # get_service "${iteration}" "${index}" if [ "$stacking_status" == "Still Stacking" ]; then continue elif [ "$stacking_status" == "Stacking Failed" ]; then @@ -780,17 +986,6 @@ for i in `seq 1 ${NUM_OPENSTACK_SITES}`; do 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 - - #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 # In Ocata if we do not enable the n-cpu in control node then @@ -831,12 +1026,6 @@ for i in `seq 1 ${NUM_OPENSTACK_SITES}`; do 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? @@ -892,6 +1081,10 @@ for i in `seq 1 ${NUM_OPENSTACK_SITES}`; do 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 - set VXLAN TEP IP for Genius Auto TZ + ${SSH} ${!CONTROLIP} " + sudo ovs-vsctl set O . external_ids:tep-ip=${!CONTROLIP}; + " # Control Node - external net internet address simulation ${SSH} ${!CONTROLIP} " @@ -912,6 +1105,10 @@ for i in `seq 1 ${NUM_OPENSTACK_SITES}`; do ${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 " + #Compute Node - set VXLAN TEP IP for Genius Auto TZ + ${SSH} $compute_ip " + sudo ovs-vsctl set O . external_ids:tep-ip=${compute_ip}; + " done done @@ -943,14 +1140,21 @@ cat testplan.txt # Use the testplan if specific SUITES are not defined. if [ -z "${SUITES}" ]; then SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '` -fi - -if [ "${OPENSTACK_BRANCH}" == "stable/pike" ] || [ "${OPENSTACK_BRANCH}" == "master" ]; then - AUTH="http://${!CONTROLIP}/identity" else - AUTH="http://${!CONTROLIP}:35357/v3" + newsuites="" + workpath="${WORKSPACE}/test/csit/suites" + for suite in ${SUITES}; do + fullsuite="${workpath}/${suite}" + if [ -z ${newsuites} ]; then + newsuites+=${fullsuite} + else + newsuites+=" "${fullsuite} + fi + done + SUITES=${newsuites} fi +# TODO: run openrc on control node and then scrape the vars from it # Environment Variables Needed to execute Openstack Client for NetVirt Jobs cat > /tmp/os_netvirt_client_rc << EOF export OS_USERNAME=admin @@ -958,7 +1162,7 @@ export OS_PASSWORD=admin export OS_PROJECT_NAME=admin export OS_USER_DOMAIN_NAME=default export OS_PROJECT_DOMAIN_NAME=default -export OS_AUTH_URL=${AUTH} +export OS_AUTH_URL="http://${!CONTROLIP}/identity" export OS_IDENTITY_API_VERSION=3 export OS_IMAGE_API_VERSION=2 export OS_TENANT_NAME=admin @@ -969,7 +1173,10 @@ source /tmp/os_netvirt_client_rc 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 -e skip_if_${DISTROSTREAM} \ +for suite in ${SUITES}; do + log_name_ext=$(basename ${suite} | cut -d. -f1) + pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude -e skip_if_${DISTROSTREAM} \ + --log log_${log_name_ext}.html --report None --output output_${log_name_ext}.xml \ -v BUNDLEFOLDER:${BUNDLEFOLDER} \ -v BUNDLE_URL:${ACTUAL_BUNDLE_URL} \ -v CONTROLLER_USER:${USER} \ @@ -1015,7 +1222,10 @@ pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude -e skip_if_${D -v TOOLS_SYSTEM_2_IP:${TOOLS_SYSTEM_2_IP} \ -v USER_HOME:${HOME} \ -v WORKSPACE:/tmp \ - ${TESTOPTIONS} ${SUITES} || true + ${TESTOPTIONS} ${suite} || true +done +#rebot exit codes seem to be different +rebot --output ${WORKSPACE}/output.xml --log None --report None output_*.xml || true echo "Examining the files in data/log and checking file size" ssh ${ODL_SYSTEM_IP} "ls -altr /tmp/${BUNDLEFOLDER}/data/log/"