summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2025-01-27 12:28:06 +0200
committerGitHub <noreply@github.com>2025-01-27 12:28:06 +0200
commita50a34fe815f707f5c52ca8e61ce155f10306f47 (patch)
tree623e83b27d46c5a668d6e9bb42f4dbf738291b54
parent1c8e9d5c409ba6b0a7e63cacb8e886bada036b4b (diff)
parent1659d7b60ee1128c365c597ee85697c051c23e4b (diff)
downloadvyos-1x-a50a34fe815f707f5c52ca8e61ce155f10306f47.tar.gz
vyos-1x-a50a34fe815f707f5c52ca8e61ce155f10306f47.zip
Merge pull request #1 from vyos/sever-sever-lcp
LCP: enable by default route-no-paths
-rw-r--r--data/templates/vpp/startup.conf.j22
-rw-r--r--interface-definitions/vpp.xml.in6
-rwxr-xr-xsmoketest/scripts/cli/test_vpp.py11
-rwxr-xr-xsrc/conf_mode/vpp.py6
4 files changed, 16 insertions, 9 deletions
diff --git a/data/templates/vpp/startup.conf.j2 b/data/templates/vpp/startup.conf.j2
index c1dac7757..5cab34a97 100644
--- a/data/templates/vpp/startup.conf.j2
+++ b/data/templates/vpp/startup.conf.j2
@@ -110,7 +110,7 @@ plugins {
linux-cp {
lcp-sync
lcp-auto-subint
-{% if lcp.route_no_paths is vyos_defined %}
+{% if lcp.ignore_kernel_routes is not vyos_defined %}
route-no-paths
{% endif %}
}
diff --git a/interface-definitions/vpp.xml.in b/interface-definitions/vpp.xml.in
index aec26362c..4c25c10f7 100644
--- a/interface-definitions/vpp.xml.in
+++ b/interface-definitions/vpp.xml.in
@@ -703,9 +703,9 @@
</leafNode>
</children>
</node>
- <leafNode name="route-no-paths">
+ <leafNode name="ignore-kernel-routes">
<properties>
- <help>Route no paths</help>
+ <help>Ignore kernel routes</help>
<valueless/>
</properties>
</leafNode>
@@ -713,7 +713,7 @@
</node>
<node name="logging">
<properties>
- <help>Loggint settings</help>
+ <help>Logging settings</help>
</properties>
<children>
<leafNode name="default-log-level">
diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py
index ba0d0d728..60253593d 100755
--- a/smoketest/scripts/cli/test_vpp.py
+++ b/smoketest/scripts/cli/test_vpp.py
@@ -75,7 +75,6 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
poll_sleep = '0'
self.cli_set(base_path + ['settings', 'cpu', 'main-core', main_core])
- self.cli_set(base_path + ['settings', 'lcp', 'route-no-paths'])
self.cli_set(base_path + ['settings', 'unix', 'poll-sleep-usec', poll_sleep])
# commit changes
@@ -99,7 +98,15 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
# route-no-paths is not present in the output
# looks like vpp bug
_, out = rc_cmd('sudo vppctl show lcp')
- required_str = 'route-no-paths'
+ required_str = 'lcp route-no-paths on'
+ self.assertIn(required_str, out)
+
+ self.cli_set(base_path + ['settings', 'lcp', 'ignore-kernel-routes'])
+ self.cli_commit()
+
+ # check disabled 'route no path'
+ _, out = rc_cmd('sudo vppctl show lcp')
+ required_str = 'lcp route-no-paths off'
self.assertIn(required_str, out)
def test_02_vpp_vxlan(self):
diff --git a/src/conf_mode/vpp.py b/src/conf_mode/vpp.py
index 923ac7f31..51eda0587 100755
--- a/src/conf_mode/vpp.py
+++ b/src/conf_mode/vpp.py
@@ -514,10 +514,10 @@ def apply(config):
# immediately after the service restart
vpp_control = VPPControl(attempts=20, interval=500)
# preconfigure LCP plugin
- if 'route_no_paths' in config.get('settings', {}).get('lcp', {}):
- vpp_control.cli_cmd('lcp param route-no-paths on')
- else:
+ if 'ignore_kernel_routes' in config.get('settings', {}).get('lcp', {}):
vpp_control.cli_cmd('lcp param route-no-paths off')
+ else:
+ vpp_control.cli_cmd('lcp param route-no-paths on')
# add interfaces
iproute = IPRoute()
for iface, iface_config in config['settings']['interface'].items():