cilium CNI cannot be used in combination with bandwidth
CNI
#24899
Labels
kind/bug
This is a bug in the Cilium logic.
kind/community-report
This was reported by a user in the Cilium community, eg via Slack.
needs/triage
This issue requires triaging to establish severity and next steps.
Is there an existing issue for this?
What happened?
In my testing environment, I tested the scenario of using
cilium
andbandwidth
CNI together(we cannot use ciliumbandwidthManager
because our os kernel version is too low to meet the requirements.). Then we found that an error occured whenbandwith
CNI was called:no veth peer of container interface found in host ns
.After reivewing the
bandwith
CNI source code, the reason for this error is that the result returned by cilium CNI does not meet the following containtion.https://github.com/containernetworking/plugins/blob/4a6147a1552064af80b4f7567b30c5174153c62a/plugins/meta/bandwidth/main.go#L153-L160
The official documentation of CNI requires that the
interfaces
field should include information about both container-side interface and host-side interface. However, currently cilium only provides the container-side interface information.https://www.cni.dev/docs/spec/#section-5-result-types
interfaces
: An array of all interfaces created by the attachment, including any host-level interfaces:name
: The name of the interface.mac
: The hardware address of the interface (if applicable).sandbox
: The isolation domain reference (e.g. path to network namespace) for the interface, or empty if on the host. For interfaces created inside the container, this should be the value passed viaCNI_NETNS
.some test code:
output:
Cilium Version
1.13.0
Kernel Version
5.15.0-69-generic
Kubernetes Version
Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.3", GitCommit:"9e644106593f3f4aa98f8a84b23db5fa378900bd", GitTreeState:"clean", BuildDate:"2023-03-15T13:40:17Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.3", GitCommit:"9e644106593f3f4aa98f8a84b23db5fa378900bd", GitTreeState:"clean", BuildDate:"2023-03-15T13:33:12Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
Sysdump
No response
Relevant log output
No response
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: