From 4f4bc22510c1458b2012198defee7983f43e29b1 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Thu, 29 Oct 2015 10:23:37 -0700 Subject: [PATCH 01/59] Start using CINDER_VOLUME_CLEAR to replace CINDER_SECURE_DELETE CINDER_SECURE_DELETE was deprecated in devstack in liberty with dfcc3871c022516330b6afb6c74751ac42a87480. Start using CINDER_VOLUME_CLEAR (default to 'none' to avoid the same bug that CINDER_SECURE_DELETE is used for). Add a TODO about removing DEVSTACK_CINDER_SECURE_DELETE once kilo-eol happens in devstack. Change-Id: I131c1aee665d6bd4e38dcfd0aec1b4796adc64c5 --- devstack-vm-gate-wrap.sh | 7 +++++++ devstack-vm-gate.sh | 1 + 2 files changed, 8 insertions(+) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index ff3b3a75..29b9d575 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -176,8 +176,15 @@ export DEVSTACK_GATE_TEMPEST_DISABLE_TENANT_ISOLATION=${DEVSTACK_GATE_TEMPEST_DI # Set to 1 to enable Cinder secure delete. # False by default to avoid dd problems on Precise. # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1023755 +# TODO(mriedem): CINDER_SECURE_DELETE is deprecated in devstack as of liberty. +# Remove after kilo-eol happens in devstack. export DEVSTACK_CINDER_SECURE_DELETE=${DEVSTACK_CINDER_SECURE_DELETE:-0} +# Should cinder perform secure deletion of volumes? +# Defaults to none to avoid bug 1023755. Can also be set to zero or shred. +# Only applicable to stable/liberty+ devstack. +export DEVSTACK_CINDER_VOLUME_CLEAR=${DEVSTACK_CINDER_VOLUME_CLEAR:-none} + # Set to 1 to run neutron instead of nova network # Only applicable to master branch export DEVSTACK_GATE_NEUTRON=${DEVSTACK_GATE_NEUTRON:-0} diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 82b2f88b..11cbb620 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -308,6 +308,7 @@ EOF if [[ "$DEVSTACK_CINDER_SECURE_DELETE" -eq "0" ]]; then echo "CINDER_SECURE_DELETE=False" >>"$localrc_file" fi + echo "CINDER_VOLUME_CLEAR=${DEVSTACK_CINDER_VOLUME_CLEAR}" >>"$localrc_file" if [[ "$DEVSTACK_GATE_TEMPEST_HEAT_SLOW" -eq "1" ]]; then echo "HEAT_CREATE_TEST_IMAGE=False" >>"$localrc_file" From 78591f5d9ab34a96eba4e06a6ad4ce98573509c8 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Tue, 5 Jan 2016 14:59:49 -0800 Subject: [PATCH 02/59] TRIVIAL: Fix some misspellings Fix some misspellings Change-Id: Id9ac593a585f8d348667e6f208b8327d72502d17 --- functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.sh b/functions.sh index 489c6172..7cdd3665 100644 --- a/functions.sh +++ b/functions.sh @@ -99,7 +99,7 @@ function tsfilter { function _ping_check { local host=$1 local times=${2:-20} - echo "Testing ICMP connectivit to $host" + echo "Testing ICMP connectivity to $host" ping -c $times $host } @@ -554,7 +554,7 @@ function setup_host { # Create a stack user for devstack to run as, so that we can # revoke sudo permissions from that user when appropriate. sudo useradd -U -s /bin/bash -d $BASE/new -m stack - # Use 755 mode on the user dir regarless to the /etc/login.defs setting + # Use 755 mode on the user dir regardless of the /etc/login.defs setting sudo chmod 755 $BASE/new TEMPFILE=`mktemp` echo "stack ALL=(root) NOPASSWD:ALL" >$TEMPFILE From 4ee1b9d78e70762bae0c6f7ae0b608c51f1053f9 Mon Sep 17 00:00:00 2001 From: OpenStack Jenkins Date: Mon, 8 Jun 2015 14:42:45 +0000 Subject: [PATCH 03/59] Add tls-proxy as an available service devstack can configure a TLS proxy for a number of services if the tls-proxy service is enabled. Make this service available to the gate. Change-Id: I654f06c34a60e56ff98b9b6720d0f9a3fe5d240b --- features.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/features.yaml b/features.yaml index 50b35f19..dcb45078 100644 --- a/features.yaml +++ b/features.yaml @@ -43,6 +43,8 @@ config: features: [ceph] heat: features: [heat] + tlsproxy: + features: [tlsproxy] branches: # The value of ""default" is the name of the "trunk" branch @@ -154,3 +156,7 @@ features: ceph: base: services: [ceph] + + tlsproxy: + base: + services: [tls-proxy] From ad2170adf3ab23910ab0991fb83bb2ea04948eb0 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 22 Jan 2016 10:21:29 -0800 Subject: [PATCH 04/59] Fix '-f: command not found' error The left bracket '[' was incorrectly placed. And '-f' was trying to be executed instead of the test executable '[' Change-Id: Ib947fa6aab651e427e44c8edc3552a02f3b505a4 --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 1d380177..aa122d63 100644 --- a/functions.sh +++ b/functions.sh @@ -744,7 +744,7 @@ function cleanup_host { sudo cp $BASE/old/devstacklog.txt $BASE/logs/old/ sudo cp $BASE/old/devstack/localrc $BASE/logs/old/localrc.txt sudo cp $BASE/old/tempest/etc/tempest.conf $BASE/logs/old/tempest_conf.txt - if -f [ $BASE/old/devstack/tempest.log ] ; then + if [ -f $BASE/old/devstack/tempest.log ] ; then sudo cp $BASE/old/devstack/tempest.log $BASE/logs/old/verify_tempest_conf.log fi From 98ccf4037ead6c8abd0abf1c36fe78b4c6423e73 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 22 Jan 2016 10:40:03 -0800 Subject: [PATCH 05/59] Update IRC channel to use #openstack-qa Change #openstack-dev to #openstack-qa in README.rst Use #openstack-qa as that is the channel that patch submission notices get broadcast on. Change-Id: I8ea331bbb325182e465f68f91930886822ba3c9c --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a8e04689..c10504e3 100644 --- a/README.rst +++ b/README.rst @@ -253,4 +253,4 @@ You can file bugs on the storyboard devstack-gate project:: https://storyboard.openstack.org/#!/project/712 -And you can chat with us on Freenode in #openstack-dev or #openstack-infra. +And you can chat with us on Freenode in #openstack-qa or #openstack-infra. From 3630eae36ff75347c12598b35e091ba8c71ee04f Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Wed, 24 Feb 2016 09:43:01 +0000 Subject: [PATCH 06/59] Add support for ipmitool driver in Ironic The commit 7ffa1d58ce9fd9e32cdab142a1f12feae38c3097 added support to configure nodes with ipmitool drivers in DevStack ironic to run with virtual machines. The main goal of that patch was to allow us to test the production ipmitool drivers in the gate replacing the *_ssh testing drivers in the future. Later a patch to project-config 2e577710e975983b594f6df59b504b4cae85e594 added two new jobs to the ironic gate: pxe_ipmitool and agent_ipmitool. This patch contains the final pieces to enable ipmitool drivers to run on gate. Change-Id: I2adff0d7195d3f53e19b600b2d91163a8271bf2c Related-Bug: #1544642 --- devstack-vm-gate.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 068a2fe4..a6e5c3d7 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -333,6 +333,7 @@ EOF if [[ "$DEVSTACK_GATE_VIRT_DRIVER" == "ironic" ]]; then export TEMPEST_OS_TEST_TIMEOUT=900 + echo "IRONIC_DEPLOY_DRIVER=$DEVSTACK_GATE_IRONIC_DRIVER" >>"$localrc_file" echo "VIRT_DRIVER=ironic" >>"$localrc_file" echo "IRONIC_BAREMETAL_BASIC_OPS=True" >>"$localrc_file" echo "IRONIC_VM_LOG_DIR=$BASE/$localrc_oldnew/ironic-bm-logs" >>"$localrc_file" @@ -344,17 +345,17 @@ EOF if [[ "$DEVSTACK_GATE_IRONIC_BUILD_RAMDISK" -eq 0 ]]; then echo "IRONIC_BUILD_DEPLOY_RAMDISK=False" >>"$localrc_file" fi - if [[ "$DEVSTACK_GATE_IRONIC_DRIVER" == "agent_ssh" ]]; then + if [[ -z "${DEVSTACK_GATE_IRONIC_DRIVER%%agent*}" ]]; then echo "SWIFT_ENABLE_TEMPURLS=True" >>"$localrc_file" echo "SWIFT_TEMPURL_KEY=secretkey" >>"$localrc_file" echo "IRONIC_ENABLED_DRIVERS=fake,agent_ssh,agent_ipmitool" >>"$localrc_file" - echo "IRONIC_DEPLOY_DRIVER=agent_ssh" >>"$localrc_file" # agent driver doesn't support ephemeral volumes yet echo "IRONIC_VM_EPHEMERAL_DISK=0" >>"$localrc_file" # agent CoreOS ramdisk is a little heavy echo "IRONIC_VM_SPECS_RAM=1024" >>"$localrc_file" echo "IRONIC_VM_COUNT=1" >>"$localrc_file" else + echo "IRONIC_ENABLED_DRIVERS=fake,pxe_ssh,pxe_ipmitool" >>"$localrc_file" echo "IRONIC_VM_EPHEMERAL_DISK=1" >>"$localrc_file" echo "IRONIC_VM_COUNT=3" >>"$localrc_file" fi @@ -708,7 +709,7 @@ if [[ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]]; then sudo chmod -R o+rx $BASE/new/devstack/files fi - # In the future we might want to increase the number of compute nodes. + # In the future we might want to increase the number of compute nodes. # This will ensure that multinode jobs consist of 2 nodes. # As a part of tempest configuration, it should be executed # before the DEVSTACK_GATE_TEMPEST_NOTESTS check, because the DEVSTACK_GATE_TEMPEST From e0fa9fced95a55d4b354714a7ff25abfec226e7a Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 1 Mar 2016 23:10:57 +0000 Subject: [PATCH 07/59] Update multinode setup doc to VXLAN We switched from GRE to VXLAN in the implementation as of I951e7e1bd98eeaf347e85296c12e027e225c2c97 so the diagrams should match accordingly. Change-Id: I0b0cef3a7217530573e694de54bf6dc68e295856 --- multinode_setup_info.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/multinode_setup_info.txt b/multinode_setup_info.txt index 70b4bc81..31fc7487 100644 --- a/multinode_setup_info.txt +++ b/multinode_setup_info.txt @@ -38,9 +38,9 @@ Nova Network ||br_pub| | br_flat| | ||br_pub | |br_flat| | ||br_pub | |br_flat| | |+--+---+ +---+----+ | |+---+---+ +---+---+ | |+---+---+ +---+---+ | | | | | | | | | | | | | -| | +-------------------gre-tunnel--+-----------------gre-tunnel---+ | +| | +------------------vxlan-tunnel-+-----------------vxlan-tunnel-+ | | | | | | | | | | -| +----------gre-tunnel-----------+----------gre-tunnel----------+ | +| +--------vxlan-tunnel-----------+--------vxlan-tunnel----------+ | | | | | | | +--------------------------+ +--------------------------+ +--------------------------+ @@ -72,9 +72,9 @@ This is what it all looks like after you run devstack and boot some nodes. ||br_pub| | br_flat| | ||br_pub | |br_flat| | ||br_pub | |br_flat| | |+--+---+ +---+----+ | |+---+---+ +---+---+ | |+---+---+ +---+---+ | | | | | | | | | | | | | -| | +-------------------gre-tunnel--+-----------------gre-tunnel---+ | +| | +------------------vxlan-tunnel-+-----------------vxlan-tunnel-+ | | | | | | | | | | -| +----------gre-tunnel-----------+----------gre-tunnel----------+ | +| +--------vxlan-tunnel-----------+--------vxlan-tunnel----------+ | | | | | | | +--------------------------+ +--------------------------+ +--------------------------+ @@ -104,7 +104,7 @@ happens here. |+--+---+ | |+---+---+ | |+---+---+ | | | | | | | | | | | | | | | | | | | -| +----------gre-tunnel-----------+----------gre-tunnel----------+ | +| +--------vxlan-tunnel-----------+--------vxlan-tunnel----------+ | | | | | | | +--------------------------+ +--------------------------+ +--------------------------+ @@ -139,6 +139,6 @@ This is what it all looks like after you run devstack and boot some nodes. |+--+---+ | |+---+---+ | |+---+---+ | | | | | | | | | | | | | | | | | | | -| +----------gre-tunnel-----------+----------gre-tunnel----------+ | +| +--------vxlan-tunnel-----------+--------vxlan-tunnel----------+ | | | | | | | +--------------------------+ +--------------------------+ +--------------------------+ From 2a65d2ba8671a5e910cc69833d6e7a81d4a55185 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 3 Mar 2016 08:20:27 -0800 Subject: [PATCH 08/59] Set the bridge MTU dynamically Don't always assume our MTU will always be 1500 when calculating the MTUs of overlays running inside our test nodes. Instead determine our smallest interface MTU, subtract 50 from that for vxlan overhead (and GRE too since GRE has less overhead than vxlan), and use this new number on the overlay networks. Change-Id: If5facee99f03c0ec4773241f872477b922a6674e --- devstack-vm-gate.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 068a2fe4..736c1bab 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -50,7 +50,11 @@ PUBLIC_NETWORK_GATEWAY=${DEVSTACK_GATE_PUBLIC_NETWORK_GATEWAY:-172.24.5.1} FLOATING_HOST_PREFIX=${DEVSTACK_GATE_FLOATING_HOST_PREFIX:-172.24.4} FLOATING_HOST_MASK=${DEVSTACK_GATE_FLOATING_HOST_MASK:-23} -EXTERNAL_BRIDGE_MTU=1450 +# Get the smallest local MTU +LOCAL_MTU=$(ip link show | sed -ne 's/.*mtu \([0-9]\+\).*/\1/p' | sort -n | head -1) +# 50 bytes is overhead for vxlan (which is greater than GRE +# allowing us to use either overlay option with this MTU. +EXTERNAL_BRIDGE_MTU=$((LOCAL_MTU - 50)) function setup_ssh { local path=$1 From ceb9cd120b3f2129d4322c0fc283971b4dc6aec8 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 8 Mar 2016 10:21:21 -0500 Subject: [PATCH 09/59] Run tests in venv Previously we had wrongly assumed that python yaml package will be available in the images and the run-tests.sh script ran a set of things which included a script that used the pyyaml package. With the recent bindep changes, this assumption broke and the gate-devstack-gate-unittests failed. So we need to install the pyyaml package and then run the tests in this venv for run-tests.sh to work. Change-Id: I541c8add8041348a259b3b789d24cf24ba122ce0 --- test-requirements.txt | 1 + tox.ini | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 test-requirements.txt diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000..d46548ad --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +PyYAML>=3.1.0 diff --git a/tox.ini b/tox.ini index 303fbcca..cf770882 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,11 @@ skipsdist = True install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} +[testenv:run-tests] +deps = -r{toxinidir}/test-requirements.txt +commands = + bash -c "./run-tests.sh" + [testenv:bashate] whitelist_externals = bash From ea710eeb58a9f0c947826ffa520d7955b40efb3a Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Tue, 8 Mar 2016 14:45:03 -0800 Subject: [PATCH 10/59] Archive Ironic VM nodes console logs for 'old' If the ironic VM node console logs exist in the /opt/stack/old/ directory then archive those logs as part of cleanup_host(). Change-Id: I5349f33c94654534825a7b0a88eb2e5bc8092394 --- functions.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/functions.sh b/functions.sh index 6bb9af06..49b9a290 100644 --- a/functions.sh +++ b/functions.sh @@ -768,6 +768,12 @@ function cleanup_host { sudo cp $BASE/old/devstack/tempest.log $BASE/logs/old/verify_tempest_conf.log fi + # Copy Ironic nodes console logs if they exist + if [ -d $BASE/old/ironic-bm-logs ] ; then + sudo mkdir -p $BASE/logs/old/ironic-bm-logs + sudo cp $BASE/old/ironic-bm-logs/*.log $BASE/logs/old/ironic-bm-logs/ + fi + # dstat CSV log if [ -f $BASE/old/dstat-csv.log ]; then sudo cp $BASE/old/dstat-csv.log $BASE/logs/old/ From 416f60410613a42c9fabe44f9dde1caddde9573e Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 8 Mar 2016 07:43:22 -0500 Subject: [PATCH 11/59] Generate a log with deprecation warnings Makes it easier for folks to go look in one spot for deprecation warnings spit out in various process(es). This will also help us warn folks to go fix deprecated stuff before they become a problem. Change-Id: I757821bd6f19a168888df92d416d7af16f41637b --- functions.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/functions.sh b/functions.sh index 6bb9af06..5e13a55c 100644 --- a/functions.sh +++ b/functions.sh @@ -880,6 +880,21 @@ function cleanup_host { sudo chown -R $USER:$USER $BASE/logs/ sudo chmod a+r $BASE/logs/ $BASE/logs/etc + + # Collect all the deprecation related messages into a single file. + # strip out date(s), timestamp(s), pid(s), context information and + # remove duplicates as well so we have a limited set of lines to + # look through. The fancy awk is used instead of a "sort | uniq -c" + # to preserve the order in which we find the lines in a specific + # log file. + grep -i deprecat $BASE/logs/*.log | \ + sed -r 's/[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}\.[0-9]{1,3}/ /g' | \ + sed -r 's/[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}/ /g' | \ + sed -r 's/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,4}/ /g' | + sed -r 's/\[.*\]/ /g' | \ + sed -r 's/\s[0-9]+\s/ /g' | \ + awk '{if ($0 in seen) {seen[$0]++} else {out[++n]=$0;seen[$0]=1}} END { for (i=1; i<=n; i++) print seen[out[i]]" :: " out[i] }' > $BASE/logs/deprecations.log + # rename files to .txt; this is so that when displayed via # logs.openstack.org clicking results in the browser shows the # files, rather than trying to send it to another app or make you From d10c22f360fb28e519fde76fbc9c9c568e951baa Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 9 Mar 2016 12:09:09 -0500 Subject: [PATCH 12/59] add mitaka and ocata branches to feature list Change-Id: Ie4f86c812d4de5cd5987833f377efde4921875b3 Signed-off-by: Doug Hellmann --- features.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/features.yaml b/features.yaml index dcb45078..9f300052 100644 --- a/features.yaml +++ b/features.yaml @@ -1,6 +1,8 @@ config: default: master: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] + ocata: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] + mitaka: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] liberty: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] kilo: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] juno: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] @@ -50,7 +52,7 @@ branches: # The value of ""default" is the name of the "trunk" branch default: master # Normalized branch names only here, e.g. stable/icehouse => icehouse - allowed: [master, liberty, kilo, juno, icehouse] + allowed: [master, ocata, mitaka, liberty, kilo, juno, icehouse] features: default: From 23f2dc4fb4c9c2122261a28fed1bd373b5615120 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 10 Mar 2016 12:00:38 -0500 Subject: [PATCH 13/59] Log deprecations in horizon and keystone Oops! missed the location for the Apache based logs (horizon and keystone). Change-Id: I7d20e95b3ed9f37bfe04865e8809795964a49455 --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 5e13a55c..9beb38c2 100644 --- a/functions.sh +++ b/functions.sh @@ -887,7 +887,7 @@ function cleanup_host { # look through. The fancy awk is used instead of a "sort | uniq -c" # to preserve the order in which we find the lines in a specific # log file. - grep -i deprecat $BASE/logs/*.log | \ + grep -i deprecat $BASE/logs/*.log $BASE/logs/apache/*.log | \ sed -r 's/[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}\.[0-9]{1,3}/ /g' | \ sed -r 's/[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}/ /g' | \ sed -r 's/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,4}/ /g' | From 75966977607404026e5e8c872abc41be075c2657 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Wed, 9 Mar 2016 13:51:50 -0500 Subject: [PATCH 14/59] Use dd to create swapfile, ensure swap amount == 8GB It is not possible to use a swapfile generated by fallocate on a xfs filesystem which is shipped by default on CentOS >7. So since [1], we effectively ran jobs on CentOS VMs without any swap. Use dd as a way of creating the swapfile that works on both Ubuntu and CentOS with a slight performance hit and ensure it's mounted properly so we don't have a silent failure. Also manage a new specific case, Vexxhost VMs ship with 2GB of swap which is not in line with the expectation that all VMs should have 8GB. If there is less than 8GB of swap (or zero), we will make up for the difference. [1]: https://review.openstack.org/#/c/278557/ Change-Id: Iaf4de66475d747f62bd49dfe7318131cbeb03be8 --- functions.sh | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/functions.sh b/functions.sh index 6bb9af06..094208d3 100644 --- a/functions.sh +++ b/functions.sh @@ -314,14 +314,19 @@ function fix_etc_hosts { } function fix_disk_layout { - # HPCloud and Rackspace performance nodes provide no swap, but do have - # ephemeral disks we can use. For providers with no ephemeral disks, such - # as OVH or Internap, create and use a sparse swapfile on the root - # filesystem. - # HPCloud also doesn't have enough space on / for two devstack installs, + # Don't attempt to fix disk layout more than once + [[ -e /etc/fixed_disk_layout ]] && return 0 || sudo touch /etc/fixed_disk_layout + + # Ensure virtual machines from different providers all have at least 8GB of + # swap. + # Use an ephemeral disk if there is one or create and use a swapfile. + # Rackspace also doesn't have enough space on / for two devstack installs, # so we partition the disk and mount it on /opt, syncing the previous # contents of /opt over. - if [ `grep SwapTotal /proc/meminfo | awk '{ print $2; }'` -eq 0 ]; then + SWAPSIZE=8192 + swapcurrent=$(( $(grep SwapTotal /proc/meminfo | awk '{ print $2; }') / 1024 )) + + if [[ $swapcurrent -lt $SWAPSIZE ]]; then if [ -b /dev/xvde ]; then DEV='/dev/xvde' else @@ -341,7 +346,7 @@ function fix_disk_layout { sudo umount ${DEV} fi sudo parted ${DEV} --script -- mklabel msdos - sudo parted ${DEV} --script -- mkpart primary linux-swap 1 8192 + sudo parted ${DEV} --script -- mkpart primary linux-swap 1 ${SWAPSIZE} sudo parted ${DEV} --script -- mkpart primary ext2 8192 -1 sudo mkswap ${DEV}1 sudo mkfs.ext4 ${DEV}2 @@ -350,15 +355,24 @@ function fix_disk_layout { sudo find /opt/ -mindepth 1 -maxdepth 1 -exec mv {} /mnt/ \; sudo umount /mnt sudo mount ${DEV}2 /opt + + # Sanity check + grep -q ${DEV}1 /proc/swaps || exit 1 + grep -q ${DEV}2 /proc/mounts || exit 1 else # If no ephemeral devices are available, use root filesystem # Don't use sparse device to avoid wedging when disk space and # memory are both unavailable. local swapfile='/root/swapfile' - sudo fallocate -l 8192M ${swapfile} + swapdiff=$(( $SWAPSIZE - $swapcurrent )) + + sudo dd if=/dev/zero of=${swapfile} bs=1M count=${swapdiff} sudo chmod 600 ${swapfile} sudo mkswap ${swapfile} sudo swapon ${swapfile} + + # Sanity check + grep -q ${swapfile} /proc/swaps || exit 1 fi fi From 589ca4f1c28990fd51dc78382542b0388ff2ebbc Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Tue, 15 Mar 2016 11:13:40 +0100 Subject: [PATCH 15/59] Fix bug in populating multiline env vars on reproduce The script to populate reproduce.sh is failing when populating multi-line env vars. That is the case of the enable_plugin lines, when more than one plugin is enabled. Add this workaround to properly populate all needed settings. Also add a test to ensure that reproduce method is working as expected. Change-Id: I5287098a47162321efadbde7d069fa2a4e7eabf7 --- functions.sh | 6 +++++- test-functions.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index d34ebd44..d23bb4f0 100644 --- a/functions.sh +++ b/functions.sh @@ -178,7 +178,11 @@ exec 0> $WORKSPACE/logs/reproduce.sh + # first get all keys that match our filter and then output the whole line + # that will ensure that multi-line env vars are set properly + for KEY in $(printenv | grep '\(DEVSTACK\|ZUUL\)' | sed 's/\(.*\)=.*/\1/'); do + echo "declare -x ${KEY}=\"${!KEY}\"" >> $WORKSPACE/logs/reproduce.sh + done cat >> $WORKSPACE/logs/reproduce.sh < Date: Wed, 16 Mar 2016 12:38:11 -0600 Subject: [PATCH 16/59] Remove deletion of ~/workspace-cache Fix so that ~/workspace-cache is no longer deleted. Makes instructions in README work again. Change-Id: I71668132820137f50b32494bc78d58a80867be92 --- functions.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/functions.sh b/functions.sh index d34ebd44..a3f47aec 100644 --- a/functions.sh +++ b/functions.sh @@ -503,9 +503,6 @@ function setup_workspace { sudo mkdir -p $DEST sudo chown -R $USER:$USER $DEST - #TODO(jeblair): remove when this is no longer created by the image - rm -fr ~/workspace-cache/ - # The vm template update job should cache the git repos # Move them to where we expect: echo "Using branch: $base_branch" From a95902068e974d24518ea71b09a978039169ac85 Mon Sep 17 00:00:00 2001 From: Jay Faulkner Date: Thu, 17 Mar 2016 15:10:55 -0700 Subject: [PATCH 17/59] Document prereqs/usage for reproduce script This documents the prerequsites and requirements for reproducing devstack-gate in Ubuntu Trusty. Known issue: Doesn't document this for CentOS/Fedora. Change-Id: I6c483d6af7afda4d4ebb914dc7bd6ee862ad874f --- functions.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/functions.sh b/functions.sh index d23bb4f0..e06e8b0b 100644 --- a/functions.sh +++ b/functions.sh @@ -173,6 +173,15 @@ function remaining_time { function reproduce { cat > $WORKSPACE/logs/reproduce.sh < Date: Fri, 18 Mar 2016 13:08:08 +0100 Subject: [PATCH 18/59] Added env variable for subnode conf for multinode As of now, there is no way to address 2 different set of configuration for the primary node and the subnodes when using the multinode tests. Hence, this patchset adds a new environment variable called DEVSTACK_SUBNODE_CONFIG that appends its content into the local.conf file of the subnodes (only). Besides, the existing DEVSTACK_LOCAL_CONFIG variable is still used to set up the primary node. Change-Id: I1603b747b2cf4767cd3ed71fe4d56ae54920d19e --- devstack-vm-gate.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 6b52ac23..59a88a77 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -516,8 +516,20 @@ EOF # a way to pass through arbitrary devstack config options so that # we don't need to add new devstack-gate options every time we # want to create a new config. - if [[ -n "$DEVSTACK_LOCAL_CONFIG" ]]; then - echo "$DEVSTACK_LOCAL_CONFIG" >>"$localrc_file" + if [[ "$role" = sub ]]; then + # If we are in a multinode environment, we may want to specify 2 + # different sets of plugins + if [[ -n "$DEVSTACK_SUBNODE_CONFIG" ]]; then + echo "$DEVSTACK_SUBNODE_CONFIG" >>"$localrc_file" + else + if [[ -n "$DEVSTACK_LOCAL_CONFIG" ]]; then + echo "$DEVSTACK_LOCAL_CONFIG" >>"$localrc_file" + fi + fi + else + if [[ -n "$DEVSTACK_LOCAL_CONFIG" ]]; then + echo "$DEVSTACK_LOCAL_CONFIG" >>"$localrc_file" + fi fi } From be06eea9ec7d2b947373e9209f353e11da4e2d11 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 24 Mar 2016 06:36:57 -0400 Subject: [PATCH 19/59] Adjust grenade branches for mitaka This makes grenade work with stable mitaka, both upgrading to it, and upgrading from it in master. Depends-On: Ic9fc5cde67691ce03b3d612d86da7207608e20b1 grenade fixes for OS_PROJECT_NAME Change-Id: I73d2f7f83f700e430d231235e6d2277100036cd5 --- devstack-vm-gate-wrap.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index e62b1256..58845408 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -269,6 +269,9 @@ if [[ -n "$DEVSTACK_GATE_GRENADE" ]]; then export GRENADE_NEW_BRANCH="stable/liberty" elif [[ "$GRENADE_BASE_BRANCH" == "stable/liberty" ]]; then export GRENADE_OLD_BRANCH="stable/liberty" + export GRENADE_NEW_BRANCH="stable/mitaka" + elif [[ "$GRENADE_BASE_BRANCH" == "stable/mitaka" ]]; then + export GRENADE_OLD_BRANCH="stable/mitaka" export GRENADE_NEW_BRANCH="$GIT_BRANCH" fi ;; @@ -296,8 +299,11 @@ if [[ -n "$DEVSTACK_GATE_GRENADE" ]]; then elif [[ "$GRENADE_BASE_BRANCH" == "stable/liberty" ]]; then export GRENADE_OLD_BRANCH="stable/kilo" export GRENADE_NEW_BRANCH="stable/liberty" + elif [[ "$GRENADE_BASE_BRANCH" == "stable/mitaka" ]]; then + export GRENADE_OLD_BRANCH="stable/kilo" + export GRENADE_NEW_BRANCH="stable/mitaka" else # master - export GRENADE_OLD_BRANCH="stable/liberty" + export GRENADE_OLD_BRANCH="stable/mitaka" export GRENADE_NEW_BRANCH="$GIT_BRANCH" fi ;; From 7447c61345924c586eaee54ede74dd1a0879ca33 Mon Sep 17 00:00:00 2001 From: "watanabe.isao" Date: Fri, 25 Mar 2016 09:27:30 +0900 Subject: [PATCH 20/59] Remove doubled configuration in local.conf When DEVSTACK_GATE_VIRT_DRIVER has been set to ironic, in function setup_localrc, VIRT_DRIVER=ironic will be set to local.conf twice. This fix remove the second write. Change-Id: I6c0e7649366e3567b9342e4f83489dbae0229c2b Closes-Bug: 1561279 --- devstack-vm-gate.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 6b52ac23..035f732a 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -338,7 +338,6 @@ EOF if [[ "$DEVSTACK_GATE_VIRT_DRIVER" == "ironic" ]]; then export TEMPEST_OS_TEST_TIMEOUT=900 echo "IRONIC_DEPLOY_DRIVER=$DEVSTACK_GATE_IRONIC_DRIVER" >>"$localrc_file" - echo "VIRT_DRIVER=ironic" >>"$localrc_file" echo "IRONIC_BAREMETAL_BASIC_OPS=True" >>"$localrc_file" echo "IRONIC_VM_LOG_DIR=$BASE/$localrc_oldnew/ironic-bm-logs" >>"$localrc_file" echo "DEFAULT_INSTANCE_TYPE=baremetal" >>"$localrc_file" From a9c64e30326ed5cca33517a76ccab7de5e132544 Mon Sep 17 00:00:00 2001 From: Armando Migliaccio Date: Thu, 24 Mar 2016 18:31:18 -0700 Subject: [PATCH 21/59] Use the right stable branch Bad copy and paste, this should have been liberty. Change-Id: I42e0971bbbb2e14bf75f5399811122c64594661e --- devstack-vm-gate-wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index 58845408..09ffd955 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -300,7 +300,7 @@ if [[ -n "$DEVSTACK_GATE_GRENADE" ]]; then export GRENADE_OLD_BRANCH="stable/kilo" export GRENADE_NEW_BRANCH="stable/liberty" elif [[ "$GRENADE_BASE_BRANCH" == "stable/mitaka" ]]; then - export GRENADE_OLD_BRANCH="stable/kilo" + export GRENADE_OLD_BRANCH="stable/liberty" export GRENADE_NEW_BRANCH="stable/mitaka" else # master export GRENADE_OLD_BRANCH="stable/mitaka" From 258d8c86bda09065b4b27f57af1f98de588b2782 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Tue, 29 Mar 2016 15:08:17 +1100 Subject: [PATCH 22/59] Log locale during setup_host A recent bug was due to the locale configuration of our nodes. While it is unlikely we'll have that issue again it's still worth logging the locale for future analysis. Change-Id: I25c945b2a1e13fb1012c653f56ecd5c14e320677 Related-Bug: 1560808 --- functions.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions.sh b/functions.sh index d23bb4f0..c0b8f9bd 100644 --- a/functions.sh +++ b/functions.sh @@ -566,6 +566,9 @@ function setup_host { echo "NProc has discovered $(nproc) CPUs" cat /proc/cpuinfo + # Capture locale configuration + locale + # This is necessary to keep sudo from complaining fix_etc_hosts From 4184fe2f3bdca813d5047abf9741a49e674721b6 Mon Sep 17 00:00:00 2001 From: vsaienko Date: Mon, 28 Mar 2016 23:49:05 +0300 Subject: [PATCH 23/59] Allow to pass TEMPEST_OS_TEST_TIMEOUT from the job 'ironic-multitenant-network' job build/delete 2 instances and can't be completed in current TEMPEST_OS_TEST_TIMEOUT 900 sec. This patch allow to pass TEMPEST_OS_TEST_TIMEOUT from the gate job via DEVSTACK_GATE_OS_TEST_TIMEOUT variable to Ironic jobs. If DEVSTACK_GATE_OS_TEST_TIMEOUT is not set, timeout will be configured to current value 900 sec. Change-Id: I3f0833a4d3371846cb67eeb1cfe0946abc3d3772 --- devstack-vm-gate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 6b52ac23..e9ccbb58 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -336,7 +336,7 @@ EOF fi if [[ "$DEVSTACK_GATE_VIRT_DRIVER" == "ironic" ]]; then - export TEMPEST_OS_TEST_TIMEOUT=900 + export TEMPEST_OS_TEST_TIMEOUT=${DEVSTACK_GATE_OS_TEST_TIMEOUT:-900} echo "IRONIC_DEPLOY_DRIVER=$DEVSTACK_GATE_IRONIC_DRIVER" >>"$localrc_file" echo "VIRT_DRIVER=ironic" >>"$localrc_file" echo "IRONIC_BAREMETAL_BASIC_OPS=True" >>"$localrc_file" From f34dab53e79bdd703a03da84f5f5ebe56a741a24 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Mon, 15 Feb 2016 09:42:18 +1100 Subject: [PATCH 24/59] Save PROJECTS form the job defintion for use in reproduce.sh If the Jenkins Job definition adds items to the PROJECTS variable that are not included as we build up PROJECTS reproduce.sh will ultimately fail. The fix saves the PROJECTS as it is passed into devstack-gate-wrap and includes that in reproduce.sh. Change-Id: Iea45f53b8c26985cb0da9720a631fcf8725522cf Closes-Bug: bug/1544827 --- devstack-vm-gate-wrap.sh | 7 ++++++- functions.sh | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index e62b1256..6e18c5e8 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -37,6 +37,11 @@ source $WORKSPACE/devstack-gate/functions.sh start_timer +# Save the PROJECTS variable as it was passed in. This is needed for reproduce.sh +# incase the job definition contains items that are not in the "global" list +# below. +# See: https://bugs.launchpad.net/openstack-gate/+bug/1544827 +JOB_PROJECTS="$PROJECTS" PROJECTS="openstack-infra/devstack-gate $PROJECTS" PROJECTS="openstack-dev/devstack $PROJECTS" PROJECTS="openstack-dev/pbr $PROJECTS" @@ -468,7 +473,7 @@ $ANSIBLE all -f 5 -i "$WORKSPACE/inventory" -m file \ -a "path='$WORKSPACE/logs' state=directory" # Record a file to reproduce this build -reproduce +reproduce "$JOB_PROJECTS" # Run ansible to do setup_host on all nodes. echo "Setting up the hosts" diff --git a/functions.sh b/functions.sh index d23bb4f0..eb8ce947 100644 --- a/functions.sh +++ b/functions.sh @@ -171,6 +171,7 @@ function remaining_time { # Create a script to reproduce this build function reproduce { + JOB_PROJECTS=$1 cat > $WORKSPACE/logs/reproduce.sh <> $WORKSPACE/logs/reproduce.sh done + if [ -n "$JOB_PROJECTS" ] ; then + echo "declare -x PROJECTS=\"$JOB_PROJECTS\"" >> $WORKSPACE/logs/reproduce.sh + fi cat >> $WORKSPACE/logs/reproduce.sh < Date: Wed, 30 Mar 2016 16:44:29 -0700 Subject: [PATCH 25/59] Use ntp-wait instead of ntpdate to set time ntpdate is deprecated and should not be used anymore. Move away from ntpdate and use ntp-wait to wait for ntpd to snychronize the time instead. Change-Id: I29a101eb9ea5c2d0da6b7762fe93366f0c0a8999 --- functions.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/functions.sh b/functions.sh index af37ed5c..c489f2bf 100644 --- a/functions.sh +++ b/functions.sh @@ -140,20 +140,7 @@ function start_timer { # first make sure the time is right, so we don't go into crazy land # later if the system decides to apply an ntp date and we jump forward # 4 hrs (which has happened) - if is_fedora; then - local ntp_service='ntpd' - elif uses_debs; then - local ntp_service='ntp' - else - echo "Unsupported platform, can't determine ntp service" - exit 1 - fi - local default_ntp_server=$( - grep ^server /etc/ntp.conf | head -1 | awk '{print $2}') - local ntp_server=${NTP_SERVER:-$default_ntp_server} - sudo service $ntp_service stop - sudo /usr/sbin/ntpdate $ntp_server - sudo service $ntp_service start + sudo /usr/sbin/ntp-wait -v sleep 1 START_TIME=`date +%s` } From 4abc5d6f338041fc9aa1c60402b27512dfd31f72 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 30 Mar 2016 16:55:38 -0700 Subject: [PATCH 26/59] Use journald when it is present Previously we only assumed journald was present on fedora, but now it exists on centos7 and ubuntu xenial. Instead of using the distro to determine if journald is present test for the presence of journalctl. If we don't hvae a journalctl fall back to the old behavior and assume rsyslog is in use. Change-Id: I4e1a3bdda7d46722b0a16ebb0b442917d4cb9b78 --- functions.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/functions.sh b/functions.sh index af37ed5c..07bcaa76 100644 --- a/functions.sh +++ b/functions.sh @@ -586,7 +586,12 @@ function setup_host { sudo mkdir -p $BASE # Start with a fresh syslog - if uses_debs; then + if which journalctl ; then + # save timestamp and use journalctl to dump everything since + # then at the end + date +"%Y-%m-%d %H:%M:%S" | sudo tee $BASE/log-start-timestamp.txt + else + # Assume rsyslog, move old logs aside then restart the service. sudo stop rsyslog sudo mv /var/log/syslog /var/log/syslog-pre-devstack sudo mv /var/log/kern.log /var/log/kern_log-pre-devstack @@ -599,10 +604,6 @@ function setup_host { sudo chmod /var/log/kern.log --ref /var/log/kern_log-pre-devstack sudo chmod a+r /var/log/kern.log sudo start rsyslog - elif is_fedora; then - # save timestamp and use journalctl to dump everything since - # then at the end - date +"%Y-%m-%d %H:%M:%S" | sudo tee $BASE/log-start-timestamp.txt fi # Create a stack user for devstack to run as, so that we can @@ -714,15 +715,16 @@ function cleanup_host { sleep 2 # No matter what, archive logs and config files - if uses_debs; then - sudo cp /var/log/syslog $BASE/logs/syslog.txt - sudo cp /var/log/kern.log $BASE/logs/kern_log.txt - elif is_fedora; then + if which journalctl ; then # the journal gives us syslog() and kernel output, so is like # a concatenation of the above. sudo journalctl --no-pager \ --since="$(cat $BASE/log-start-timestamp.txt)" \ | sudo tee $BASE/logs/syslog.txt > /dev/null + else + # assume rsyslog + sudo cp /var/log/syslog $BASE/logs/syslog.txt + sudo cp /var/log/kern.log $BASE/logs/kern_log.txt fi # apache logs; including wsgi stuff like horizon, keystone, etc. From 3254d688df01e23cd56786b8f5b783e3980c1129 Mon Sep 17 00:00:00 2001 From: Doug Wiegley Date: Sun, 13 Mar 2016 17:21:44 -0600 Subject: [PATCH 27/59] Fail the test if the pre test hook fails Change-Id: I92f34d064c76da05a0ef7b9d458673543da3f40e --- devstack-vm-gate-wrap.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index e62b1256..61eec324 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -552,15 +552,23 @@ fi # devstack-vm-gate-wrap.sh will not automagically run the hooks on each node. # Run pre test hook if we have one with_timeout call_hook_if_defined "pre_test_hook" +GATE_RETVAL=$? +if [ $GATE_RETVAL -ne 0 ]; then + echo "ERROR: the pre-test setup script run by this job failed - exit code: $GATE_RETVAL" +fi # Run the gate function -echo "Running gate_hook" -with_timeout "gate_hook" -GATE_RETVAL=$? +if [ $GATE_RETVAL -eq 0 ]; then + echo "Running gate_hook" + with_timeout "gate_hook" + GATE_RETVAL=$? + if [ $GATE_RETVAL -ne 0 ]; then + echo "ERROR: the main setup script run by this job failed - exit code: $GATE_RETVAL" + fi +fi RETVAL=$GATE_RETVAL if [ $GATE_RETVAL -ne 0 ]; then - echo "ERROR: the main setup script run by this job failed - exit code: $GATE_RETVAL" echo " please look at the relevant log files to determine the root cause" echo "Running devstack worlddump.py" sudo $BASE/new/devstack/tools/worlddump.py -d $BASE/logs From 60d480ca9b369ca5a2d8f1a39ce8ebe2d5be6bcc Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Sun, 10 Apr 2016 10:49:23 -0400 Subject: [PATCH 28/59] Archive /etc/openstack/clouds.yaml in gate runs gate-novaclient-dsvm-functional uses a clouds.yaml file for keystone auth so we should archive that if it's available for debugging. Change-Id: I87b313bbb9e9f865be5936e8465ec73e5975a65c Related-Bug: #1568527 --- functions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 07bcaa76..08956741 100644 --- a/functions.sh +++ b/functions.sh @@ -764,8 +764,10 @@ function cleanup_host { sudo cp /etc/sudoers $BASE/logs/sudoers.txt # Archive config files + # NOTE(mriedem): 'openstack' is added separately since it's not a project + # but it is where clouds.yaml is stored in dsvm runs that use it. sudo mkdir $BASE/logs/etc/ - for PROJECT in $PROJECTS; do + for PROJECT in $PROJECTS openstack; do proj=`basename $PROJECT` if [ -d /etc/$proj ]; then sudo cp -r /etc/$proj $BASE/logs/etc/ From bd3ca1f091ec94e59e4d410ebd25f9b1f6b481b9 Mon Sep 17 00:00:00 2001 From: Eyal Date: Tue, 12 Apr 2016 15:33:54 +0300 Subject: [PATCH 29/59] support py3 Change-Id: Ied6e8c9bb44557677041854c6974929d7383a484 --- test-matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-matrix.py b/test-matrix.py index 48fff355..17170f2f 100755 --- a/test-matrix.py +++ b/test-matrix.py @@ -65,7 +65,7 @@ def normalize_branch(branch): def configs_from_env(): configs = [] - for k, v in os.environ.iteritems(): + for k, v in os.environ.items(): if k.startswith('DEVSTACK_GATE_'): if v not in FALSE_VALUES: f = k.split('DEVSTACK_GATE_')[1] @@ -145,7 +145,7 @@ def main(): LOG.debug("Services: %s " % services) if opts.mode == "services": - print ",".join(services) + print(",".join(services)) if __name__ == "__main__": From fb8739202f49151c77785d66a4807c892e62c29e Mon Sep 17 00:00:00 2001 From: fumihiko kakuma Date: Mon, 16 Nov 2015 15:39:05 +0900 Subject: [PATCH 30/59] Consider to log a package list for pip3 When we run devstack with USE_PYTHON3=True, a package may be installed by pip2 or pip3 depending on package classifier. So we should try to log a package list by pip2 and pip3. Change-Id: I06e2559e852f0dabbbbb8f6c0dc081cedb745b60 --- functions.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index 08956741..eba6e6c2 100644 --- a/functions.sh +++ b/functions.sh @@ -874,9 +874,14 @@ function cleanup_host { sudo iptables-save > $WORKSPACE/iptables.txt df -h > $WORKSPACE/df.txt - pip freeze > $WORKSPACE/pip-freeze.txt - sudo mv $WORKSPACE/iptables.txt $WORKSPACE/df.txt \ - $WORKSPACE/pip-freeze.txt $BASE/logs/ + sudo mv $WORKSPACE/iptables.txt $WORKSPACE/df.txt $BASE/logs/ + + for py_ver in 2 3; do + if [[ `which python${py_ver}` ]]; then + python${py_ver} -m pip freeze > $WORKSPACE/pip${py_ver}-freeze.txt + sudo mv $WORKSPACE/pip${py_ver}-freeze.txt $BASE/logs/ + fi + done if [ `command -v dpkg` ]; then dpkg -l> $WORKSPACE/dpkg-l.txt From 41b076c5e3904fc3a762e8645cfd71a12dc1a2b5 Mon Sep 17 00:00:00 2001 From: vsaienko Date: Wed, 13 Apr 2016 16:21:44 +0300 Subject: [PATCH 31/59] Increase default OS_TEST_TIMEOUT to 1200 Both build and terminate instance timeout are set to 600sec for baremetal instances. As result maximum legimate time is 1200 if do not take info account power/state change and other timeouts. The job timeout is set to 180 minutes [0] so tempest test timeout value can be safely increased to 1200sec. Closes-Bug: #1576100 Change-Id: I5343486fa7f4bc7007d8cabd906ef1a136e76e8c --- devstack-vm-gate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 600e5dd9..1c99cf78 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -336,7 +336,7 @@ EOF fi if [[ "$DEVSTACK_GATE_VIRT_DRIVER" == "ironic" ]]; then - export TEMPEST_OS_TEST_TIMEOUT=${DEVSTACK_GATE_OS_TEST_TIMEOUT:-900} + export TEMPEST_OS_TEST_TIMEOUT=${DEVSTACK_GATE_OS_TEST_TIMEOUT:-1200} echo "IRONIC_DEPLOY_DRIVER=$DEVSTACK_GATE_IRONIC_DRIVER" >>"$localrc_file" echo "VIRT_DRIVER=ironic" >>"$localrc_file" echo "IRONIC_BAREMETAL_BASIC_OPS=True" >>"$localrc_file" From 033036ebcd77430bc88e302f7caf60e48f140127 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 28 Apr 2016 12:48:29 -0700 Subject: [PATCH 32/59] Fixed link to l3 agent in tempest-logs q-vpn log is not expected for non vpnaas jobs. Even more so, vpnaas tempest gate does not even run q-vpn service, instead relying on neutron-vpnaas service defined in devstack plugin. So just replace q-vpn log (which never exists) with l3 agent log, which is a reasonable default for neutron gate logdirs. Change-Id: Ie91b3a724c22f9262aa1925be5505fe118d93751 --- help/tempest-logs.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/help/tempest-logs.html b/help/tempest-logs.html index e76c339a..cfdc2adb 100644 --- a/help/tempest-logs.html +++ b/help/tempest-logs.html @@ -73,7 +73,7 @@

Types of logs

  • screen-q-meta.txt.gz: neutron-metadata-agent
  • screen-q-metering.txt.gz: neutron-metering-agent
  • screen-q-svc.txt.gz: neutron-server -
  • screen-q-vpn.txt.gz: neutron-vpn-agent +
  • screen-q-l3.txt.gz: neutron-l3-agent
  • swift
      From 5af29c0d5bb0c65493266d52676766879f4e2b69 Mon Sep 17 00:00:00 2001 From: Tim Buckley Date: Tue, 16 Feb 2016 15:44:42 -0700 Subject: [PATCH 33/59] Install and run StackViz during devstack-gate host cleanup StackViz is a utility for visualizing the performance of DevStack and Tempest executions. This adds a new function, `process_stackviz`, that copies a static site template built during nodepool image build (see dependent patch), and then installs and runs a small Python module (already cached on the filesystem) to process subunit data. This data, along with the static template, is then copied into the log output directory so that it can be uploaded to the log server when the job finishes. Change-Id: Ia5bee69f2874ca50ac6148494d2926ef4ab73b6b Depends-On: I9bc50b8eba696264d2b97ed20a37f28f4768abb8 --- functions.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/functions.sh b/functions.sh index 72314c51..96fe5216 100644 --- a/functions.sh +++ b/functions.sh @@ -657,6 +657,39 @@ function process_testr_artifacts { fi } +function process_stackviz { + local project=$1 + local path_prefix=${2:-new} + + local project_path=$BASE/$path_prefix/$project + local log_path=$BASE/logs + if [[ "$path_prefix" != "new" ]]; then + log_path=$BASE/logs/$path_prefix + fi + + local stackviz_path=/opt/stackviz + if [ -d $stackviz_path/build ]; then + sudo pip install -U $stackviz_path + + # static html+js should be prebuilt during image creation + cp -r $stackviz_path/build $log_path/stackviz + + pushd $project_path + if [ -f $BASE/new/dstat-csv.txt ]; then + sudo testr last --subunit | stackviz-export \ + --dstat $BASE/new/dstat-csv.txt \ + --end --stdin \ + $log_path/stackviz/data + else + sudo testr last --subunit | stackviz-export \ + --env --stdin \ + $log_path/stackviz/data + fi + sudo chown -R $USER:$USER $log_path/stackviz + popd + fi +} + function cleanup_host { # TODO: clean this up to be errexit clean local errexit=$(set +o | grep errexit) @@ -843,6 +876,8 @@ function cleanup_host { sudo mv $WORKSPACE/rpm-qa.txt.gz $BASE/logs/ fi + process_stackviz tempest + process_testr_artifacts tempest process_testr_artifacts tempest old From 42a9a9d8bb0b98bd340ab5b6e2b52b5e740095ee Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 2 May 2016 10:33:24 -0400 Subject: [PATCH 34/59] devstack-vm-gate-wrap: pin paramiko==1.16.0 paramiki > 1.16.0 requires python-cryptography, but TripleO CI does not handle libffi-devel and openssl-devel packages, it's a WIP in DIB. Until we fix it in DIB, this patch is a workaround so we can unblock CIs that use this script, TripleO CI included. Change-Id: I05755e5374472fb95a4ff9d0dc03dbd33bba627f --- devstack-vm-gate-wrap.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index ec938b2b..34996b9e 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -445,7 +445,9 @@ set -x # Install ansible sudo -H pip install virtualenv virtualenv /tmp/ansible -/tmp/ansible/bin/pip install ansible==$ANSIBLE_VERSION +# NOTE(emilien): workaround to avoid installing cryptography +# https://github.com/ansible/ansible/issues/15665 +/tmp/ansible/bin/pip install paramiko==1.16.0 ansible==$ANSIBLE_VERSION export ANSIBLE=/tmp/ansible/bin/ansible # Write inventory file with groupings From baf68bb7edfa2d7cc50be5e702304b9c3b15e212 Mon Sep 17 00:00:00 2001 From: vsaienko Date: Tue, 10 May 2016 15:24:58 +0300 Subject: [PATCH 35/59] Do not set IRONIC_VM_COUNT from devstack-gate IRONIC_VM_COUNT is set directly from the project-config [0]. Reference: [0] https://github.com/openstack-infra/project-config/blob/0e958003cdcabd7b8c23bd1ded4d79385936556d/jenkins/jobs/devstack-gate.yaml#L681 Change-Id: If5be4eb2d478b624a9dea97d80b0ab37cb8256dd Closes-Bug: #1580157 --- devstack-vm-gate.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 6c53ad60..7356686e 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -356,11 +356,9 @@ EOF echo "IRONIC_VM_EPHEMERAL_DISK=0" >>"$localrc_file" # agent CoreOS ramdisk is a little heavy echo "IRONIC_VM_SPECS_RAM=1024" >>"$localrc_file" - echo "IRONIC_VM_COUNT=1" >>"$localrc_file" else echo "IRONIC_ENABLED_DRIVERS=fake,pxe_ssh,pxe_ipmitool" >>"$localrc_file" echo "IRONIC_VM_EPHEMERAL_DISK=1" >>"$localrc_file" - echo "IRONIC_VM_COUNT=3" >>"$localrc_file" fi fi From cf8b7ae704f9e387d4cbc626ed966e3d542ab723 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 23 Mar 2016 15:29:07 +1100 Subject: [PATCH 36/59] Make reproduce function quiet In every console log (e.g. [1]) we've got a long section of looping around variables and writing them out being traced. This is working fine, so turn down the tracing on this to give better signal/noise ratio in logs. [1] http://logs.openstack.org/29/295629/3/check/gate-tempest-dsvm-full/f7fe416/console.html#_2016-03-22_14_53_45_466 Change-Id: Ieac461609a1a1866c1c3c461e75230406dffc649 --- functions.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions.sh b/functions.sh index 07bcaa76..c3e38a01 100644 --- a/functions.sh +++ b/functions.sh @@ -171,6 +171,9 @@ function remaining_time { # Create a script to reproduce this build function reproduce { + local xtrace=$(set +o | grep xtrace) + set +o xtrace + JOB_PROJECTS=$1 cat > $WORKSPACE/logs/reproduce.sh < Date: Fri, 20 May 2016 17:34:28 -0400 Subject: [PATCH 37/59] Print installed tempest-plugins after tempest run The ALL_PLUGINS tox job runs tempest in a venv with system site-packages enabled. This can make it very confusing to figure out exactly which plugins are installed when tempest is run. Especially given many projects' terrible choice to bundle the plugin in the project repo. This commit adds running 'tempest list-plugins' inside the venv tox makes for that job to show at the end of a run all the plugins tempest was run with. Change-Id: I8a65c851cdf5a4081ac32afa17f69ee001ff40c7 --- devstack-vm-gate.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 773cbdf2..28eac92e 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -754,6 +754,7 @@ if [[ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]]; then if [[ "$DEVSTACK_GATE_TEMPEST_ALL_PLUGINS" -eq "1" ]]; then echo "Running tempest with plugins and a custom regex filter" $TEMPEST_COMMAND -eall-plugin -- --concurrency=$TEMPEST_CONCURRENCY $DEVSTACK_GATE_TEMPEST_REGEX + sudo -H -u tempest .tox/all-plugin/bin/tempest list-plugins else echo "Running tempest with a custom regex filter" $TEMPEST_COMMAND -eall -- --concurrency=$TEMPEST_CONCURRENCY $DEVSTACK_GATE_TEMPEST_REGEX @@ -761,6 +762,7 @@ if [[ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]]; then elif [[ "$DEVSTACK_GATE_TEMPEST_ALL_PLUGINS" -eq "1" ]]; then echo "Running tempest all-plugins test suite" $TEMPEST_COMMAND -eall-plugin -- --concurrency=$TEMPEST_CONCURRENCY + sudo -H -u tempest .tox/all-plugin/bin/tempest list-plugins elif [[ "$DEVSTACK_GATE_TEMPEST_ALL" -eq "1" ]]; then echo "Running tempest all test suite" $TEMPEST_COMMAND -eall -- --concurrency=$TEMPEST_CONCURRENCY From b81c4a68b381346d0ee610d1302b3f228c131a62 Mon Sep 17 00:00:00 2001 From: vsaienko Date: Thu, 12 May 2016 14:37:30 +0300 Subject: [PATCH 38/59] Allow to set Ironic provision timeout from the job Launching smoke tempest tests building several instances in parallel. As result grenade job that uses tempest smoke tests need to have higher provision/unprovision timeout values value. This patch allows to set BUILD_TIMEOUT from the job. Change-Id: Idd454b7dea2a6d37a6bc048132fc2b3765d37429 --- devstack-vm-gate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index cebec23c..28f47d65 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -342,7 +342,7 @@ EOF echo "IRONIC_BAREMETAL_BASIC_OPS=True" >>"$localrc_file" echo "IRONIC_VM_LOG_DIR=$BASE/$localrc_oldnew/ironic-bm-logs" >>"$localrc_file" echo "DEFAULT_INSTANCE_TYPE=baremetal" >>"$localrc_file" - echo "BUILD_TIMEOUT=600" >>"$localrc_file" + echo "BUILD_TIMEOUT=${DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT:-600}" >>"$localrc_file" echo "IRONIC_CALLBACK_TIMEOUT=600" >>"$localrc_file" echo "Q_AGENT=openvswitch" >>"$localrc_file" echo "Q_ML2_TENANT_NETWORK_TYPE=vxlan" >>"$localrc_file" From 3250b2096772f7d02be73ab935cd4e4215343b84 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 25 May 2016 07:52:25 -0400 Subject: [PATCH 39/59] don't set libvirt cpu_model Nova was incorrectly checking cpu model compatiblity when running qemu guests, which isn't needed, as they can emulate any instruction under the sun. This removes this setting from our testing after Nova lands a patch to fix this. Depends-On: I8b782678a6dfa7bcfc203381037e1df4475c3194 Change-Id: I41b4c0371515c88d4ab9fc127e5abc9b3fb97f31 --- devstack-vm-gate.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index cebec23c..95e9f6b8 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -564,7 +564,8 @@ EOF fi if [[ "$DEVSTACK_GATE_TOPOLOGY" == "multinode" ]]; then - echo -e "[[post-config|\$NOVA_CONF]]\n[libvirt]\ncpu_mode=custom\ncpu_model=gate64" >> local.conf + # ensure local.conf exists to remove conditional logic + touch local.conf if [[ $DEVSTACK_GATE_NEUTRON -eq "1" ]]; then echo -e "[[post-config|\$NEUTRON_CONF]]\n[DEFAULT]\nnetwork_device_mtu=$EXTERNAL_BRIDGE_MTU" >> local.conf fi @@ -601,7 +602,8 @@ else cd $BASE/new/devstack setup_localrc "new" "localrc" "primary" if [[ "$DEVSTACK_GATE_TOPOLOGY" == "multinode" ]]; then - echo -e "[[post-config|\$NOVA_CONF]]\n[libvirt]\ncpu_mode=custom\ncpu_model=gate64" >> local.conf + # ensure local.conf exists to remove conditional logic + touch local.conf if [[ $DEVSTACK_GATE_NEUTRON -eq "1" ]]; then echo -e "[[post-config|\$NEUTRON_CONF]]\n[DEFAULT]\nnetwork_device_mtu=$EXTERNAL_BRIDGE_MTU" >> local.conf fi From 40c2ba7e637c20326f86e543a66e65dfe6aec0b1 Mon Sep 17 00:00:00 2001 From: "Sean M. Collins" Date: Wed, 25 May 2016 10:51:24 -0700 Subject: [PATCH 40/59] Stop using DevStack fwaas code We should transition to the DevStack fwaas plugin, similar to what was done in c59dfacef8c211b7e114e634ca17f225bde6c3e0 Change-Id: Iadcee07e873fcb4f099ebccc2e33780e74438140 Related-Change: If6c6e032689392fecc8c24517666128c8c103a7b Related-Change: Ic60cd1fa90c19dfac00be583e2ddc5633dbb68a3 --- devstack-vm-gate.sh | 4 ++-- features.yaml | 2 +- test-features.sh | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index cebec23c..32746ed2 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -223,8 +223,8 @@ function setup_localrc { # As per reference architecture described in # https://wiki.openstack.org/wiki/Neutron/DVR # for DVR multi-node, add the following services - # on all compute nodes (q-fwaas being optional): - MY_ENABLED_SERVICES+=",q-l3,q-fwaas,q-meta" + # on all compute nodes: + MY_ENABLED_SERVICES+=",q-l3,q-meta" fi else MY_ENABLED_SERVICES+=",n-net,n-api-meta" diff --git a/features.yaml b/features.yaml index 9f300052..d11d12ca 100644 --- a/features.yaml +++ b/features.yaml @@ -97,7 +97,7 @@ features: neutron-adv: base: - services: [q-lbaas, q-fwaas] + services: [q-lbaas] rm-services: [n-net] kilo: services: [q-vpn] diff --git a/test-features.sh b/test-features.sh index cb1d3116..a7d75469 100755 --- a/test-features.sh +++ b/test-features.sh @@ -18,11 +18,11 @@ ERRORS=0 TEMPEST_FULL_MASTER="n-api,n-crt,n-obj,n-cpu,n-sch,n-cond,g-api,g-reg,key,horizon,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,n-net" -TEMPEST_NEUTRON_MASTER="n-api,n-crt,n-obj,n-cpu,n-sch,n-cond,g-api,g-reg,key,horizon,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,quantum,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-lbaas,q-fwaas,q-metering" +TEMPEST_NEUTRON_MASTER="n-api,n-crt,n-obj,n-cpu,n-sch,n-cond,g-api,g-reg,key,horizon,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,quantum,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-lbaas,q-metering" -TEMPEST_NEUTRON_KILO="n-api,n-crt,n-obj,n-cpu,n-sch,n-cond,g-api,g-reg,key,horizon,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,quantum,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-lbaas,q-fwaas,q-metering,q-vpn" +TEMPEST_NEUTRON_KILO="n-api,n-crt,n-obj,n-cpu,n-sch,n-cond,g-api,g-reg,key,horizon,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,quantum,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-lbaas,q-metering,q-vpn" -TEMPEST_HEAT_SLOW_MASTER="n-api,n-crt,n-obj,n-cpu,n-sch,n-cond,g-api,g-reg,key,horizon,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,quantum,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-lbaas,q-fwaas,q-metering" +TEMPEST_HEAT_SLOW_MASTER="n-api,n-crt,n-obj,n-cpu,n-sch,n-cond,g-api,g-reg,key,horizon,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,quantum,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-lbaas,q-metering" GRENADE_NEW_MASTER="n-api,n-crt,n-obj,n-cpu,n-sch,n-cond,g-api,g-reg,key,horizon,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,tempest,n-net,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification" From 077314510c90e29637c7864357e2cf137c1eb766 Mon Sep 17 00:00:00 2001 From: "Andrea Frittoli (andreaf)" Date: Sat, 28 May 2016 10:13:27 +0100 Subject: [PATCH 41/59] Save tempest accounts.yaml in logs Some test jobs use pre-provisioned credentials. It can be useful to have the credetials file for troubleshooting purposes, so copying it to the logs folder when available. Change-Id: I9fcb3497387fb32f3e515cda44a1a105921a04c2 --- functions.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions.sh b/functions.sh index 43ae0579..ba18ee51 100644 --- a/functions.sh +++ b/functions.sh @@ -876,6 +876,9 @@ function cleanup_host { # Copy tempest config file sudo cp $BASE/new/tempest/etc/tempest.conf $NEWLOGTARGET/tempest_conf.txt + if [ -f $BASE/new/tempest/etc/accounts.yaml ] ; then + sudo cp $BASE/new/tempest/etc/accounts.yaml $NEWLOGTARGET/accounts_yaml.txt + fi # Copy dstat CSV log if it exists if [ -f $BASE/new/dstat-csv.log ]; then From 3ef48cec70c771242d743467768f22d1ecb55ecb Mon Sep 17 00:00:00 2001 From: vsaienko Date: Mon, 16 May 2016 13:20:26 +0300 Subject: [PATCH 42/59] Allow to pass OS_TEST_TIMEOUT for grenade job OS_TEST_TIMEOUT may be passed via DEVSTACK_GATE_OS_TEST_TIMEOUT project-config variable. Change-Id: Id81e9060fb0b7800cba1345ea3c8f28b1a691759 --- devstack-vm-gate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 6a7041dd..971915e9 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -552,6 +552,7 @@ TARGET_RUN_SMOKE=False SAVE_DIR=\$BASE_RELEASE_DIR/save DO_NOT_UPGRADE_SERVICES=$DO_NOT_UPGRADE_SERVICES TEMPEST_CONCURRENCY=$TEMPEST_CONCURRENCY +OS_TEST_TIMEOUT=$DEVSTACK_GATE_OS_TEST_TIMEOUT VERBOSE=False PLUGIN_DIR=\$TARGET_RELEASE_DIR EOF From 8aa9194ed9d263196e9286cff34f4f3f1b229496 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 17 Jun 2016 11:04:15 +1000 Subject: [PATCH 43/59] Set read/search perms recursively With the new zuul rsync copy, the apache/ directory disappeared from view as its permissions are copied verbatim into the log directory and it's not world readable. Correct permissions on $BASE/logs so that everything is readable. Change-Id: Ia034c5176937f579e0f19504c6f0ef9c118869b8 --- functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions.sh b/functions.sh index 6712ac06..202cb01d 100644 --- a/functions.sh +++ b/functions.sh @@ -966,8 +966,9 @@ function cleanup_host { # Make sure the current user can read all the logs and configs sudo chown -R $USER:$USER $BASE/logs/ - sudo chmod a+r $BASE/logs/ $BASE/logs/etc - + # (note X not x ... execute/search only if the file is a directory + # or already has execute permission for some user) + sudo chmod -R a+rX $BASE/logs/ # Collect all the deprecation related messages into a single file. # strip out date(s), timestamp(s), pid(s), context information and From 4f3bc0ef76bf42195b54a421c51579a076a7c33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dulko?= Date: Thu, 9 Jun 2016 13:55:52 +0200 Subject: [PATCH 44/59] Enabling Cinder multinode testing Cinder team is planning to start multinode testing in Newton cycle. We want to be able to test volume migration/retype and partial grenade. This commit enables c-vol and c-bak on the subnode in regular multinode setups (this should work as I4d2960d92f388ac689dfa6b436dc8bfc1e129fbf is merged now). Also a new features.yaml elements are introduced that would disable c-vol and c-bak on primary node. This will be required for multinode grenade jobs that will test compatibility of master c-api and c-sch with stable c-vol and c-bak. Co-Authored-By: Karthik Prabhu Vinod Change-Id: I4532bdcfa845cf0a405f68371c61559b0a70f9c1 --- devstack-vm-gate.sh | 3 +-- features.yaml | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 971915e9..e18068a6 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -214,9 +214,8 @@ function setup_localrc { local original_enabled_services=$MY_ENABLED_SERVICES # TODO(afazekas): Move to the feature grid - # TODO(afazekas): add c-vol if [[ $role = sub ]]; then - MY_ENABLED_SERVICES="n-cpu,ceilometer-acompute,dstat" + MY_ENABLED_SERVICES="n-cpu,ceilometer-acompute,dstat,c-vol,c-bak" if [[ "$DEVSTACK_GATE_NEUTRON" -eq "1" ]]; then MY_ENABLED_SERVICES+=",q-agt" if [[ "$DEVSTACK_GATE_NEUTRON_DVR" -eq "1" ]]; then diff --git a/features.yaml b/features.yaml index 9f300052..27fa9fc5 100644 --- a/features.yaml +++ b/features.yaml @@ -47,6 +47,8 @@ config: features: [heat] tlsproxy: features: [tlsproxy] + cinder_mn_grenade: + features: [cinder-mn-grenade] branches: # The value of ""default" is the name of the "trunk" branch @@ -110,6 +112,12 @@ features: base: services: [cinder, c-api, c-vol, c-sch, c-bak] + # This will be used to disable c-vol on primary node when running multinode grenade + # job that will test compatibility of new c-api, c-sch (primary) and old c-vol and c-bak (sub). + cinder-mn-grenade: + base: + rm-services: [c-vol, c-bak] + heat: base: services: [heat, h-api, h-api-cfn, h-api-cw, h-eng] From f5d3bdb99fab09d39eaa2014abff78c8efb695b5 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 15 Jul 2016 19:19:09 +0200 Subject: [PATCH 45/59] Configure infrastructure MTU with global_physnet_mtu The network_device_mtu option will be removed from Neutron in Newton. The global_physnet_mtu option was introduced in Mitaka. Before Mitaka, Neutron did not have any multinode jobs that would require setting the infrastructure MTU for inter-node connectivity. Change-Id: I337b284076a794027fbd63796119d56bd1923cf2 Related-Bug: #1603493 --- devstack-vm-gate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 048163b7..d146ea8e 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -568,7 +568,7 @@ EOF # ensure local.conf exists to remove conditional logic touch local.conf if [[ $DEVSTACK_GATE_NEUTRON -eq "1" ]]; then - echo -e "[[post-config|\$NEUTRON_CONF]]\n[DEFAULT]\nnetwork_device_mtu=$EXTERNAL_BRIDGE_MTU" >> local.conf + echo -e "[[post-config|\$NEUTRON_CONF]]\n[DEFAULT]\nglobal_physnet_mtu=$EXTERNAL_BRIDGE_MTU" >> local.conf fi # get this in our base config @@ -606,7 +606,7 @@ else # ensure local.conf exists to remove conditional logic touch local.conf if [[ $DEVSTACK_GATE_NEUTRON -eq "1" ]]; then - echo -e "[[post-config|\$NEUTRON_CONF]]\n[DEFAULT]\nnetwork_device_mtu=$EXTERNAL_BRIDGE_MTU" >> local.conf + echo -e "[[post-config|\$NEUTRON_CONF]]\n[DEFAULT]\nglobal_physnet_mtu=$EXTERNAL_BRIDGE_MTU" >> local.conf fi fi From e76e156c4001eb910ad0ce4f6e685363e038dbac Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 15 Jul 2016 10:54:33 -0700 Subject: [PATCH 46/59] Always set br-ex mtu including for grenade runs Previously we were only setting the mtu on br-ex if not running grenade. But now neutron runs multinode grenade tests so need to have br-ex's mtu set appropriately for grenade and devstack both. This is done by using PUBLIC_DEVICE_MTU devstack variable that will guarantee the bridge is set appropriately in both devstack and grenade cases. Change-Id: I9bcc47303a6ce1f0b3125ad374adcc2e7ca654ac Depends-On: I38a80bac18673a30842a7b997d0669fed5aff976 Related-Bug: #1603268 --- devstack-vm-gate.sh | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 048163b7..b5cafa21 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -311,6 +311,11 @@ DATABASE_QUERY_LOGGING=True EBTABLES_RACE_FIX=True EOF + if [[ "$DEVSTACK_GATE_TOPOLOGY" == "multinode" ]] && [[ $DEVSTACK_GATE_NEUTRON -eq "1" ]]; then + # Reduce the MTU on br-ex to match the MTU of underlying tunnels + echo "PUBLIC_BRIDGE_MTU=$EXTERNAL_BRIDGE_MTU" >>"$localrc_file" + fi + if [[ "$DEVSTACK_CINDER_SECURE_DELETE" -eq "0" ]]; then echo "CINDER_SECURE_DELETE=False" >>"$localrc_file" fi @@ -658,19 +663,6 @@ else exit 1 fi fi - - if [[ "$DEVSTACK_GATE_TOPOLOGY" != "aio" ]] && [[ $DEVSTACK_GATE_NEUTRON -eq "1" ]]; then - # NOTE(afazekas): The cirros lp#1301958 does not support MTU setting via dhcp, - # simplest way the have tunneling working, with dvsm, without increasing the host system MTU - # is to decreasion the MTU on br-ex - # TODO(afazekas): Configure the mtu smarter on the devstack side - MTU_NODES=primary - if [[ "$DEVSTACK_GATE_NEUTRON_DVR" -eq "1" ]]; then - MTU_NODES=all - fi - $ANSIBLE "$MTU_NODES" -f 5 -i "$WORKSPACE/inventory" -m shell \ - -a "sudo ip link set mtu $EXTERNAL_BRIDGE_MTU dev br-ex" - fi fi if [[ "$DEVSTACK_GATE_UNSTACK" -eq "1" ]]; then From a35ab289eb9f1dbc78826d6c7d7f700e4caede1a Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 28 Jul 2016 11:35:27 +1000 Subject: [PATCH 47/59] Use "arp -n" when finding gateway MAC for netconsole arp can resolve the gateway address to something unhelpful like "gateway" which fails the grep. Avoid this. Change-Id: I236b7080774fef8700d0ec056d9703eb98f90204 --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 0b254380..777b09ce 100644 --- a/functions.sh +++ b/functions.sh @@ -1060,7 +1060,7 @@ function enable_netconsole { # out to the world is specify the default gw as the remote # destination. local default_gw=$(ip route | grep default | awk '{print $3}') - local gw_mac=$(arp $default_gw | grep $default_gw | awk '{print $3}') + local gw_mac=$(arp -n $default_gw | grep $default_gw | awk '{print $3}') local gw_dev=$(ip route | grep default | awk '{print $5}') # turn up message output From 54b30a1b6a87baeb3a9bcf99624baca51fd1523b Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Sun, 31 Jul 2016 15:26:42 +0300 Subject: [PATCH 48/59] Use ntp wait time as 10 min instead of 100 By default ntp-wait waits 6 sec * 1000 tries = 100 mins It breaks long jobs like in TripleO projects because of waiting for 1 hour 40 minutes. If ntp wasn't synced during first 10 min it most likely won't be synced at all, so no reason to wait so long time and break jobs that date is not critical for them Change-Id: Iae28a03829a255f0990934685d8c2e563a7a8492 Partial-Bug: 1608226 --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 777b09ce..65f37137 100644 --- a/functions.sh +++ b/functions.sh @@ -140,7 +140,7 @@ function start_timer { # first make sure the time is right, so we don't go into crazy land # later if the system decides to apply an ntp date and we jump forward # 4 hrs (which has happened) - sudo /usr/sbin/ntp-wait -v + sudo /usr/sbin/ntp-wait -v -n 100 sleep 1 START_TIME=`date +%s` } From 59aeed26cd09f8c42b247050bd1407a0e10f591b Mon Sep 17 00:00:00 2001 From: Jay Faulkner Date: Wed, 3 Aug 2016 14:38:50 -0700 Subject: [PATCH 49/59] Explicitly set IRONIC_BUILD_DEPLOY_RAMDISK We'd like to change the default for this in our local devstack plugin, but until devstack-gate sets the desired value in all cases we can't. Change-Id: I25c2ece32b7e8b601fe5ed7f96dcfbad4798e376 Related-bug: #1607981 --- devstack-vm-gate.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 8c7f5955..3f3b9d0a 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -353,6 +353,8 @@ EOF echo "Q_ML2_TENANT_NETWORK_TYPE=vxlan" >>"$localrc_file" if [[ "$DEVSTACK_GATE_IRONIC_BUILD_RAMDISK" -eq 0 ]]; then echo "IRONIC_BUILD_DEPLOY_RAMDISK=False" >>"$localrc_file" + else + echo "IRONIC_BUILD_DEPLOY_RAMDISK=True" >>"$localrc_file" fi if [[ -z "${DEVSTACK_GATE_IRONIC_DRIVER%%agent*}" ]]; then echo "SWIFT_ENABLE_TEMPURLS=True" >>"$localrc_file" From dcd690265146e89c363acd1b070644c4eb1f82fe Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 9 Aug 2016 14:32:05 -0400 Subject: [PATCH 50/59] Add sanity check on devstack generated tempest.conf There are some parts of devstack that call the service api to verify the extension list we pass to tempest. This is fine for the out of gate case if it makes life easier for users. But, we should not ever trust this for gate testing. This commit adds a check on master to ensure we always are using the default value of 'all'. On stable we hard code a list of available extensions so this isn't a concern there. Change-Id: I01be3c1392fd4642bdd4633ba5624ddacb608bc5 --- devstack-vm-gate.sh | 10 ++++++++++ functions.sh | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index a807bdac..2491eacc 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -734,6 +734,16 @@ if [[ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]]; then exit 0 fi + # There are some parts of devstack that call the neutron api to verify the + # extension. We should not ever trust this for gate testing. This checks to + # ensure on master we always are using the default value. (on stable we hard + # code a list of available extensions so we can't use this) + neutron_extensions=$(iniget "$BASE/new/tempest/etc/tempest.conf" "neutron-feature-enabled" "api_extensions") + if [[ $GIT_BRANCH == 'master' && ($neutron_extensions == 'all' || $neutron_extensions == '') ]] ; then + echo "Devstack misconfugred tempest and changed the value of api_extensions" + exit 1 + fi + # From here until the end we rely on the fact that all the code fails if # something is wrong, to enforce exit on bad test results. set -o errexit diff --git a/functions.sh b/functions.sh index 65f37137..f61c4539 100644 --- a/functions.sh +++ b/functions.sh @@ -1198,3 +1198,8 @@ function with_timeout { function iniset { $(source $BASE/new/devstack/inc/ini-config; iniset $@) } + +# Iniget imported from devstack +function iniget { + $(source $BASE/new/devstack/inc/ini-config; iniget $@) +} From 88a41dab7a56dd96b7abb4f8fcc986d2aeb65cf0 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 12 Aug 2016 10:32:27 -0500 Subject: [PATCH 51/59] Add osc-lib and os-client-config to PROJECTS Both libraries are needed in gate jobs to be able to make sure we don't break the gate broadly. Change-Id: Idb2a766069bbea088d402cb86d7ded86e93f3096 Depends-On: I747480b6063a62e82ca2b030f274d3e87bf28b3b --- devstack-vm-gate-wrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index 35c514da..39cc7d22 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -76,10 +76,12 @@ PROJECTS="openstack/neutron-vpnaas $PROJECTS" PROJECTS="openstack/nova $PROJECTS" PROJECTS="openstack/os-apply-config $PROJECTS" PROJECTS="openstack/os-brick $PROJECTS" +PROJECTS="openstack/os-client-config $PROJECTS" PROJECTS="openstack/os-cloud-config $PROJECTS" PROJECTS="openstack/os-collect-config $PROJECTS" PROJECTS="openstack/os-net-config $PROJECTS" PROJECTS="openstack/os-refresh-config $PROJECTS" +PROJECTS="openstack/osc-lib $PROJECTS" PROJECTS="openstack/oslo.cache $PROJECTS" PROJECTS="openstack/oslo.concurrency $PROJECTS" PROJECTS="openstack/oslo.config $PROJECTS" From c6aad9ff4bae04464341faf9e81ce5a9f089c108 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 9 Sep 2016 21:30:58 -0400 Subject: [PATCH 52/59] Put the regex first This commit swaps the argument order of tempest tox jobs that use a regex to specify a subset of tests to run. This is necessary for some future changes to the tempest tox definitions that will switch it from using a testr wrapping bash script to the tempest run command instead. With tempest run you specify a regex with a '--regex' parameter and to keep backwards compatibility this is added to the tempest tox definitions. However this breaks on devstack-gate because we pass the concurrency in before the regex. This ends up having a call equivalent to: tempest run --regex --concurrency=2 $REGEX which obviously is incorrect. Simply switching the arg order should work in both cases. It's also worth pointing out that this is a temporary step as we will migrate devstack-gate to call tempest init and tempest run directly. Change-Id: I8786b9709584378aaf48393115dda94397e22544 Need-by: I3684fce66a799579fa68af119652cafef25a9f03 --- devstack-vm-gate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 2491eacc..78aa859f 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -757,11 +757,11 @@ if [[ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]]; then if [[ "$DEVSTACK_GATE_TEMPEST_REGEX" != "" ]] ; then if [[ "$DEVSTACK_GATE_TEMPEST_ALL_PLUGINS" -eq "1" ]]; then echo "Running tempest with plugins and a custom regex filter" - $TEMPEST_COMMAND -eall-plugin -- --concurrency=$TEMPEST_CONCURRENCY $DEVSTACK_GATE_TEMPEST_REGEX + $TEMPEST_COMMAND -eall-plugin -- $DEVSTACK_GATE_TEMPEST_REGEX --concurrency=$TEMPEST_CONCURRENCY sudo -H -u tempest .tox/all-plugin/bin/tempest list-plugins else echo "Running tempest with a custom regex filter" - $TEMPEST_COMMAND -eall -- --concurrency=$TEMPEST_CONCURRENCY $DEVSTACK_GATE_TEMPEST_REGEX + $TEMPEST_COMMAND -eall -- $DEVSTACK_GATE_TEMPEST_REGEX --concurrency=$TEMPEST_CONCURRENCY fi elif [[ "$DEVSTACK_GATE_TEMPEST_ALL_PLUGINS" -eq "1" ]]; then echo "Running tempest all-plugins test suite" From f9435c005a52cdc4905323d7cc5525f701766649 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Fri, 13 Jun 2014 08:14:12 +0100 Subject: [PATCH 53/59] Merge ZUUL_REF branch Change-Id: Ia8801a2aec4211681d42e8295df93188cf03879e --- functions.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/functions.sh b/functions.sh index f61c4539..f8398d1b 100644 --- a/functions.sh +++ b/functions.sh @@ -477,18 +477,21 @@ function setup_project { FALLBACK_ZUUL_REF=$(echo $ZUUL_REF | sed -e "s,$branch,master,") fi + if git_has_branch $project $branch; then + git_checkout $project $branch + else + git_checkout $project master + fi + # See if Zuul prepared a ref for this project if git_fetch_at_ref $project $OVERRIDE_ZUUL_REF || \ git_fetch_at_ref $project $FALLBACK_ZUUL_REF; then - # It's there, so check it out. - git_checkout $project FETCH_HEAD - else - if git_has_branch $project $branch; then - git_checkout $project $branch - else - git_checkout $project master - fi + git config --global user.email "openstack@citrix.com" + git config --global user.name "Citrix CI" + + # It's there, so merge it + git merge FETCH_HEAD fi } From 2806659eba5d115e8a39fcaec606a6c1eabc1fc2 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Fri, 8 Aug 2014 15:35:11 +0100 Subject: [PATCH 54/59] Update to force stack to run on saucy Change-Id: I133f004ec749dfd2c360474936b3421d146c33ab --- devstack-vm-gate.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 78aa859f..abd8b331 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -375,6 +375,9 @@ EOF exit 1 fi cat >> "$localrc_file" << EOF +# Need to force devstack to run because we currently use saucy +FORCE=yes + SKIP_EXERCISES=${SKIP_EXERCISES},volumes XENAPI_PASSWORD=${DEVSTACK_GATE_XENAPI_PASSWORD} XENAPI_CONNECTION_URL=http://${DEVSTACK_GATE_XENAPI_DOM0_IP} @@ -630,13 +633,13 @@ else echo "... this takes 10 - 15 minutes (logs in logs/devstacklog.txt.gz)" start=$(date +%s) $ANSIBLE primary -f 5 -i "$WORKSPACE/inventory" -m shell \ - -a "cd '$BASE/new/devstack' && sudo -H -u stack stdbuf -oL -eL ./stack.sh executable=/bin/bash" \ + -a "cd '$BASE/new/devstack' && sudo -H -u stack FORCE=yes stdbuf -oL -eL ./stack.sh executable=/bin/bash" \ &> "$WORKSPACE/logs/devstack-early.txt" # Run non controller setup after controller is up. This is necessary # because services like nova apparently expect to have the controller in # place before anything else. $ANSIBLE subnodes -f 5 -i "$WORKSPACE/inventory" -m shell \ - -a "cd '$BASE/new/devstack' && sudo -H -u stack stdbuf -oL -eL ./stack.sh executable=/bin/bash" \ + -a "cd '$BASE/new/devstack' && sudo -H -u stack FORCE=yes stdbuf -oL -eL ./stack.sh executable=/bin/bash" \ &> "$WORKSPACE/logs/devstack-subnodes-early.txt" end=$(date +%s) took=$((($end - $start) / 60)) From 7c5a4dc335abe9c349e846632160c5cf6f0e3b85 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 27 Aug 2014 16:39:26 +0100 Subject: [PATCH 55/59] Remove heat, trove, sahara and ceilometer from XenAPI testing Change-Id: Iea5045d5f615791bb30ec9f7273a672ff9be5ca1 --- features.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/features.yaml b/features.yaml index 66b4b650..5b391f86 100644 --- a/features.yaml +++ b/features.yaml @@ -1,12 +1,12 @@ config: default: - master: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] - ocata: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] - mitaka: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] - liberty: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] - kilo: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] - juno: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] - icehouse: [default, ceilometer, glance, horizon, nova, swift, cinder, keystone] + master: [default, glance, horizon, nova, swift, cinder, keystone] + ocata: [default, glance, horizon, nova, swift, cinder, keystone] + mitaka: [default, glance, horizon, nova, swift, cinder, keystone] + liberty: [default, glance, horizon, nova, swift, cinder, keystone] + kilo: [default, glance, horizon, nova, swift, cinder, keystone] + juno: [default, glance, horizon, nova, swift, cinder, keystone] + icehouse: [default, glance, horizon, nova, swift, cinder, keystone] # This can be used by functional jobs that only want their dependencies installed # and don't need to incur the overhead of installing all services in the process. no_services: [default] From c3900792acfac197e5b4fb595f4dbf17ce3cd14e Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Fri, 26 Feb 2016 09:16:12 +0000 Subject: [PATCH 56/59] Use sudo -H to install ansible to avoid permission failures. Change-Id: Icf3d139dfba0b6f77e5a6b6ebf796f75585268f6 Conflicts: devstack-vm-gate-wrap.sh --- devstack-vm-gate-wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index 39cc7d22..00d93453 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -456,7 +456,7 @@ sudo -H pip install virtualenv virtualenv /tmp/ansible # NOTE(emilien): workaround to avoid installing cryptography # https://github.com/ansible/ansible/issues/15665 -/tmp/ansible/bin/pip install paramiko==1.16.0 ansible==$ANSIBLE_VERSION +sudo -H /tmp/ansible/bin/pip install paramiko==1.16.0 ansible==$ANSIBLE_VERSION export ANSIBLE=/tmp/ansible/bin/ansible # Write inventory file with groupings From 01861699189b6845aad412c55d735e738e848b93 Mon Sep 17 00:00:00 2001 From: Huan Xie Date: Fri, 8 Apr 2016 03:49:06 -0700 Subject: [PATCH 57/59] Add support for xenserver neutron external CI Remove "FORCE=yes" to align with openstack-infro/devstack-gate upstream Move FLAT_NETWORK_BRIDGE item to pre_test_hook when neutron is used Set gate_hook link to our repo(under $WORKSPACE)'s devstack-vm-gate.sh --- devstack-vm-gate-wrap.sh | 2 +- devstack-vm-gate.sh | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index 00d93453..0b8a2cbe 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -436,7 +436,7 @@ fi if ! function_exists "gate_hook"; then # the command we use to run the gate function gate_hook { - $BASE/new/devstack-gate/devstack-vm-gate.sh + $WORKSPACE/devstack-gate/devstack-vm-gate.sh } export -f gate_hook fi diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index abd8b331..b0d10ceb 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -384,9 +384,6 @@ XENAPI_CONNECTION_URL=http://${DEVSTACK_GATE_XENAPI_DOM0_IP} VNCSERVER_PROXYCLIENT_ADDRESS=${DEVSTACK_GATE_XENAPI_DOM0_IP} VIRT_DRIVER=xenserver -# A separate xapi network is created with this name-label -FLAT_NETWORK_BRIDGE=vmnet - # A separate xapi network on eth4 serves the purpose of the public network. # This interface is added in Citrix's XenServer environment as an internal # interface @@ -415,6 +412,14 @@ VOLUME_BACKING_DEVICE=/dev/xvdb # Set multi-host config MULTI_HOST=1 EOF + + # neutron network will set FLAT_NETWORK_BRIDGE in pre_test_hook + if [[ $DEVSTACK_GATE_NEUTRON -ne "1" ]]; then + cat >> "$localrc_file" << EOF +# A separate xapi network is created with this name-label +FLAT_NETWORK_BRIDGE=vmnet +EOF + fi fi if [[ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]]; then @@ -633,13 +638,13 @@ else echo "... this takes 10 - 15 minutes (logs in logs/devstacklog.txt.gz)" start=$(date +%s) $ANSIBLE primary -f 5 -i "$WORKSPACE/inventory" -m shell \ - -a "cd '$BASE/new/devstack' && sudo -H -u stack FORCE=yes stdbuf -oL -eL ./stack.sh executable=/bin/bash" \ + -a "cd '$BASE/new/devstack' && sudo -H -u stack stdbuf -oL -eL ./stack.sh executable=/bin/bash" \ &> "$WORKSPACE/logs/devstack-early.txt" # Run non controller setup after controller is up. This is necessary # because services like nova apparently expect to have the controller in # place before anything else. $ANSIBLE subnodes -f 5 -i "$WORKSPACE/inventory" -m shell \ - -a "cd '$BASE/new/devstack' && sudo -H -u stack FORCE=yes stdbuf -oL -eL ./stack.sh executable=/bin/bash" \ + -a "cd '$BASE/new/devstack' && sudo -H -u stack stdbuf -oL -eL ./stack.sh executable=/bin/bash" \ &> "$WORKSPACE/logs/devstack-subnodes-early.txt" end=$(date +%s) took=$((($end - $start) / 60)) From 46dc7ca998ff0aecda630b6cdaefc90a15add52d Mon Sep 17 00:00:00 2001 From: Jianghua Wang Date: Mon, 1 Aug 2016 14:41:41 +0800 Subject: [PATCH 58/59] Skip multi-host setup for nova network setup There is a workaround which always set multi-hosts for Nova network. It creates a br_flat interface which is connected to vmnet and DHCP server listens on this interface. But XenServer has eth3 connected to vmnet. We should use eth3 as the flat interface otherwise the devstack VM has no access to the guest instances. So we shouldn't apply that workaround for XenServer. And we currently don't use multi-hosts for XenServer CI. So let's skipt it. --- devstack-vm-gate.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index b0d10ceb..98cd8dcd 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -75,15 +75,19 @@ function setup_nova_net_networking { # issue with nova net configuring br100 to take over eth0 # by default. # TODO (clarkb): figure out how to make bridge setup sane with ansible. - ovs_vxlan_bridge "br_pub" $primary_node "True" 1 \ - $FLOATING_HOST_PREFIX $FLOATING_HOST_MASK \ - $sub_nodes - ovs_vxlan_bridge "br_flat" $primary_node "False" 128 \ - $sub_nodes - cat <>"$localrc" + if [[ "$DEVSTACK_GATE_VIRT_DRIVER" != "xenapi" ]]; then + # The following work around shouldn't be applied on xenapi, as xenserver + # has vmnet connected on eth3. + ovs_vxlan_bridge "br_pub" $primary_node "True" 1 \ + $FLOATING_HOST_PREFIX $FLOATING_HOST_MASK \ + $sub_nodes + ovs_vxlan_bridge "br_flat" $primary_node "False" 128 \ + $sub_nodes + cat <>"$localrc" FLAT_INTERFACE=br_flat PUBLIC_INTERFACE=br_pub EOF + fi } function setup_multinode_connectivity { @@ -409,8 +413,8 @@ EXTRA_OPTS=("xenapi_disable_agent=True") # Add a separate device for volumes VOLUME_BACKING_DEVICE=/dev/xvdb -# Set multi-host config -MULTI_HOST=1 +# We use single host for XenAPI test +MULTI_HOST=False EOF # neutron network will set FLAT_NETWORK_BRIDGE in pre_test_hook From b035e74ae8d1c16d1763cd6c6e085cd01972182b Mon Sep 17 00:00:00 2001 From: Jianghua Wang Date: Tue, 20 Sep 2016 17:02:38 +0800 Subject: [PATCH 59/59] Reduce the target swap size to avoid disk full. --- functions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index f8398d1b..e06dda49 100644 --- a/functions.sh +++ b/functions.sh @@ -331,7 +331,9 @@ function fix_disk_layout { # Rackspace also doesn't have enough space on / for two devstack installs, # so we partition the disk and mount it on /opt, syncing the previous # contents of /opt over. - SWAPSIZE=8192 + #SWAPSIZE=8192 + #temporarily change it as 4000 to skip creating swap on /root + SWAPSIZE=4000 swapcurrent=$(( $(grep SwapTotal /proc/meminfo | awk '{ print $2; }') / 1024 )) if [[ $swapcurrent -lt $SWAPSIZE ]]; then