-
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
Can't run script health-checks for Consul-connect enabled Nomad jobs. #8952
Comments
Hi @zhelezovartem thanks for reporting. Can you try setting the I think when the service is defined at the group level, setting the Nomad should both document and provide validation on job submission to check for this case. |
Hi @shoenig, thanks a lot for great explanation. I followed your advice and now it works. Working job config looks like:
It was a bit unclear for me that check was not executed when inspecting Nomad logs. Maybe will be good to add some sort of warning to Nomad logs for such cases? Something like |
When defining a script-check in a group-level service, Nomad needs to know which task is associated with the check so that it can use the correct task driver to execute the check. This PR fixes two bugs: 1) validate service.task or service.check.task is configured 2) make service.check.task inherit service.task if it is itself unset Fixes #8952
When defining a script-check in a group-level service, Nomad needs to know which task is associated with the check so that it can use the correct task driver to execute the check. This PR fixes two bugs: 1) validate service.task or service.check.task is configured 2) make service.check.task inherit service.task if it is itself unset Fixes #8952
When defining a script-check in a group-level service, Nomad needs to know which task is associated with the check so that it can use the correct task driver to execute the check. This PR fixes two bugs: 1) validate service.task or service.check.task is configured 2) make service.check.task inherit service.task if it is itself unset Fixes hashicorp#8952
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. |
When defining a script-check in a group-level service, Nomad needs to know which task is associated with the check so that it can use the correct task driver to execute the check. This PR fixes two bugs: 1) validate service.task or service.check.task is configured 2) make service.check.task inherit service.task if it is itself unset Fixes hashicorp#8952
Nomad version
Nomad v0.12.5 (514b0d6)
Operating system and Environment details
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
Also tested on Amazon Linux 2 - the same behavior
Issue
I wanted to setup script health-checks for Consul-connect enabled jobs.
I started with simple job with script healthcheck and without consul-connect feature. Check passed. Then I enabled Consul-connect feature for this job and after that health-check become fail.
Reproduction steps
Job file
job file, Consul-connect disabled:
job file, Consul-connect enabled:
Nomad Client logs
There is nothing about this health-check in Nomad client logs, but i can see warning in Consul client logs:
Nomad Server logs
There is nothing about this health-check in Nomad server logs
The text was updated successfully, but these errors were encountered: