daemon: Fix error logic flow for pod store being out of date#34389
Merged
christarazi merged 1 commit intocilium:mainfrom Aug 21, 2024
Merged
daemon: Fix error logic flow for pod store being out of date#34389christarazi merged 1 commit intocilium:mainfrom
christarazi merged 1 commit intocilium:mainfrom
Conversation
Member
Author
|
The checkpatch job is failing on a false positive, FYI. |
Member
Author
|
/test |
3 tasks
aanm
approved these changes
Aug 14, 2024
Member
|
/test |
Member
Author
|
Images failed to build so rerunning tests. |
Member
Author
|
/test |
In the endpoint creation path, if Cilium does not have the K8s Pod
reference in the local store, then the logic is to fetch the latest from
the apiserver directly. However, in the case that the fetch succeeds,
the error variable is not clear. This results in Cilium continuing in
the "unhappy" path, even though it should be the "happy" path.
Relevant log msgs from a sysdump displaying this behavior:
```
level=info msg="Create endpoint request" addressing="&{10.0.0.133 ba039cfd-7061-4c45-8526-1a5f569d16de default }" containerID=3bed19eb3aabbb100ec39037a364cf1cbb10ca2666c14faec9893a2dc129844a containerInterface=eth0 datapathConfiguration="&{false false false false false <nil>}" interface=lxc5c692ead6e7a k8sPodName=default/nginx-static-pod-master-node k8sUID=cc8a369e7eac1fc96b6e3b51830c86e9 labels="[]" subsys=daemon sync-build=true
level=warning msg="Detected outdated Pod UID during Endpoint creation. Endpoint creation cannot proceed with an outdated Pod store. Attempting to fetch latest Pod." k8sPodName=default/nginx-static-pod-master-node k8sUID=cc8a369e7eac1fc96b6e3b51830c86e9 subsys=daemon
level=warning msg="Timeout occurred waiting for Pod store, fetching latest Pod via the apiserver." k8sPodName=default/nginx-static-pod-master-node k8sUID=cc8a369e7eac1fc96b6e3b51830c86e9 subsys=daemon
level=warning msg="Unable to fetch kubernetes labels" ciliumEndpointName=/ containerID= containerInterface= datapathPolicyRevision=0 desiredPolicyRevision=0 endpointID=0 error="pod store outdated" ipv4= ipv6= k8sPodName=/ subsys=api
```
Fixes: f6606c6 ("daemon,endpoint,cni: Pass pod UID through CNI ADD")
Signed-off-by: Chris Tarazi <chris@isovalent.com>
4047b4f to
12a3635
Compare
Member
Author
|
/test |
This was referenced Sep 20, 2024
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.
In the endpoint creation path, if Cilium does not have the K8s Pod
reference in the local store, then the logic is to fetch the latest from
the apiserver directly. However, in the case that the fetch succeeds,
the error variable is not clear. This results in Cilium continuing in
the "unhappy" path, even though it should be the "happy" path.
Relevant log msgs from a sysdump displaying this behavior:
Fixes: f6606c6 ("daemon,endpoint,cni: Pass pod UID through CNI ADD")
Signed-off-by: Chris Tarazi chris@isovalent.com
Fixes: #34197