Merge "Switch all projects to use new maven-merge job"
authorJamo Luhrsen <jluhrsen@redhat.com>
Tue, 16 Jan 2018 20:13:20 +0000 (20:13 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 16 Jan 2018 20:13:20 +0000 (20:13 +0000)
jjb/integration/integration-deploy-openstack-run-test.sh
jjb/integration/integration-get-slave-addresses.sh
jjb/packaging/packaging.yaml
jjb/packaging/uninstall-rpm.sh [new file with mode: 0644]

index 2b66677df0b2f14a35c1fc6dfcbb419bf1377fdd..8fa57c7f36df81cf6b1525c048b653441e988b5b 100644 (file)
@@ -455,15 +455,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"
@@ -471,10 +467,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
@@ -525,6 +527,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}
@@ -547,7 +551,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}"
@@ -559,14 +568,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
@@ -577,6 +580,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}
@@ -584,7 +589,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}"
@@ -594,13 +604,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
index 8f01f54dbd9467a8bdf307f9d698c0a329926e44..4356f5721c84d8625b5ba55cdadf3733a209ac0a 100644 (file)
@@ -103,6 +103,15 @@ done
 # The rest of the openstack nodes until NUM_OPENSTACK_SYSTEM are computes
 NUM_OPENSTACK_COMPUTE_NODES=$(( NUM_OPENSTACK_SYSTEM - NUM_OPENSTACK_CONTROL_NODES ))
 echo "NUM_OPENSTACK_COMPUTE_NODES=${NUM_OPENSTACK_COMPUTE_NODES}" >> slave_addresses.txt
+
+# Order the computes in the list so that the devstack-0 is index 1 and devstack-1 is index 2. Currently they are
+# backwards because of the controller swap earlier.
+if [ ${NUM_OPENSTACK_COMPUTE_NODES} -ge 2 ]; then
+    tmp_addr=${OPENSTACK_SYSTEM[1]}
+    OPENSTACK_SYSTEM[1]=${OPENSTACK_SYSTEM[2]}
+    OPENSTACK_SYSTEM[2]=${tmp_addr}
+fi
+
 for i in $(seq 0 $((NUM_OPENSTACK_COMPUTE_NODES - 1)))
 do
     echo "OPENSTACK_COMPUTE_NODE_$((i+1))_IP=${OPENSTACK_SYSTEM[$((openstack_index++))]}" >> slave_addresses.txt
index c51975138c695791c7db4a69ac08273cdfb4311f..5012648af14e3bbd8f383377db19c2fd7c8efb47 100644 (file)
@@ -92,6 +92,7 @@
           sudo yum install -y nmap
       - shell: !include-raw: test-karaf.expect
       - shell: !include-raw: stop-odl.sh
+      - shell: !include-raw: uninstall-rpm.sh
       - lf-infra-deploy-maven-file:
           global-settings-file: 'global-settings'
           settings-file: 'packaging-settings'
       - shell: !include-raw: build-rpm.sh
 
       # Test Carbon multipatch zip (no parallel tarball available)
+      # NB: This will need to be updated as old builds expire
       - inject:
           # yamllint disable-line rule:line-length
-          properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/distribution-karaf/0.6.3-SNAPSHOT/distribution-karaf-0.6.3-20171128.221258-1.zip'
+          properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/distribution-karaf/0.6.3-SNAPSHOT/distribution-karaf-0.6.3-20180115.181738-1.zip'
       - shell: !include-raw: build-rpm.sh
 
       # Test latest Carbon snapshot
       - shell: !include-raw: build-rpm.sh
 
       # Test Nitrogen multipatch zip (no parallel tarball available)
+      # NB: This will need to be updated as old builds expire
       - inject:
           # yamllint disable-line rule:line-length
-          properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.7.2-SNAPSHOT/karaf-0.7.2-20171128.223150-2.zip'
+          properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.7.2-SNAPSHOT/karaf-0.7.2-20180115.183312-2.zip'
       - shell: !include-raw: build-rpm.sh
 
       # Test latest Nitrogen snapshot
       - shell: !include-raw: build-rpm-snap.sh
 
       # Test Oxygen pre-release autorelease tarball
+      # NB: This will need to be updated as old builds expire
       - inject:
           # yamllint disable-line rule:line-length
           properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2052/org/opendaylight/integration/karaf/0.8.0/karaf-0.8.0.tar.gz'
       - shell: !include-raw: build-rpm.sh
 
       # Test Oxygen multipatch zip (no parallel tarball available)
+      # NB: This will need to be updated as old builds expire
       - inject:
           # yamllint disable-line rule:line-length
-          properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20171128.175421-68.zip'
+          properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20180111.030942-90.zip'
       - shell: !include-raw: build-rpm.sh
 
       # Test latest Oxygen snapshot
           sudo yum install -y nmap
       - shell: !include-raw: test-karaf.expect
       - shell: !include-raw: stop-odl.sh
+      - shell: !include-raw: uninstall-rpm.sh
 
     publishers:
       # TODO: Remove the archive publisher
       - shell: !include-raw: start-odl.sh
       - shell: !include-raw: test-karaf.expect
       - shell: !include-raw: stop-odl.sh
+      - shell: !include-raw: uninstall-rpm.sh
 
     publishers:
       - lf-infra-publish
diff --git a/jjb/packaging/uninstall-rpm.sh b/jjb/packaging/uninstall-rpm.sh
new file mode 100644 (file)
index 0000000..1d62ede
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Options:
+#   -x: Echo commands
+#   -e: Fail on errors
+#   -o pipefail: Fail on errors in scripts this calls, give stacktrace
+set -ex -o pipefail
+
+# Uninstall ODL
+sudo yum remove -y opendaylight
+
+# Verify ODL not installed
+if yum list installed opendaylight; then
+  # Fail if exit code 0, ie ODL is still installed
+  echo "OpenDaylight unexpectedly still installed"
+  exit 1
+else
+  echo "OpenDaylight not installed, as expected"
+fi