Skip to content

[release/1.5] sandbox: send pod UID to CNI plugins as K8S_POD_UID#5643

Merged
estesp merged 1 commit intocontainerd:release/1.5from
dcbw:15-cni-plugin-pod-uid
Jun 23, 2021
Merged

[release/1.5] sandbox: send pod UID to CNI plugins as K8S_POD_UID#5643
estesp merged 1 commit intocontainerd:release/1.5from
dcbw:15-cni-plugin-pod-uid

Conversation

@dcbw
Copy link
Copy Markdown
Contributor

@dcbw dcbw commented Jun 23, 2021

CNI plugins that need to wait for network state to converge
may want to cancel waiting when a short lived pod is deleted.
However, there is a race between when kubelet asks the runtime
to create the sandbox for the pod, and when the plugin is able
request the pod object from the apiserver. It may be the case
that the plugin receives the new pod, rather than the pod
the sandbox request was initiated for.

Passing the pod UID to the plugin allows the plugin to check
whether the pod it gets from the apiserver is actually the
pod its sandbox request was started for.

Cherry-pick of #5640

@estesp @fuweid

CNI plugins that need to wait for network state to converge
may want to cancel waiting when a short lived pod is deleted.
However, there is a race between when kubelet asks the runtime
to create the sandbox for the pod, and when the plugin is able
request the pod object from the apiserver. It may be the case
that the plugin receives the new pod, rather than the pod
the sandbox request was initiated for.

Passing the pod UID to the plugin allows the plugin to check
whether the pod it gets from the apiserver is actually the
pod its sandbox request was started for.

Signed-off-by: Dan Williams <[email protected]>
(cherry picked from commit dac2543)
@k8s-ci-robot
Copy link
Copy Markdown

Hi @dcbw. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dcbw dcbw changed the title sandbox: send pod UID to CNI plugins as K8S_POD_UID [release/1.5] sandbox: send pod UID to CNI plugins as K8S_POD_UID Jun 23, 2021
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jun 23, 2021

Build succeeded.

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit 9b71425 into containerd:release/1.5 Jun 23, 2021
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.

4 participants