Skip to content

Commit

Permalink
topotests: avoid console errors if no mpls
Browse files Browse the repository at this point in the history
On some environments, when running topotests, we get:
modprobe: FATAL: Module mpls-router not found in directory /lib/modules/6.5.0-1017-azure
...
/usr/bin/nsenter --mount=/proc/27565/ns/mnt --net=/proc/27565/ns/net --uts=/proc/27565/ns/uts -F /bin/bash -c echo 100000 > /proc/sys/net/mpls/platform_labels
/proc/sys/net/mpls/platform_labels: No such file or directory

Signed-off-by: Vincent Jardin <vjardin@free.fr>
  • Loading branch information
vjardin committed Apr 14, 2024
1 parent 33331ab commit 0e98110
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/topotests/lib/topotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,8 @@ def startRouter(self, tgen=None):

# Really want to use sysctl_atleast here, but only when MPLS is actually being
# used
self.cmd("echo 100000 > /proc/sys/net/mpls/platform_labels")
if self.hasmpls:
self.cmd("echo 100000 > /proc/sys/net/mpls/platform_labels")

if g_pytest_config.name_in_option_list(self.name, "--shell"):
self.run_in_window(os.getenv("SHELL", "bash"), title="sh-%s" % self.name)
Expand Down

0 comments on commit 0e98110

Please sign in to comment.