X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Finclude-raw-integration-deploy-openstack-run-test.sh;h=d00c403db036381ddf8a51b41d3bbe6e39e62d89;hb=5e66994c3fc39e964bb11fd69be3d0c47b1c5768;hp=6c501941fd0843805f3d5326502724a089c0519f;hpb=994d8740176ca435d3887d26b8cb6040cd429674;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 6c501941f..d00c403db 100644 --- a/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh +++ b/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh @@ -16,28 +16,34 @@ LOGFILE=stack.sh.log SCREEN_LOGDIR=/opt/stack/data/log LOG_COLOR=False RECLONE=yes +EOF -disable_service swift -disable_service cinder -disable_service n-net -disable_service q-vpn -enable_service q-svc -enable_service q-dhcp -enable_service q-meta -enable_service tempest -enable_service n-novnc -enable_service n-cauth +IFS=, +for service_name in ${DISABLE_OS_SERVICES} +do +cat >> ${local_conf_file_name} << EOF +disable_service ${service_name} +EOF +done +for service_name in ${ENABLE_OS_SERVICES} +do +cat >> ${local_conf_file_name} << EOF +enable_service ${service_name} +EOF +done +unset IFS +cat >> ${local_conf_file_name} << EOF HOST_IP=$OPENSTACK_CONTROL_NODE_IP SERVICE_HOST=\$HOST_IP NEUTRON_CREATE_INITIAL_NETWORKS=False Q_PLUGIN=ml2 -Q_ML2_TENANT_NETWORK_TYPE=vxlan +Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE} +Q_OVS_USE_VETH=True ENABLE_TENANT_TUNNELS=True - MYSQL_HOST=\$SERVICE_HOST RABBIT_HOST=\$SERVICE_HOST GLANCE_HOSTPORT=\$SERVICE_HOST:9292 @@ -50,10 +56,11 @@ SERVICE_TOKEN=service SERVICE_PASSWORD=admin ADMIN_PASSWORD=admin -enable_plugin networking-odl ${ODL_ML2_DRIVER_REPO} ${ODL_ML2_BRANCH} +enable_plugin networking-odl ${ODL_ML2_DRIVER_REPO} ${ODL_ML2_VERSION} ODL_PORT=8080 ODL_MODE=externalodl +LIBVIRT_TYPE=qemu EOF @@ -150,8 +157,9 @@ SERVICE_TOKEN=service SERVICE_PASSWORD=admin ADMIN_PASSWORD=admin -enable_plugin networking-odl ${ODL_ML2_DRIVER_REPO} ${ODL_ML2_BRANCH} +enable_plugin networking-odl ${ODL_ML2_DRIVER_REPO} ${ODL_ML2_VERSION} ODL_MODE=compute +LIBVIRT_TYPE=qemu EOF @@ -257,10 +265,6 @@ set +e # We do not want to create red dot just because something went wrong whi for i in `seq 1 ${NUM_ODL_SYSTEM}` do CONTROLLERIP=ODL_SYSTEM_${i}_IP - echo "dumping first 500K bytes of karaf log..." > "odl${i}_karaf.log" - ssh "${!CONTROLLERIP}" head --bytes=500K "/tmp/${BUNDLEFOLDER}/data/log/karaf.log" >> "odl${i}_karaf.log" - echo "dumping last 500K bytes of karaf log..." >> "odl${i}_karaf.log" - ssh "${!CONTROLLERIP}" tail --bytes=500K "/tmp/${BUNDLEFOLDER}/data/log/karaf.log" >> "odl${i}_karaf.log" echo "killing karaf process..." ssh "${!CONTROLLERIP}" bash -c 'ps axf | grep karaf | grep -v grep | awk '"'"'{print "kill -9 " $1}'"'"' | sh' done @@ -268,8 +272,9 @@ sleep 5 for i in `seq 1 ${NUM_ODL_SYSTEM}` do CONTROLLERIP=ODL_SYSTEM_${i}_IP - ssh "${!CONTROLLERIP}" xz -9ekvv "/tmp/${BUNDLEFOLDER}/data/log/karaf.log" - scp "${!CONTROLLERIP}:/tmp/${BUNDLEFOLDER}/data/log/karaf.log.xz" "odl${i}_karaf.log.xz" + ssh "${!CONTROLLERIP}" "mv /tmp/${BUNDLEFOLDER}/data/log/ /tmp/odl_log/" + ssh "${!CONTROLLERIP}" 'tar -cf - "/tmp/odl_log/" | xz -9 -c - > /tmp/odl_karaf_log.tar.xz' + scp "${!CONTROLLERIP}:/tmp/odl_karaf_log.tar.xz" "odl${i}_karaf.log.tar.xz" done ssh ${OPENSTACK_CONTROL_NODE_IP} "xz -9ekvv /opt/stack/devstack/nohup.out" @@ -281,6 +286,12 @@ do done } +cat > ${WORKSPACE}/disable_firewall.sh << EOF +sudo systemctl stop firewalld +sudo systemctl stop iptables +true +EOF + cat > ${WORKSPACE}/get_devstack.sh << EOF sudo systemctl stop firewalld sudo yum install bridge-utils -y @@ -294,6 +305,7 @@ echo "127.0.0.1 localhost \${HOSTNAME}" > /tmp/hosts echo "::1 localhost \${HOSTNAME}" >> /tmp/hosts sudo mv /tmp/hosts /etc/hosts sudo /usr/sbin/brctl addbr br100 +sudo ifconfig eth0 mtu 2000 sudo mkdir /opt/stack sudo chmod 777 /opt/stack cd /opt/stack @@ -384,17 +396,26 @@ 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" -ssh ${OPENSTACK_CONTROL_NODE_IP} "sudo systemctl stop firewalld; sudo systemctl stop iptables" +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" - -#Need to disable firewalld and iptables in compute 1 node -echo "Stop Firewall in Compute 1 Node and add to hypervisor-list" -ssh ${OPENSTACK_COMPUTE_NODE_1_IP} "sudo systemctl stop firewalld; sudo systemctl stop iptables" -#Need to disable firewalld and iptables in compute 2 node -echo "Stop Firewall in Compute 2 Node and add to hypervisor-list" -ssh ${OPENSTACK_COMPUTE_NODE_2_IP} "sudo systemctl stop firewalld; sudo systemctl stop iptables" +ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack/devstack; source openrc admin admin; nova hypervisor-list;nova-manage service list" + +#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" echo "Locating test plan to use..." testplan_filepath="${WORKSPACE}/test/csit/testplans/${STREAMTESTPLAN}"