summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/conf_mode/vpp_interfaces_bonding.py5
-rw-r--r--src/conf_mode/vpp_interfaces_geneve.py4
-rw-r--r--src/conf_mode/vpp_interfaces_gre.py4
-rw-r--r--src/conf_mode/vpp_interfaces_ipip.py4
-rw-r--r--src/conf_mode/vpp_interfaces_loopback.py4
-rw-r--r--src/conf_mode/vpp_interfaces_vxlan.py4
6 files changed, 25 insertions, 0 deletions
diff --git a/src/conf_mode/vpp_interfaces_bonding.py b/src/conf_mode/vpp_interfaces_bonding.py
index 135be5c04..9f8133cfa 100644
--- a/src/conf_mode/vpp_interfaces_bonding.py
+++ b/src/conf_mode/vpp_interfaces_bonding.py
@@ -17,6 +17,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
+import time
from vyos.config import Config
from vyos.configdict import leaf_node_changed
@@ -192,6 +193,10 @@ def apply(config):
kernel_interface = config.get('kernel_interface', '')
i = BondInterface(ifname, mode, lb, mac, kernel_interface)
+ # Introduce a delay to address instability in the VPP API, which may fail to create the LCP
+ # or establish a connection. This should be reviewed and resolved in future releases.
+ time.sleep(2)
+
i.add()
# Add members to bond
if members:
diff --git a/src/conf_mode/vpp_interfaces_geneve.py b/src/conf_mode/vpp_interfaces_geneve.py
index a7e7ae8e5..17e0f0cfb 100644
--- a/src/conf_mode/vpp_interfaces_geneve.py
+++ b/src/conf_mode/vpp_interfaces_geneve.py
@@ -17,6 +17,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
+import time
from vyos import ConfigError
@@ -164,6 +165,9 @@ def apply(config):
# Add kernel-interface (LCP) if interface is not exist
if 'kernel_interface' in config and not is_interface(kernel_interface):
+ # Introduce a delay to address instability in the VPP API, which may fail to create the LCP
+ # or establish a connection. This should be reviewed and resolved in future releases.
+ time.sleep(2)
i.kernel_add()
call_dependents()
diff --git a/src/conf_mode/vpp_interfaces_gre.py b/src/conf_mode/vpp_interfaces_gre.py
index f86d59087..feff0d6b5 100644
--- a/src/conf_mode/vpp_interfaces_gre.py
+++ b/src/conf_mode/vpp_interfaces_gre.py
@@ -17,6 +17,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
+import time
from vyos import ConfigError
@@ -163,6 +164,9 @@ def apply(config):
# Add kernel-interface (LCP) if interface is not exist
if 'kernel_interface' in config and not is_interface(kernel_interface):
+ # Introduce a delay to address instability in the VPP API, which may fail to create the LCP
+ # or establish a connection. This should be reviewed and resolved in future releases.
+ time.sleep(2)
i.kernel_add()
call_dependents()
diff --git a/src/conf_mode/vpp_interfaces_ipip.py b/src/conf_mode/vpp_interfaces_ipip.py
index 6de34e794..e15eaf5e5 100644
--- a/src/conf_mode/vpp_interfaces_ipip.py
+++ b/src/conf_mode/vpp_interfaces_ipip.py
@@ -17,6 +17,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
+import time
from vyos import ConfigError
@@ -162,6 +163,9 @@ def apply(config):
i.add()
if 'kernel_interface' in config:
+ # Introduce a delay to address instability in the VPP API, which may fail to create the LCP
+ # or establish a connection. This should be reviewed and resolved in future releases.
+ time.sleep(2)
i.kernel_add()
call_dependents()
diff --git a/src/conf_mode/vpp_interfaces_loopback.py b/src/conf_mode/vpp_interfaces_loopback.py
index 56a825ae6..a96c379a1 100644
--- a/src/conf_mode/vpp_interfaces_loopback.py
+++ b/src/conf_mode/vpp_interfaces_loopback.py
@@ -17,6 +17,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
+import time
from vyos import ConfigError
@@ -134,6 +135,9 @@ def apply(config):
# Add kernel-interface (LCP) if interface is not exist
if 'kernel_interface' in config and not is_interface(kernel_interface):
+ # Introduce a delay to address instability in the VPP API, which may fail to create the LCP
+ # or establish a connection. This should be reviewed and resolved in future releases.
+ time.sleep(2)
i.kernel_add()
call_dependents()
diff --git a/src/conf_mode/vpp_interfaces_vxlan.py b/src/conf_mode/vpp_interfaces_vxlan.py
index a8a918805..de3114124 100644
--- a/src/conf_mode/vpp_interfaces_vxlan.py
+++ b/src/conf_mode/vpp_interfaces_vxlan.py
@@ -17,6 +17,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
+import time
from vyos import ConfigError
@@ -169,6 +170,9 @@ def apply(config):
# Add kernel-interface (LCP) if interface is not exist
if 'kernel_interface' in config and not is_interface(kernel_interface):
+ # Introduce a delay to address instability in the VPP API, which may fail to create the LCP
+ # or establish a connection. This should be reviewed and resolved in future releases.
+ time.sleep(2)
i.kernel_add()
call_dependents()