-
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
Consul default token not utilized for Nomad non-native connect jobs #11073
Comments
Hi @johnalotoski , Thanks for using Nomad. We're looking into this, and discussing internally. Thanks submitting the issue, and stay tuned for updates. In the meantime, do you have any relevant Nix config you can share? |
Thanks @DerekStrickland! Is there any Nix config in particular you are looking for? There isn't much relevant that I'm aware of at the moment. The Consul and Nomad configs for this testing are provided here and here respectively, which are likely more relevant. |
Looks like this Consul bug that's been patched now may be related? hashicorp/consul#10824. |
Thanks @johnalotoski. I know almost nothing about Nix, so you caught the key word... relevant. If you don't think there is any relevant Nix config, I'll have to trust you. That said, I did a little digging yesterday, and I too quickly found myself in Consul code. I'll see if I can get some eyes from the folks on that team to help troubleshoot. |
@johnalotoski Just to confirm. You're confident you're running Consul 1.10.2? |
Hi @DerekStrickland, no I'm currently running Consul 1.10.1 with patches from Consul PR 9639 and for issue 10714 mentioned above. I opened this ticket about 5 days before 1.10.2 was released. I'll get the cluster bumped to 1.10.2 in the next day or two and report back shortly. |
Hi again @DerekStrickland. I bumped the cluster to Consul 1.10.2 today, still at Nomad v1.1.3 -- will bump Nomad to v1.1.4 next week. But in any case, indeed, bumping to Consul 1.10.2 has resolved this issue. Connect jobs now get a connect service instance token from the default token properly. Thank you! |
That's great to hear! I'll go ahead and close this issue then. Thanks again for using Nomad. |
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
Nomad v1.1.3
Operating system and Environment details
NixOS 21.05, Docker driver jobs
Consul v1.10.1
(patched with Consul PR 9639 and 10714 to fix websockets and upstream listener issues)Issue
Due to nomad issue 9813 we specifically avoid passing a consul token into nomad client config and instead make use of the consul default token which is utilized when the nomad client consul token is not supplied. This approach is working for us without issue everywhere else at the moment (AFAIK) except for Connect jobs. When no consul token is supplied to the nomad client, the connect envoy sidecar creation code does not utilize the default Consul token to create a connect service instance token and the
envoy_bootstrap.json
file that is created has an empty string being passed for thex-consul-token
instead of a connect service instance token:This results in errors in the envoy container stderr logs and consul agent logs of the following:
However, if the default Consul token is provided to the nomad client, then it will (assuming the default token has sufficient ACLs) properly create a connect mesh service instance token and place it in the
envoy_bootstrap.json
file and the Connect mesh job will work as expected.Reproduction steps
Expected Result
envoy_bootstrap.json
file.Actual Result
Job file (if appropriate)
envoy_bootstrap.json
file so the connect job will work, without having to supply the consul default token to the nomad client directly and cause the problems mentioned in nomad issue 9813 is seen here.CONSUL_HTTP_TOKEN
env var at the job, task or sidecar_task env stanza level did not work in getting ax-consul-token
populated into theenvoy_bootstrap.json
file.The text was updated successfully, but these errors were encountered: