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

BZ-1990953: Only the first container can use SR-IOV network attachment #37170

Closed
wants to merge 2 commits into from

Conversation

jboxman
Copy link
Contributor

@jboxman jboxman commented Oct 7, 2021

@jboxman jboxman added this to the Next Release milestone Oct 7, 2021
@jboxman jboxman self-assigned this Oct 7, 2021
@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 7, 2021
@netlify
Copy link

netlify bot commented Oct 7, 2021

✔️ Deploy Preview for osdocs ready!

🔨 Explore the source changes: afd3277

🔍 Inspect the deploy log: https://app.netlify.com/sites/osdocs/deploys/6179c579f617460007354596

😎 Browse the preview: https://deploy-preview-37170--osdocs.netlify.app

@@ -30,6 +30,8 @@ ifdef::sriov[]
[NOTE]
=====
If a network attachment is managed by the SR-IOV Network Operator, the SR-IOV Network Resource Injector adds the `resource` field to the `Pod` object automatically.

Only the first container in your pod is configured for access to your SR-IOV additional network. If you have multiple containers defined in your `Pod` object, you must ensure that the container that requires access to your SR-IOV additional network is defined first. For more information, see link:https://bugzilla.redhat.com/show_bug.cgi?id=1990953[BZ#1990953].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jboxman thanks for adding the note!

One minor notice, this behavior only applies to Intel NIC in DPDK mode (vfio-pci deviceType).

The SR-IOV Network Resource Injector adds the resource field to the first container in your Pod object automatically. This behavior may cause issue when using SR-IOV in DPDK mode for Intel NICs that only the first container will have access to the resource or the first container gets the resource unexpectedly without defining it manually. To workaround this issue, it is recommended to disable the Network Resource Injector or ensure the container that requires access to your SR-IOV additional network be defined as first container in the Pod object.

@jboxman
Copy link
Contributor Author

jboxman commented Oct 27, 2021

@zshi-redhat, I've updated this for your review. Thanks!

@@ -29,7 +29,11 @@ The pod must be in the same namespace as the additional network.
ifdef::sriov[]
[NOTE]
=====
If a network attachment is managed by the SR-IOV Network Operator, the SR-IOV Network Resource Injector adds the `resource` field to the `Pod` object automatically.
If a network attachment is managed by the SR-IOV Network Operator, the SR-IOV Network Resource Injector adds the `resource` field to the first container in a pod automatically.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resource injector adds the resource field based on the metadata.annotations k8s.v1.cni.cncf.io/resourceName of net-attach-def, regardless of who (sriov operator/ manually) creates or manages it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants