From 74ea2bdf5a3058fc0039559c71814d830d3cbe5a Mon Sep 17 00:00:00 2001
From: Julia Kreger <juliaashleykreger@gmail.com>
Date: Thu, 29 Nov 2018 09:44:34 -0800
Subject: [PATCH] Slim down grenade jobs

As we can't extend our grenade job timeout past 3 hours,
and we have some fairly log running jobs, that essentially
means we need to find time that is not absolutely necessary
in the entire test run in order to reduce load.

Disabling cleaning for the grenade tests as well as
setting a regex for the basic server ops as opposed to
basic network ops which can take as much as 3x the amount
of time that the basic test takes.

Change-Id: Ib795e6dc3ad1f484f79bee81a5bcfdb8c3434fa1
---
 .../grenade-dsvm-ironic-multinode-multitenant/run.yaml    | 5 ++---
 playbooks/legacy/grenade-dsvm-ironic/run.yaml             | 8 +++++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml b/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml
index aefb72b615..4e1e1683d9 100644
--- a/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml
+++ b/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml
@@ -54,7 +54,7 @@
           cat << 'EOF' >> ironic-extra-vars
             export PROJECTS="openstack-dev/grenade $PROJECTS"
             export DEVSTACK_GATE_GRENADE=pullup
-            export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
+            export DEVSTACK_GATE_OS_TEST_TIMEOUT=2600
             export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1200
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_BUILD_DEPLOY_RAMDISK=False"
             export DEVSTACK_GATE_TLSPROXY=0
@@ -64,7 +64,6 @@
 
             export DEVSTACK_GATE_TOPOLOGY="multinode"
 
-            export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
             # networking-generic-switch requires sudo to execute ovs-vsctl commands
             export DEVSTACK_GATE_REMOVE_STACK_SUDO=0
             export PROJECTS="openstack/networking-generic-switch $PROJECTS"
@@ -83,9 +82,9 @@
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_NETWORK_INTERFACES=flat,neutron"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_NETWORK_INTERFACE=neutron"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_AUTOMATED_CLEAN_ENABLED=False"
-
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=384"
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=tinyipa"
+            export DEVSTACK_GATE_TEMPEST_REGEX=test_server_basic_ops
 
           EOF
         chdir: '{{ ansible_user_dir }}/workspace'
diff --git a/playbooks/legacy/grenade-dsvm-ironic/run.yaml b/playbooks/legacy/grenade-dsvm-ironic/run.yaml
index 1eef354b84..6f802bcd23 100644
--- a/playbooks/legacy/grenade-dsvm-ironic/run.yaml
+++ b/playbooks/legacy/grenade-dsvm-ironic/run.yaml
@@ -32,7 +32,7 @@
           cat << 'EOF' >> ironic-extra-vars
             export PROJECTS="openstack-dev/grenade $PROJECTS"
             export DEVSTACK_GATE_GRENADE=pullup
-            export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
+            export DEVSTACK_GATE_OS_TEST_TIMEOUT=2600
             export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1200
             export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_BUILD_DEPLOY_RAMDISK=False"
             export DEVSTACK_GATE_TLSPROXY=0
@@ -89,6 +89,12 @@
           export DEVSTACK_GATE_IRONIC_BUILD_RAMDISK=0
           export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_INSPECTOR_BUILD_RAMDISK=False"
 
+          # NOTE(TheJulia): Keep the runtime down by disabling cleaning
+          # the nodes and focus on the server related tests as opposed
+          # to network scenario testing
+          export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_AUTOMATED_CLEAN_ENABLED=False"
+          export DEVSTACK_GATE_TEMPEST_REGEX=test_server_basic_ops
+
           export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_COUNT=7"
 
           # Ensure the ironic-vars-EARLY file exists