-
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
Some deployed cni plugins are not statically compiled #2095
Comments
Hi @nitrotm, thanks for the report! Making antrea cni binary statically compiled makes sense to me. It applies to other binaries that will run out of container too, e.g. antctl, antrea-octant-plugin. @nitrotm would you be willing to create a PR for this? |
And to confirm, I assume the issue could cause the container runtime fail to call antrea cni, but it shouldn't fail on initContainer of antrea-agent while installing cni. Could you paste the failure of initContainer if there is? I couldn't reproduce it with k3os. |
Agreed on compiling Antrea CNI statically. |
@tnqn sorry, that's right, not related to initContainer. I was trying a whole bunch of different cni solutions (calico, cilium, kube-ovn, etc) and forgot the exact root cause of the error. I did the deploy from scratch again and here is more detailed info: If you deploy antrea and start a simple pod (eg. busybox), then you'll see the following in the events:
But the file is there on the host
which indicates some kind of library issue (eg. it looks like libc/libpthread linkage are impossible to satisfy in this busybox setup). |
As per the question about creating a PR, I am probably not the right person for doing this right now because I feel I don't know yet enough about CNI internals and practically nothing about the way antrea is built and packaged. I'll give antrea a try when this is solved and eventually will replace calico in my self-provisioned k8s clusters, depending upon how well it will fit my use-case. In the case a migration to antrea makes sense, I would be more keen on contributing to the project in the future. |
Thanks for reporting this @nitrotm. I can look into this before the next release (Antrea v1.1). Will assign this to me, but if someone wants to start working on this, please comment here and I can assign the issue to you. |
antrea-cni can be installed (by the initContainer) on systems with incompatible system libraries. To increase portability, we build antrea-cni without cgo by setting CG_ENABLED to 0. Same goes for release binaries (e.g. antctl). Note that when cross-compiling, cgo is disabled by default, so there is no change there (e.g. antctl binary for macOS). It's only for native Linux amd64 builds that there is an actual change. Fixes antrea-io#2095
antrea-cni can be installed (by the initContainer) on systems with incompatible system libraries. To increase portability, we build antrea-cni without cgo by setting CG_ENABLED to 0. Same goes for release binaries (e.g. antctl). Note that when cross-compiling, cgo is disabled by default, so there is no change there (e.g. antctl binary for macOS). It's only for native Linux amd64 builds that there is an actual change. Fixes antrea-io#2095
antrea-cni can be installed (by the initContainer) on systems with incompatible system libraries. To increase portability, we build antrea-cni without cgo by setting CG_ENABLED to 0. Same goes for release binaries (e.g. antctl). Note that when cross-compiling, cgo is disabled by default, so there is no change there (e.g. antctl binary for macOS). It's only for native Linux amd64 builds that there is an actual change. Fixes antrea-io#2095 Signed-off-by: Antonin Bas <[email protected]>
antrea-cni can be installed (by the initContainer) on systems with incompatible system libraries. To increase portability, we build antrea-cni without cgo by setting CG_ENABLED to 0. Same goes for release binaries (e.g. antctl). Note that when cross-compiling, cgo is disabled by default, so there is no change there (e.g. antctl binary for macOS). It's only for native Linux amd64 builds that there is an actual change. Fixes #2095 Signed-off-by: Antonin Bas <[email protected]>
Describe the bug
On an alpine-based native server (which is itself based on busybox),
/opt/cni/bin/antrea
cannot execute due to being dynamically linked to some system libraries. This is not the case for some other standard plugins, such asloopback
.To Reproduce
Try to run
antrea
cni plugin binary on a busybox system or alternatively with incompatible libpthread or libc. In particulary, it didn't work on k3os.Expected
As with other cni plugins, it should be statically compiled so that Antrea can be deployed on any system.
Actual behavior
Antrea cannot be deployed successfully (spawning non-host containers fails when network plugin is calling
/opt/cni/bin/antrea
).Versions:
Additional context
None.
The text was updated successfully, but these errors were encountered: