diff options
Diffstat (limited to 'mcp/scripts')
-rw-r--r-- | mcp/scripts/lib.sh | 12 | ||||
m--------- | mcp/scripts/pharos | 0 | ||||
-rwxr-xr-x | mcp/scripts/salt.sh | 2 |
3 files changed, 7 insertions, 7 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 diff --git a/mcp/scripts/pharos b/mcp/scripts/pharos -Subproject cf19f9ee69eacc1189cbeb746b30e3a09eaeac9 +Subproject 89d7cb905bf6f286648638f5865884ac5e332e5 diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh index 25eb0ede8..d687e3efa 100755 --- a/mcp/scripts/salt.sh +++ b/mcp/scripts/salt.sh @@ -97,7 +97,7 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END salt -C "${NODE_MASK} or cfg01*" state.apply salt | \ grep -Fq 'No response' && salt -C "${NODE_MASK} or cfg01*" state.apply salt - salt -C 'I@salt:master' state.sls linux + salt-call state.sls linux || salt-call state.sls linux salt -C "${NODE_MASK} and not cfg01*" state.sls linux || true salt -C "${NODE_MASK} and not cfg01*" pkg.upgrade refresh=False |