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

vai: log errors on add #120

Merged
merged 4 commits into from
Jan 9, 2025
Merged

Conversation

moio
Copy link
Contributor

@moio moio commented Dec 13, 2024

client-go unfortunately "swallows" them

Partly addresses rancher/rancher#48384

client-go unfortunately "swallows" them

Signed-off-by: Silvio Moioli <silvio@moioli.net>
@moio moio requested a review from a team as a code owner December 13, 2024 11:25
joshmeranda
joshmeranda previously approved these changes Dec 13, 2024
Copy link

@joshmeranda joshmeranda left a comment

Choose a reason for hiding this comment

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

Should get a review from people with more Vai knowledge (@ericpromislow?)

@tomleb
Copy link
Contributor

tomleb commented Dec 13, 2024

Does client-go "swallow" them because we don't set a klog log level high enough? Or are they really ignored?

In any case, I feel like we should log for all cases anyway (add, update and delete)?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: Silvio Moioli <silvio@moioli.net>
@moio
Copy link
Contributor Author

moio commented Dec 14, 2024

Does client-go "swallow" them because we don't set a klog log level high enough? Or are they really ignored?

Really ignored, unfortunately:

https://github.com/kubernetes/client-go/blob/ab443a50c6203a0d90ec3d369640b8a2b2981312/tools/cache/controller.go#L196-L203

(error is either ignored or pop is retried, but in no case logged)

In any case, I feel like we should log for all cases anyway (add, update and delete)?

Update is transitively covered by Add, Delete I have just added.

Thanks

@richard-cox
Copy link
Member

Eagerly looking forward to this to help debug an issue indexing storage.k8s.io.storageclass metadata.annotations."storageclass.kubernetes.io/is-default-class"

@moio moio requested review from joshmeranda and tomleb December 17, 2024 14:55
tomleb
tomleb previously approved these changes Dec 19, 2024
Copy link
Contributor

@tomleb tomleb left a comment

Choose a reason for hiding this comment

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

That will definitely be useful, surprised those errors are ignored like that.

Co-authored-by: Tom Lebreux <me@tomlebreux.com>
Co-authored-by: Tom Lebreux <me@tomlebreux.com>
@moio moio requested a review from tomleb December 19, 2024 15:58
@moio moio requested a review from crobby December 19, 2024 15:59
Copy link
Contributor

@ericpromislow ericpromislow left a comment

Choose a reason for hiding this comment

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

There might be some double-logging on these errors -- I count five calls from steve to ….[Ss]tore.Delete() at there might be others, where the method's receiver variable isn't called "store". All the calls I did fine do no logging, so better to put up with some double-logging and then unlogged errors.

@ericpromislow ericpromislow merged commit 00757ee into rancher:main Jan 9, 2025
1 check passed
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.

None yet

5 participants