Add wait for network delay

 * drop copypaste of function_override for VMs

Related-Prod: PRODX-00000
Change-Id: Ic5685926ae8dd783d66e3166d75becb191dbe56d
diff --git a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml
index 5995560..442a71b 100644
--- a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml
+++ b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml
@@ -64,4 +64,7 @@
     EOF
 
         netplan --debug apply
+
+        # NOTE(vsaienko): give some time to apply changes
+        sleep 15
     }
diff --git a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml
index 52ba765..30cdb5e 100644
--- a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml
+++ b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml
@@ -64,4 +64,7 @@
     EOF
 
         netplan --debug apply
+
+        # NOTE(vsaienko): give some time to apply changes
+        sleep 15
     }
diff --git a/de/heat-templates/env/compute.yaml b/de/heat-templates/env/compute.yaml
index 9045822..f3008e1 100644
--- a/de/heat-templates/env/compute.yaml
+++ b/de/heat-templates/env/compute.yaml
@@ -20,41 +20,3 @@
   worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","role":"ceph-osd-node"}}
   cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
   gtw_metadata: {"labels": {"openvswitch":"enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/converged.yaml b/de/heat-templates/env/converged.yaml
index 4c0a0f3..fa9298c 100644
--- a/de/heat-templates/env/converged.yaml
+++ b/de/heat-templates/env/converged.yaml
@@ -20,41 +20,3 @@
   worker_metadata: {"labels": {"openstack-control-plane":"enabled","openstack-compute-node":"enabled","openvswitch":"enabled","role":"ceph-osd-node"}}
   cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
   gtw_metadata: {"labels": {"openvswitch":"enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0.yaml
index 95b9dbc..80690c6 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0.yaml
@@ -20,41 +20,3 @@
   worker_metadata: {"labels": {"openstack-control-plane":"enabled","openstack-compute-node":"enabled","openvswitch":"enabled","role":"ceph-osd-node"}}
   cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
   gtw_metadata: {"labels": {"openvswitch":"enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0.yaml
index 7c33200..542a5cd 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0.yaml
@@ -20,41 +20,3 @@
   worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","role":"ceph-osd-node"}}
   cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
   gtw_metadata: {"labels": {"openvswitch":"enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp3-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp3-gtw0.yaml
index 279eb12..8952627 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp3-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp3-gtw0.yaml
@@ -20,41 +20,3 @@
   worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","role":"ceph-osd-node"}}
   cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
   gtw_metadata: {"labels": {"openvswitch":"enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/mstr1-wrkr5-cmp0-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr5-cmp0-gtw0.yaml
index bb355e8..44ac2b2 100644
--- a/de/heat-templates/env/mstr1-wrkr5-cmp0-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr5-cmp0-gtw0.yaml
@@ -20,41 +20,3 @@
   worker_metadata: {"labels": {"openstack-control-plane":"enabled","openstack-compute-node":"enabled","openvswitch":"enabled","role":"ceph-osd-node"}}
   cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
   gtw_metadata: {"labels": {"openvswitch":"enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/mstr1-wrkr5-cmp2-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr5-cmp2-gtw0.yaml
index 7c33200..542a5cd 100644
--- a/de/heat-templates/env/mstr1-wrkr5-cmp2-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr5-cmp2-gtw0.yaml
@@ -20,41 +20,3 @@
   worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","role":"ceph-osd-node"}}
   cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
   gtw_metadata: {"labels": {"openvswitch":"enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml
index 8db09f5..bde261d 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml
@@ -29,41 +29,3 @@
   gtw_metadata: {"labels": {"openvswitch":"enabled", "gateway": "enabled"}}
   lma_metadata: {"labels": {"role": "stacklight", "stacklight": "enabled"}}
   osd_metadata: {"labels": {"role": "ceph-osd-node"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml
index 93e3b9e..8e5f64b 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml
@@ -21,41 +21,3 @@
   cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
   gtw_metadata: {"labels": {"openvswitch":"enabled", "gateway": "enabled"}}
   lma_metadata: {"labels": {"role": "stacklight", "stacklight": "enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-lma3-osd3-ntw3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-lma3-osd3-ntw3.yaml
index cd6e9d9..dbb0b53 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-lma3-osd3-ntw3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-lma3-osd3-ntw3.yaml
@@ -29,41 +29,3 @@
   lma_metadata: {"labels": {"role": "stacklight", "stacklight": "enabled"}}
   osd_metadata: {"labels": {"role": "ceph-osd-node"}}
   ntw_metadata: {"labels": {"tfanalytics": "enabled", "tfconfig": "enabled", "tfcontrol": "enabled", "tfwebui": "enabled", "tfconfigdb": "enabled", "tfanalyticsdb": "enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils atop
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/env/telco.yaml b/de/heat-templates/env/telco.yaml
index 40976e0..50c16c5 100644
--- a/de/heat-templates/env/telco.yaml
+++ b/de/heat-templates/env/telco.yaml
@@ -20,41 +20,3 @@
   worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","role":"ceph-osd-node"}}
   cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
   gtw_metadata: {"labels": {"openvswitch":"enabled", "gateway": "enabled"}}
-  functions_override: |
-    function network_config {
-        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
-        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
-
-        local public_interface=${1:-${PUBLIC_INTERFACE}}
-        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
-        local match_ip_line
-
-        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
-
-    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
-    [NetDev]
-    Name=veth-phy
-    Kind=veth
-    [Peer]
-    Name=veth-br
-    EOF
-
-        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
-        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
-
-        match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
-
-        sed -i "$((${match_ip_line}-1)),$((${match_ip_line}))d" ${cloud_netplan_cfg}
-
-    cat << EOF >> ${cloud_netplan_cfg}
-        bridges:
-            br-public:
-                dhcp4: false
-                interfaces:
-                - ${PUBLIC_INTERFACE}
-                - veth-br
-                addresses:
-                - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
-    EOF
-        netplan --debug apply
-    }
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index 1e12aee..2cb03d9 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -137,7 +137,7 @@
         --existing-config
     }
 
-    retry 3 "Can't bring up docker UCP container" docker_run_retry
+    retry 10 "Can't bring up docker UCP container" docker_run_retry
 }
 
 function download_bundles {
@@ -158,8 +158,8 @@
         fi
     }
 
-    retry 4 "Can't get AUTHTOKEN from master." get_authtoken_retry
-    retry 3 "Can't download bundle file from master." download_bundles_retry
+    retry 10 "Can't get AUTHTOKEN from master." get_authtoken_retry
+    retry 10 "Can't download bundle file from master." download_bundles_retry
 
     pushd $tmpd
     # Unzip the bundle.
@@ -223,9 +223,13 @@
 }
 
 function network_config {
+    PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
+    PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
+
     local public_interface=${1:-${PUBLIC_INTERFACE}}
     local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
     local match_ip_line
+
     DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
 
 cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
@@ -235,6 +239,7 @@
 [Peer]
 Name=veth-br
 EOF
+
     sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
     sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
 
@@ -253,6 +258,9 @@
             - ${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}
 EOF
     netplan --debug apply
+
+    # NOTE(vsaienko): give some time to apply changes
+    sleep 15
 }
 
 $functions_override
diff --git a/de/heat-templates/top.yaml b/de/heat-templates/top.yaml
index 53fe0ba..f00651e 100644
--- a/de/heat-templates/top.yaml
+++ b/de/heat-templates/top.yaml
@@ -106,6 +106,7 @@
     default: 'system.compact.openstack.control'
   functions_override:
     type: string
+    default: ''
   docker_ee_url:
     type: string
     default: 'https://s3-us-west-2.amazonaws.com/internal-docker-ee-builds/docker-ee-linux'