-
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
Nomad does not support agent service health checks when tls.verify_https_client is enabled #6923
Comments
Is there a solution to this yet? Nomad health check fail when I use mTLS with Consul. |
There is not a solution to this yet @troyweber. There are 2 big blockers:
I'm curious what folks are hoping to use this health check for? The only case where the health check would fail without the whole node having crashed is if the Nomad agent crashed. It's common to use a load balancer in front of Nomad agents to handle mTLS on the Nomad side, and load balancers should be able to detect and route around down Nomad agents more quickly than Consul would perform this health check and update the catalog. For general cluster health monitoring the client agent's metrics and logs provides far more detailed information into the health of the agent than the simple HTTP liveness check. So while I'd definitely love for this to Just Work, the reason we've avoided implementing |
Is there any progress on this issue ? |
Option 3: Implement a Option 4: Implementing a unix domain socket for Nomad's Agent HTTP API (#17574) solves all of the ugly certificate handling issues. We would still need to handle the ACL token somehow, but the agent-local token might be an appealing solution here. An agent-local token might be a reasonable solution for securing our current unsecured metrics endpoint as well. Consul does not support unix sockets for http checks, so we would still need to switch to a |
For a possible option 5, what about changing the check to a TTL check? That way the agent is heartbeating to Consul rather than the other way around. The agent already needs to have a cert for the local Consul agent anyways to do Consul API operations. |
Nomad version
v0.10.2
Issue
The Nomad TLS doc at https://www.nomadproject.io/guides/security/encryption.html#network-isolation-with-tls says "Consul will not attempt to health check agents with verify_https_client set as it is unable to use client certificates." However, the Consul docs for health checks indicate that health checks do support TLS certificates. See https://www.consul.io/docs/agent/checks.html and https://www.consul.io/docs/agent/options.html#enable_agent_tls_for_checks).
We should take advantage of Consul's ability to use its certificates for doing health checks. Its possible, perhaps likely, that Consul's certificate is invalid for accessing Nomad, so we need an alternative method (eg Nomad could create a TTL check and heartbeat).
The text was updated successfully, but these errors were encountered: