From 267bd35d4b7656a7eb0236fa04acbbaba76f5da3 Mon Sep 17 00:00:00 2001
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Sun, 13 Jan 2019 18:49:07 +0100
Subject: [baremetal] Shutdown nodes from previous deploy

When noha scenarios are scheduled on the same CI POD currently
running a previously deployed HA scenario, one baremetal node
might remain unused (kvm03), connect to the new Salt master and
interfere with the deployment.

To prevent that, shutdown all baremetal nodes at the begining of the
deployment.

Change-Id: Ia9bad8b5d8348433cefac9aa76eca0de664f187d
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 mcp/scripts/lib.sh | 1 +
 1 file changed, 1 insertion(+)

(limited to 'mcp/scripts')

diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 947361e29..79767f0fa 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -47,6 +47,7 @@ function cleanup_uefi {
     efibootmgr | grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | \
     xargs -I{} efibootmgr --delete-bootnum --bootnum {}; \
     rm -rf /boot/efi/*\"" || true
+  ${cmd_str} "sudo salt -C 'kvm* or cmp*' cmd.run 'shutdown now'" || true
 }
 
 function get_nova_compute_pillar_data {
-- 
cgit