summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/scripts/lib.sh')
-rw-r--r--mcp/scripts/lib.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 3dee9c51f..982cc37fd 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -151,8 +151,9 @@ function cleanup_mounts {
function cleanup_uefi {
# Clean up Ubuntu boot entry if cfg01, kvm nodes online from previous deploy
- # shellcheck disable=SC2086
- ssh ${SSH_OPTS} "${SSH_SALT}" "sudo salt -C 'kvm* or cmp*' cmd.run \
+ local cmd_str="ssh ${SSH_OPTS} ${SSH_SALT}"
+ [ ! "$(hostname)" = 'cfg01' ] || cmd_str='eval'
+ ${cmd_str} "sudo salt -C 'kvm* or cmp*' cmd.run \
\"which efibootmgr > /dev/null 2>&1 && \
efibootmgr | grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | \
xargs -I{} efibootmgr --delete-bootnum --bootnum {}; \
@@ -220,8 +221,7 @@ function create_networks {
# create required networks, including constant "mcpcontrol"
# FIXME(alav): since we renamed "pxe" to "mcpcontrol", we need to make sure
# we delete the old "pxe" virtual network, or it would cause IP conflicts.
- # FIXME(alav): The same applies for "fuel1" virsh network.
- for net in "fuel1" "pxe" "mcpcontrol" "${vnode_networks[@]}"; do
+ for net in "pxe" "mcpcontrol" "${vnode_networks[@]}"; do
if virsh net-info "${net}" >/dev/null 2>&1; then
virsh net-destroy "${net}" || true
virsh net-undefine "${net}"
@@ -255,8 +255,8 @@ function create_vms {
# prepare network args
net_args=" --network network=mcpcontrol,model=virtio"
- if [ "${vnode_data[0]}" = "mas01" ]; then
- # MaaS node's 3rd interface gets connected to PXE/Admin Bridge
+ if [ "${DEPLOY_TYPE:-}" = 'baremetal' ]; then
+ # 3rd interface gets connected to PXE/Admin Bridge (cfg01, mas01)
vnode_networks[2]="${vnode_networks[0]}"
fi
for net in "${vnode_networks[@]:1}"; do