From 93248721ead6d0b943ebbc920917d6b7a64f3d58 Mon Sep 17 00:00:00 2001
From: Kevin Benton <kevin@benton.pub>
Date: Fri, 6 May 2016 16:56:26 -0700
Subject: [PATCH] Use neutron-vpnaas grenade plugin in grenade jobs

Now that neutron-vpnaas is a plugin, it needs an explicit
grenade plugin to shutdown the agent for the upgrade. The
devstack neutron code used to handle this but it was removed
in Ie5fc0d2a45c1b564f98c69ec9ea6fbdeeb465d32.

Change-Id: Iaaf02b51dff631758dd908b605f21ff1663fd858
Closes-Bug: #1579235
---
 jenkins/jobs/heat.yaml   | 3 ++-
 jenkins/jobs/sahara.yaml | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/jenkins/jobs/heat.yaml b/jenkins/jobs/heat.yaml
index 42ad957305..f602d7f288 100644
--- a/jenkins/jobs/heat.yaml
+++ b/jenkins/jobs/heat.yaml
@@ -242,6 +242,7 @@
 
           export DEVSTACK_LOCAL_CONFIG="enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer"
 
+          export GRENADE_PLUGINRC="enable_grenade_plugin heat https://git.openstack.org/openstack/heat"
           # n-obj has been removed from mitaka
           if [[ "stable/kilo stable/liberty" =~ $ZUUL_BRANCH ]]; then
               OVERRIDE_ENABLED_SERVICES+=,n-obj
@@ -251,6 +252,7 @@
               OVERRIDE_ENABLED_SERVICES+=,q-vpn
           else
               export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas"
+              export GRENADE_PLUGINRC+=$'\n'"enable_grenade_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas"
           fi
           export OVERRIDE_ENABLED_SERVICES
 
@@ -261,7 +263,6 @@
           if [ "$BRANCH_OVERRIDE" != "default" ] ; then
               export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
           fi
-          export GRENADE_PLUGINRC="enable_grenade_plugin heat https://git.openstack.org/openstack/heat"
 
           function pre_test_hook {{
               cd /opt/stack/new/heat/heat_upgradetests
diff --git a/jenkins/jobs/sahara.yaml b/jenkins/jobs/sahara.yaml
index 9368a28684..76a64f6e23 100644
--- a/jenkins/jobs/sahara.yaml
+++ b/jenkins/jobs/sahara.yaml
@@ -225,11 +225,14 @@
           if [[ "stable/kilo stable/liberty" =~ $ZUUL_BRANCH ]]; then
               OVERRIDE_ENABLED_SERVICES+=,n-obj,
           fi
+          export GRENADE_PLUGINRC="enable_grenade_plugin sahara https://git.openstack.org/openstack/sahara"
+          export GRENADE_PLUGINRC+=$'\n'"enable_grenade_plugin heat https://git.openstack.org/openstack/heat"
           # in liberty, vpnaas switched to a new service name
           if [[ $ZUUL_BRANCH == "stable/kilo" ]]; then
               OVERRIDE_ENABLED_SERVICES+=,q-vpn,
           else
               export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas"
+              export GRENADE_PLUGINRC+=$'\n'"enable_grenade_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas"
           fi
           export OVERRIDE_ENABLED_SERVICES
           export DEVSTACK_GATE_NEUTRON=1
@@ -239,8 +242,6 @@
           if [ "$BRANCH_OVERRIDE" != "default" ] ; then
               export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
           fi
-          export GRENADE_PLUGINRC="enable_grenade_plugin sahara https://git.openstack.org/openstack/sahara"
-          export GRENADE_PLUGINRC+=$'\n'"enable_grenade_plugin heat https://git.openstack.org/openstack/heat"
 
           cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
           ./safe-devstack-vm-gate-wrap.sh