Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LCP: enable by default route-no-paths #1

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/templates/vpp/startup.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
}
Expand Down
6 changes: 3 additions & 3 deletions interface-definitions/vpp.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -643,17 +643,17 @@
</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>
</children>
</node>
<node name="logging">
<properties>
<help>Loggint settings</help>
<help>Logging settings</help>
</properties>
<children>
<leafNode name="default-log-level">
Expand Down
13 changes: 10 additions & 3 deletions smoketest/scripts/cli/test_vpp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
# Copyright (C) 2023-2024 VyOS Inc.
# Copyright (C) 2023-2025 VyOS Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -75,7 +75,6 @@ def test_01_vpp_basic(self):
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
Expand All @@ -99,7 +98,15 @@ def test_01_vpp_basic(self):
# 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):
Expand Down
6 changes: 3 additions & 3 deletions src/conf_mode/vpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,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():
Expand Down
Loading