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

When failed to get response from ReloadDeclarativeConfig, log "could not unmarshal config error: unexpected end of JSON input" will appear #4665

Closed
1 task done
randmonkey opened this issue Sep 14, 2023 · 0 comments · Fixed by #4666
Assignees
Labels
bug Something isn't working
Milestone

Comments

@randmonkey
Copy link
Contributor

randmonkey commented Sep 14, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When failed to get response from ReloadDeclarativeConfig in dbless mode, for example when the client timed out to wait for the response, we will get a nil for response, and try to parse it as a resource parsing error. This causes log

level=error msg="failed parsing resource errors" error="could not unmarshal config error: unexpected end of JSON input" 

which is misleading.

Expected Behavior

When failed to get response from ReloadDeclarativeConfig, we do not see the misleading error could not unmarshal.

Steps To Reproduce

1. Deploy KIC & Kong gateway, and set CONTROLLER_PROXY_TIMEOUT_SECONDS to a short duration (like 1 for 1 second)
2. create many ingresses to generate a configuration with large size
3. When the reloading configuration fails, we will see "could not unmarshal config error: unexpected end of JSON input" in KIC log

Kong Ingress Controller version

v2.11.1

Kubernetes version

No response

Anything else?

No response

@randmonkey randmonkey added the bug Something isn't working label Sep 14, 2023
@randmonkey randmonkey self-assigned this Sep 14, 2023
@randmonkey randmonkey added this to the KIC v2.12.0 milestone Sep 14, 2023
@randmonkey randmonkey changed the title When failed to get response from ReloadDeclarativeConfig, the failure reason is always "could not unmarshal config error: unexpected end of JSON input" When failed to get response from ReloadDeclarativeConfig, log "could not unmarshal config error: unexpected end of JSON input" will appear Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant