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

Nomad service health checks urlencode the path #17790

Closed
sofixa opened this issue Jul 3, 2023 · 0 comments · Fixed by #17936
Closed

Nomad service health checks urlencode the path #17790

sofixa opened this issue Jul 3, 2023 · 0 comments · Fixed by #17936
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/service-discovery/nomad type/bug

Comments

@sofixa
Copy link
Contributor

sofixa commented Jul 3, 2023

Nomad version

Nomad v1.6.0-beta.1+ent
BuildDate 2023-06-27T16:32:15Z
Revision b26558f

Issue

A Nomad service health check configured as so:

  service {
        name = "vault-api"
        port = "http"
        provider = "nomad"
        check {
          name = "healthy"
          type = "http"
          path = "/v1/sys/health?sealedcode=200"
          interval = "10s"
          timeout  = "5s"
}

results in the path being url encoded by Nomad:
(example access log from nginx)

192.168.1.203 - - [03/Jul/2023:10:10:33 +0000] "GET /v1/sys/health%3Fsealedcode=200 HTTP/1.1" 502 157 "-" "Nomad/1.6.0-beta.1+ent (+https://www.nomadproject.io/; go1.20.5)" "-"

Which results in failing healthchecks.

Reproduction steps

Use a Nomad health check with a query string.

Expected Result

The health check should be on the path as configured.

Actual Result

URL encoded paths being used by the health check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/service-discovery/nomad type/bug
Projects
Development

Successfully merging a pull request may close this issue.

2 participants