Implement CNI STATUS#120
Closed
architkulkarni wants to merge 2 commits intocontainerd:mainfrom
Closed
Conversation
df3e39c to
ae6bd6c
Compare
df45e3b to
d79d5df
Compare
This commit implements the STATUS CNI verb, updating the go-cni Status() function to call STATUS on all plugins for each network. It returns without error only if all STATUS calls return without error. Signed-off-by: Michael Zappa <michael.zappa@gmail.com> Signed-off-by: Archit Kulkarni <architkulkarni@google.com> Co-authored-by: Michael Zappa <michael.zappa@gmail.com> update ci to ensure we aligned with contianerd Signed-off-by: Michael Zappa <michael.zappa@gmail.com>
d79d5df to
de7830d
Compare
…it-implementstatus Signed-off-by: Archit Kulkarni <architkulkarni@google.com>
Contributor
Author
|
Closed in favor of #121 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on the earlier PR #114.
This PR implements the STATUS CNI verb.
This is the summary of how Status is called:
Kubelet calls the containerd Status() function via a CRI-API RPC: https://github.com/kubernetes/kubernetes/blob/3718932d9a3ea459217ca11efe1ae9ead6aa92c1/pkg/kubelet/kubelet.go#L2871 and checks if it’s ready. It calls this every 5 seconds .
The containerd Status() function in turn calls the go-cni Status() function: https://github.com/containerd/containerd/blob/6333db77015764f7d45b407094a3bc2cc05c239b/internal/cri/server/status.go#L49
Here is the go-cni Status() function.
go-cni/cni.go
Line 137 in 1c1be5e
In this PR, we update the go-cni Status() function to call STATUS on all of the plugins for each network (after doing the same "ready" check as before, which is now moved to a new function Ready()).
It returns without error only if all of the STATUS calls return without error. This is the main difference between this PR and the previous PR #114 (i.e. in this PR we use the "AND" of all the network statuses instead of returning a list of statuses.)
The reason for this is to keep the signature of Status() the same to make the API backwards compatible, so that we don't have to synchronize this change with the containerd v2.0 release.
Related info: