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

Inserting openvswitch module failed #29

Open
sajith opened this issue Sep 18, 2024 · 3 comments
Open

Inserting openvswitch module failed #29

sajith opened this issue Sep 18, 2024 · 3 comments
Assignees

Comments

@sajith
Copy link
Member

sajith commented Sep 18, 2024

This perhaps is a question to @italovalcy rather than an issue.

I am following https://sdx-docs.readthedocs.io/en/latest/sdx_deploy_single_server.html. I did a docker compose up. Now curl -s http://0.0.0.0:8181/api/kytos/topology/v3/switches etc gets a response of {"switches":{}}.

This might be the problem:

$ docker logs mininet
modprobe: ERROR: could not insert 'openvswitch': Operation not permitted
Inserting openvswitch module ... failed!
rmmod: ERROR: ../libkmod/libkmod-module.c:856 kmod_module_remove_module() could not remove 'bridge': Operation not permitted
rmmod: ERROR: could not remove module bridge: Operation not permitted
removing bridge module ... failed!
/etc/openvswitch/conf.db does not exist ... (warning).
Creating empty database /etc/openvswitch/conf.db.
nice: cannot set niceness: Permission denied
Starting ovsdb-server.
Configuring Open vSwitch system IDs.
modprobe: ERROR: could not insert 'openvswitch': Operation not permitted
Inserting openvswitch module ... failed!
rmmod: ERROR: ../libkmod/libkmod-module.c:856 kmod_module_remove_module() could not remove 'bridge': Operation not permitted
rmmod: ERROR: could not remove module bridge: Operation not permitted
removing bridge module ... failed!

I am running this on Debian 12.7, on x86_64 hardware. I have not made any changes to the compose spec. What could be the problem?

@sajith
Copy link
Member Author

sajith commented Sep 18, 2024

Ok, I finally understood what is going on. I was running Docker in rootless mode, and that seems to affect mininet container's ability to load kernel modules.

https://docs.docker.com/engine/security/rootless/

I switched to Docker "rootful" mode, and that seems to solve the problem.

$ docker logs mininet 
Inserting openvswitch module.
/etc/openvswitch/conf.db does not exist ... (warning).
Creating empty database /etc/openvswitch/conf.db.
Starting ovsdb-server.
Configuring Open vSwitch system IDs.
Starting ovs-vswitchd.
Enabling remote OVSDB managers.

Now the new problem is that kytos-sdx containers keep restarting.

$ docker logs amlight
Starting enhanced syslogd: rsyslogdrsyslog startup failure, child did not respond within startup timeout (60 seconds)
 already started.
/etc/openvswitch/conf.db does not exist ... (warning).
Creating empty database /etc/openvswitch/conf.db.
Starting ovsdb-server.
Configuring Open vSwitch system IDs.
Starting ovs-vswitchd.
Enabling remote OVSDB managers.
Starting Kytos controller in a tmux session: done
tail: cannot open '/var/log/syslog' for reading: No such file or directory
tail: no files remaining

The container keeps restarting, and the above log messages keep repeating.

@sajith
Copy link
Member Author

sajith commented Sep 18, 2024

These lines are troublesome:

https://github.com/atlanticwave-sdx/sdx-continuous-development/blob/8b3d43fbdda9d938bd471e9c7216dce28829ad17/data-plane/docker-compose.yml#L29

https://github.com/atlanticwave-sdx/sdx-continuous-development/blob/8b3d43fbdda9d938bd471e9c7216dce28829ad17/data-plane/docker-compose.yml#L57

https://github.com/atlanticwave-sdx/sdx-continuous-development/blob/8b3d43fbdda9d938bd471e9c7216dce28829ad17/data-plane/docker-compose.yml#L85

Upon commenting them out, I was able to get things running with docker compose restart. I could also get a response out of http://0.0.0.0:{port}/api/kytos/topology/v3/switches. I also had to do docker restart tenet once, because it errored out the first time.

@sajith sajith assigned sajith and unassigned italovalcy Sep 18, 2024
@sajith
Copy link
Member Author

sajith commented Sep 18, 2024

The trouble with rsyslogd seems to be a real one; I don't know who should handle that.

The trouble with kernel module is one of my own making. I could add these to a troubleshooting section in https://sdx-docs.readthedocs.io/en/latest/sdx_deploy_single_server.html. Assigning this issue to myself for now.

@sajith sajith transferred this issue from atlanticwave-sdx/sdx-continuous-development Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants