Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

Conversation

@stevo-f3
Copy link
Contributor

@stevo-f3 stevo-f3 commented Apr 19, 2024

When getting pod annotations for CNI, Genie controller would swallow underlying error in case of len(k8sArgs.K8S_ANNOT) == 0 which can happen for many reasons.

In an incident, all new Pods were failing to be created, genie was erroring CNI Genie Add IP internal error: Error getting annotations for pod (foo:bar): No pod or env var found, result: %!!(MISSING)s(<nil>)
Missing underlying error made debugging hard.

This PR:

  • improves error handling in genie-controller's getPodAnnotationsForCNI to always log underlying error for getK8sPodAnnotations call
  • removes logging underlying error for one case where it was already covered, not to log same error twice
  • fixes a typo in an error message

@stevo-f3
Copy link
Contributor Author

@m1093782566 @sushanthakumar @kevin-wangzefeng @vinaykul can you please take a look?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants