X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-deploy-openstack-run-test.sh;h=4076e47de796da36c7005e63b83ef7cf694a70b9;hb=49b202dd2d45a58309817c5034efab9a03f5c571;hp=5ff94873c351cf2c0e203c33e84b3af9b386fdc8;hpb=6f0850aa18c3a58aaac9a37e21f71f63651eaef1;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 5ff94873c..4076e47de 100644 --- a/jjb/integration/integration-deploy-openstack-run-test.sh +++ b/jjb/integration/integration-deploy-openstack-run-test.sh @@ -7,6 +7,7 @@ source ${ROBOT_VENV}/bin/activate PYTHON="${ROBOT_VENV}/bin/python" SSH="ssh -t -t" ADMIN_PASSWORD="admin" +OPENSTACK_MASTER_CLIENTS_VERSION="pike" # TODO: remove this work to run changes.py if/when it's moved higher up to be visible at the Robot level echo "showing recent changes that made it in to the distribution used by this job" @@ -98,6 +99,38 @@ function create_etc_hosts() { cat ${WORKSPACE}/hosts_file } # create_etc_hosts() +#function to install Openstack Clients for Testing +#This will pull the latest versions compatiable with the +# openstack release +function install_openstack_clients_in_robot_vm() { + packages=("python-novaclient" "python-neutronclient" "python-openstackclient") + for plugin_name in ${ENABLE_OS_PLUGINS}; do + if [ "$plugin_name" == "networking-sfc" ]; then + packages+=("networking-sfc") + fi + done + openstack_version=$(echo ${OPENSTACK_BRANCH} | cut -d/ -f2) + #If the job tests "master", we will use the clients from previous released stable version to avoid failures + if [ "${openstack_version}" == "master" ]; then + openstack_version=${OPENSTACK_MASTER_CLIENTS_VERSION} + fi + for package in ${packages[*]}; do + echo "Get the current support version of the package ${package}" + wget https://raw.githubusercontent.com/openstack/requirements/stable/${openstack_version}/upper-constraints.txt -O /tmp/constraints.txt 2>/dev/null + echo "$PYTHON -m pip install --upgrade --no-deps ${package} --no-cache-dir -c /tmp/constraints.txt" + $PYTHON -m pip install --upgrade --no-deps ${package} --no-cache-dir -c /tmp/constraints.txt + echo "$PYTHON -m pip install ${package} --no-cache-dir -c /tmp/constraints.txt" + $PYTHON -m pip install ${package} --no-cache-dir -c /tmp/constraints.txt + done + + if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then + #networking-l2gw is not officially available in any release yet. Gettting the latest stable version. + $PYTHON -m pip install networking-l2gw + fi +} + + + # convert commas in csv strings to spaces (ssv) function csv2ssv() { local csv=$1 @@ -158,7 +191,7 @@ NEUTRON_CREATE_INITIAL_NETWORKS=${CREATE_INITIAL_NETWORKS} ODL_MODE=manual ODL_MGR_IP=${MGRIP} -ODL_PORT=8080 +ODL_PORT=${ODL_PORT} ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING} ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS} @@ -252,10 +285,6 @@ minimize_polling=True physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1400 path_mtu = 1458 -# workaround for port-status not working due to https://bugs.opendaylight.org/show_bug.cgi?id=9092 -[ml2_odl] -odl_features=nothing - [[post-config|/etc/neutron/dhcp_agent.ini]] [DEFAULT] force_metadata = True @@ -264,6 +293,7 @@ enable_isolated_metadata = True [[post-config|/etc/nova/nova.conf]] [DEFAULT] force_config_drive = False +force_raw_images = False [scheduler] discover_hosts_in_cells_interval = 30 @@ -301,7 +331,7 @@ Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE} ODL_MODE=manual ODL_MGR_IP=${MGRIP} -ODL_PORT=8080 +ODL_PORT=${ODL_PORT} ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING} ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS} @@ -344,6 +374,7 @@ EOF auth_strategy = keystone [DEFAULT] use_neutron = True +force_raw_images = False EOF echo "Compute local.conf created:" @@ -453,15 +484,11 @@ function collect_logs () { echo -e "/usr/sbin/lsmod | /usr/bin/grep openvswitch\n" /usr/sbin/lsmod | /usr/bin/grep openvswitch echo -e "\ngrep ct_ /var/log/openvswitch/ovs-vswitchd.log\n" -grep ct_ /var/log/openvswitch/ovs-vswitchd.log -echo -e "\novsdb-tool -mm show-log\n" -ovsdb-tool -mm show-log +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 "\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" @@ -469,10 +496,16 @@ env source /opt/stack/devstack/openrc admin admin echo -e "\nenv after openrc\n" env -echo "\nsudo du -hs /opt/stack" +echo -e "\nsudo du -hs /opt/stack" sudo du -hs /opt/stack -echo "\nsudo mount" +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 @@ -480,6 +513,8 @@ EOF # archives build step will essentially be a noop. mkdir -p ${WORKSPACE}/archives + mv /tmp/changes.txt ${WORKSPACE}/archives + sleep 5 # FIXME: Do not create .tar and gzip before copying. for i in `seq 1 ${NUM_ODL_SYSTEM}`; do @@ -523,6 +558,8 @@ EOF 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" 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} @@ -545,7 +582,12 @@ EOF 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} 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}" @@ -557,14 +599,8 @@ EOF 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" - scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER} - ${SSH} ${!CONTROLLERIP} "dmesg -T > /tmp/dmesg.log" - scp ${!CONTROLLERIP}:/tmp/dmesg.log ${NODE_FOLDER} mv local.conf_control_${!OSIP} ${NODE_FOLDER}/local.conf + # qdhcp files are created by robot tests mv /tmp/qdhcp ${NODE_FOLDER} mv ${NODE_FOLDER} ${WORKSPACE}/archives/ done @@ -575,6 +611,8 @@ EOF 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" 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} @@ -582,7 +620,12 @@ EOF 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} 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}" @@ -592,13 +635,6 @@ EOF 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 -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" - scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER} - scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}/ - ${SSH} ${!OSIP} "dmesg -T > /tmp/dmesg.log" - scp ${!OSIP}:/tmp/dmesg.log ${NODE_FOLDER} mv local.conf_compute_${!OSIP} ${NODE_FOLDER}/local.conf mv ${NODE_FOLDER} ${WORKSPACE}/archives/ done @@ -747,6 +783,7 @@ else fi RECLONE=False +ODL_PORT=8181 # Always compare the lists below against the devstack upstream ENABLED_SERVICES in # https://github.com/openstack-dev/devstack/blob/master/stackrc#L52 @@ -814,6 +851,10 @@ 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 + +#Install qemu-img command in Control Node for Pike +echo "Install qemu-img application" +sudo yum install -y qemu-img EOF cat > "${WORKSPACE}/setup_host_cell_mapping.sh" << EOF @@ -1172,6 +1213,9 @@ else SUITES=${newsuites} fi +#install all client versions required for this job testing +install_openstack_clients_in_robot_vm + # 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 @@ -1189,6 +1233,17 @@ EOF source /tmp/os_netvirt_client_rc +echo "Get all versions before executing pybot" +echo "openstack --version" +which openstack +openstack --version +echo "nova --version" +which nova +nova --version +echo "neutron --version" +which neutron +neutron --version + echo "Starting Robot test suites ${SUITES} ..." # please add pybot -v arguments on a single line and alphabetized suite_num=0 @@ -1203,7 +1258,7 @@ for suite in ${SUITES}; do --log log_${log_name}.html --report None --output output_${log_name}.xml \ -v BUNDLEFOLDER:${BUNDLEFOLDER} \ -v BUNDLE_URL:${ACTUAL_BUNDLE_URL} \ - -v CONTROLLERFEATURES:${CONTROLLERFEATURES} \ + -v CONTROLLERFEATURES:"${CONTROLLERFEATURES}" \ -v CONTROLLER_USER:${USER} \ -v DEVSTACK_DEPLOY_PATH:/opt/stack/devstack \ -v HA_PROXY_IP:${HA_PROXY_IP} \