-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Vault health check fails with "unsupported path" with namespace set #13710
Comments
From reading some more it seems like this should never happen, since there is the Nomad's mutual TLS certificates expired, as the intermediate cert - also stored in Vault - expired and they therefore couldn't renew. This was fixed and then we started seeing failing health checks. We worked around the health check issue by spoofing a healthy response from Vault, after which it became apparent that Nomad's Vault token had expired since it was unable to keep up with the periodic renewals. |
Just bumped into the same bug - also, hi @t-davies :) |
Haha, hey @mitchfriedman - small world! 😃 |
Hi @t-davies! As you've noted, Nomad uses two Vault clients. There's one for namespace operations and one for non-namespaced operations (ref // Store the client, create/assign the /sys client
v.client = client
if v.config.Namespace != "" {
v.logger.Debug("configuring Vault namespace", "namespace", v.config.Namespace)
v.clientSys, err = vapi.NewClient(apiConf)
if err != nil {
v.logger.Error("failed to create Vault sys client and not retrying", "error", err)
return err
}
client.SetNamespace(v.config.Namespace)
} else {
v.clientSys = client
} It's not clear to me the current state of the issue. Once you got the certificates and tokens fixed and Nomad servers restarted with those new configurations, is the problem persisting? Also, can you provide the |
Thanks @tgross!
Sorry, yes - once certificates and tokens were sorted and we restarted the servers, everything became healthy again. Haven't seen this issue reoccur since. Not sure if we managed to get things into some sort of odd state given the other issues. Here's the
|
Ok, good to hear. I suspect what's happening here is that Vault is doing the fairly common thing of returning a 404 on the resource when we don't have access to it, which was because of the expired Vault token. I'm going to close this issue out, but certainly if you run into this again and it's not because of an expired token, let us know. Thanks! |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
Output from
nomad version
Nomad v1.3.1 (2b054e38e91af964d1235faa98c286ca3f527e56)
Operating system and Environment details
Amazon Linux 2, amd64, EC2
Issue
/v1/sys/health
should not be made with theX-Vault-Namespace
header set, doing so results in a 404 status code response from Vault, see sys: don't setX-Vault-Namespace
header for root-only paths vault#14934.Reproduction steps
1.11.0+ent
1.3.1
Expected Result
X-Vault-Namespace
header and returns successfully.Actual Result
X-Vault-Namespace
header and fails.Job file (if appropriate)
Nomad Server logs (if appropriate)
Nomad Client logs (if appropriate)
Same error on clients.
The text was updated successfully, but these errors were encountered: