Remove tunnel interface by yq
- cloud netplan config has a different syntax and order
set-name is not the last key in the interface
- waiting for cloud-init restart to prevent
sending wait condition status failure
Related-Prod: PRODX-3456
Change-Id: If9f068496c2877e26062ca1615bf98c5df594432
diff --git a/de/heat-templates/scripts/functions.sh b/de/heat-templates/scripts/functions.sh
index b106bd9..8ae0c0b 100644
--- a/de/heat-templates/scripts/functions.sh
+++ b/de/heat-templates/scripts/functions.sh
@@ -787,7 +787,7 @@
# Remove Tunnel interface from netplan
if [[ $TUNNEL_INTERFACE_NETPLAN_MANAGE == false ]]; then
- sed -i "/ ${TUNNEL_INTERFACE}/,/ set-name: ${TUNNEL_INTERFACE}/d" ${cloud_netplan_cfg}
+yq d -i ${cloud_netplan_cfg} network.ethernets.${TUNNEL_INTERFACE}
fi
if [[ -n ${IRONIC_BAREMETAL_INTERFACE} ]]; then
@@ -928,7 +928,11 @@
if [[ "${apply_grub}" == true ]]; then
update-grub
- cloud-init clean -r
+ cloud-init clean --reboot
+ # waiting for reboot to prevent sending wait condition status failure
+ sleep 600
+ echo "Failed to reboot node"
+ /bin/false
else
echo "GRUB already configured with huge pages"
fi