-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
bug: kubernetes discovery failed without recover #7489
Comments
@zhixiongdu027 Maybe you can check this? |
@crazyMonkey1995 @tokers |
However, this problem is difficult to reproduce. You can refer to the implementation of client-go. It seems that the way it handles 410 Gone is to relist() |
Looking at the description of this text, the only solution to the Gone error is to "Clear Local Cache" and then Re-ListWatch @crazyMonkey1995 |
Here's the problem, this "informer" parameter will have a continue parameter, which will be set when listing, but you did not clear the continue parameter when returning 410, then the continue parameter is still there when retrying after 40 seconds, so it will continue for 410. |
@crazyMonkey1995 I Will fix it, Many TKS |
Current Behavior
The kubernetes discovery that the status code of 410 Gone was not processed in the list stage, so that the continue parameter could never be updated, and the list would continue to fail (returning to 410 Gone, an infinite loop)
Expected Behavior
When apiserver returns 410 Gone, update the continue parameter of the request instead of failing directly.
Error Logs
2022/07/18 11:25:49 [error] 390#390: *32338366 [lua] informer_factory.lua:292: list failed, kind: Endpoints, reason: Gone, message : {"kind":"Status","apiVersion":"v1","metadata":{"continue":"eyJ2IjoibWV0YS5rOHMuaW8vdjEiLCJydiI6LTEsInN0YXJ0IjoiM2Q4OWZlZTQwOTdjYzVhMzVjMDk0MDVmODJjOWNkOTA5NzQ4YTU5Ni1wcm8tcHJvL2htYVx1MDAwMCJ9"},"status":"Failure","message":"The provided continue parameter is too old to display a consistent list result. You can start a new list without the continue parameter, or use the continue token in this response to retrieve the remainder of the results. Continuing with the provided token results in an inconsistent list - objects that were created, modified, or deleted between the time the first chunk was returned and now may show up in the list.","reason":"Expired","code":410}
Steps to Reproduce
kubernetes discovery list stage occur ocasionally.
Environment
apisix version
): 2.14.1uname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):The text was updated successfully, but these errors were encountered: