[baremetal] Shutdown nodes from previous deploy 51/66351/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sun, 13 Jan 2019 17:49:07 +0000 (18:49 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sun, 13 Jan 2019 17:49:07 +0000 (18:49 +0100)
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

index 947361e..79767f0 100644 (file)
@@ -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 {