-
Notifications
You must be signed in to change notification settings - Fork 370
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
OVS module loading failure for RHEL and CentOS Nodes #51
Comments
Could you provide the error logs in "Actual behavior" if you have access to them? |
Updated the description, but I did not remember the exact error. I am still setting up my CentOS env, and will try once it is ready. |
@jianjuns sorry for reviving this old issue, but I have seen some issues caused by mounting Is there any chance you could share the error message that led to the decision of mounting [centos@ip-172-30-0-73 ~]$ cat /etc/centos-release
CentOS Linux release 7.7.1908 (Core)
[centos@ip-172-30-0-73 ~]$ docker run --cap-add SYS_MODULE -v /lib/modules:/lib/modules -ti antrea/antrea-ubuntu:v0.12.0 modprobe openvswitch
[centos@ip-172-30-0-73 ~]$ |
Unfortunately I lost my env for testing this. Could you try with the old Antrea image (like 0.1.0) in case it is no more an issue with Ubuntu 18.04? |
So I confirmed that there is an issue with v0.1.0 (or more precisely with Ubuntu 18.04, before we switched our base image to Ubuntu 20.04): [centos@ip-172-30-0-114 ~]$ docker run -ti --cap-add SYS_MODULE -v /lib/modules:/lib/modules -ti antrea/antrea-ubuntu:v0.1.0 modprobe -v openvswitch
insmod /lib/modules/3.10.0-1062.12.1.el7.x86_64/kernel/net/ipv6/netfilter/nf_defrag_ipv6.ko.xz
modprobe: ERROR: could not insert 'openvswitch': Exec format error It's a bit misleading to mount The issue was because the $ docker run antrea/antrea-ubuntu:v0.1.0 kmod -V
kmod version 24
-XZ -ZLIB -EXPERIMENTAL
$ docker run antrea/antrea-ubuntu:v0.12.0 kmod -V
kmod version 27
+XZ -ZLIB +LIBCRYPTO -EXPERIMENTAL There is no magic solution, here:
I can think of the following solutions:
[centos@ip-172-30-0-114 ~]$ docker run -ti --cap-add SYS_MODULE -v /:/host/root:ro -ti antrea/antrea-ubuntu:v0.1.0 bash
root@94cb91445427:/# chroot /host/root
sh-4.2# modprobe openvswitch
sh-4.2# exit
root@94cb91445427:/#
My only concern with 1) - my preferred solution - is the possible conflict with some security policies. It works great in my environment, but could it create issues in K8s distributions? What do you think @jianjuns and @tnqn? |
Thanks for figuring this out! Yes, I am also thinking about any security violation to mount the whole FS. How about let us go with your option #2 for now, until we see new issues? |
I also feel option 2 is less risky if it can solve all current issues. |
Describe the bug
modprobe of initContainer will fail on RHEL or CentOS Nodes.
To Reproduce
Deploy Antrea on RHEL or CentOS Nodes, and initContainer will fail.
Expected
Loading OVS module by initContainer for RHEL and CentOS Nodes.
Actual behavior
modprobe in the initContainer returns an error about binary execution.
Versions:
Please provide the following information:
The text was updated successfully, but these errors were encountered: