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

Log error getting annotations in genie-controller.go #234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants