X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=mcp%2Fscripts%2Flib.sh;h=6455a65c01273d8cebe7bab5b2b2eda7d8d8bc7d;hb=refs%2Fchanges%2F53%2F69553%2F1;hp=947361e290b3c27457c66e56af4f4a9f01aadd57;hpb=c85e28ea54c73e66b264adc11c38ba638397984e;p=fuel.git diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index 947361e29..6455a65c0 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -36,17 +36,17 @@ function wait_for { } function cleanup_uefi { - # Clean up Ubuntu boot entry if cfg01, kvm nodes online from previous deploy + # Clean up Ubuntu boot entry if cfg01, baremetal nodes online from previous deploy local cmd_str="ssh ${SSH_OPTS} ${SSH_SALT}" ping -c 1 -w 1 "${SALT_MASTER}" || return 0 [ ! "$(hostname)" = 'cfg01' ] || cmd_str='eval' - # NOTE: Targeting nodes by hostname is fragile and should be refactored to - # also cover corner cases like noha scenarios on AArch64 baremetal's 'ctl01' - ${cmd_str} "sudo salt -C 'kvm* or cmp*' cmd.run \ + ${cmd_str} "sudo salt -C 'G@virtual:physical and not cfg01*' cmd.run \ \"which efibootmgr > /dev/null 2>&1 && \ efibootmgr | grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | \ xargs -I{} efibootmgr --delete-bootnum --bootnum {}; \ rm -rf /boot/efi/*\"" || true + + ${cmd_str} "sudo salt -C 'G@virtual:physical and not cfg01*' cmd.run 'shutdown now'" || true } function get_nova_compute_pillar_data {