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

Readiness probes fail if the path contains a querystring #14267

Closed
paulgrav opened this issue Aug 16, 2023 · 3 comments · Fixed by #14273
Closed

Readiness probes fail if the path contains a querystring #14267

paulgrav opened this issue Aug 16, 2023 · 3 comments · Fixed by #14273
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Issues which should be fixed (post-triage)
Milestone

Comments

@paulgrav
Copy link

What version of Knative?

1.10.1

Expected Behavior

We are trying to run ApolloServer in Knative. ApolloServer recommends the following healthcheck

https://your.server/graphql?query=%7B__typename%7D

We expect that ApolloServer should start when using the recommended healthcheck.

Actual Behavior

The QueueProxy fails to establish that the ApolloServer app is healthy. We observe that the healthchecks fail and the Knative app never becomes available.

Observing the pod resource we can see that the healthcheck is the following:

- name: SERVING_READINESS_PROBE                                                                                                                                                                                                                                                   
value: '{"httpGet":{"path":"/?query={__typename}","port":4000,"host":"127.0.0.1","scheme":"HTTP","httpHeaders":[{"name":"content-type","value":"application/json"},{"name":"K-Kubelet-Probe","value":"queue"}]},"initialDelaySeconds":5,"timeoutSeconds":1,"periodSeconds":10,"successThreshold":1,"failureThreshold":3}'

When we observe the app’s logs we can see that the healthcheck that is being made is:

/%3Fquery={__typename}

The above URL 404s.

Steps to Reproduce the Problem

Rather than recreating an example with Apollo, we’ve reduced the problem.

  1. Deploy the following app: kn service update hello --image docker.io/library/nginx --port 80 --probe-readiness "http:localhost:80:/?foo=bar"

Note the following log lines:

user-container 127.0.0.1 - - [16/Aug/2023:10:35:20 +0000] "GET /%3Ffoo=bar HTTP/1.1" 404 153 "-" "kube-probe//" "-"

We’d expect to see the following:

user-container 127.0.0.1 - - [16/Aug/2023:10:35:20 +0000] "GET /?foo=bar HTTP/1.1" 200 153 "-" "kube-probe//" "-"

@paulgrav paulgrav added the kind/bug Categorizes issue or PR as related to a bug. label Aug 16, 2023
@dprotaso
Copy link
Member

/triage accepted

@knative-prow knative-prow bot added the triage/accepted Issues which should be fixed (post-triage) label Aug 16, 2023
@dprotaso dprotaso added this to the v1.12.0 milestone Aug 16, 2023
@dprotaso
Copy link
Member

Thanks for the report

@dprotaso
Copy link
Member

/assign @nak3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Issues which should be fixed (post-triage)
Projects
Development

Successfully merging a pull request may close this issue.

3 participants