Kathara icon indicating copy to clipboard operation
Kathara copied to clipboard

SDN labs not working on macOS with Docker Desktop. openvswitch module not found

Open michele-segata opened this issue 4 months ago • 4 comments

Operating System

macOS Sonoma 14.6.1

Kathará Version

3.7.6

Bug Description

The SDN labs do not work because OpenVSwitch kernel modules are not found. In particular, this is the log found in the switch terminal:

++ ip addr add 20.0.1.1/24 dev eth2
++ /usr/share/openvswitch/scripts/ovs-ctl --system-id=random start
nice: cannot set niceness: Permission denied
Starting ovsdb-server.
Configuring Open vSwitch system IDs.
modprobe: FATAL: Module openvswitch not found in directory /lib/modules/6.10.4-linuxkit
Inserting openvswitch module ... failed!
rmmod: ERROR: ../libkmod/libkmod-module.c:1998 kmod_module_get_holders() could not open '/sys/module/bridge/holders': No such file or directory
rmmod: ERROR: Module unloading is not supported
removing bridge module ... failed!
++ ovs-vsctl add-br s1
--- End Startup Commands Log
!!! Executing other commands in background !!!
root@s1:/# 

This seems to be related with docker desktop. Starting from a certain version it seems like the openvswitch module is built in (I saw it here). Indeed, by listing modules, openvswitch can be found

find /lib/modules | grep openvswitch
/lib/modules/6.1.0-26-rt-arm64/kernel/net/openvswitch
/lib/modules/6.1.0-26-rt-arm64/kernel/net/openvswitch/openvswitch.ko
/lib/modules/6.1.0-26-rt-arm64/kernel/net/openvswitch/vport-gre.ko
/lib/modules/6.1.0-26-rt-arm64/kernel/net/openvswitch/vport-vxlan.ko
/lib/modules/6.1.0-26-rt-arm64/kernel/net/openvswitch/vport-geneve.ko

but it cannot be loaded, because it is being searched in the wrong directory

modprobe openvswitch
modprobe: FATAL: Module openvswitch not found in directory /lib/modules/6.10.4-linuxkit

Steps To Reproduce

Simply run one of the emulations, for example:

cd Kathara-Labs/main-labs/sdn-openflow/pox/01-pox-controller
kathara lstart

Expected Behavior

The switch should simply load the kernel module and run.

Check Command Output

No response

michele-segata avatar Oct 11 '24 15:10 michele-segata