You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nomad v0.3.2
Consul v0.6.4
Description: Ubuntu 14.04.4 LTS
I have a simple test job specification running a python web server. The service gets registered in Consul including a script health check. This works flawless except for variable expansion during "updates".
When I change the group count and perform nomad run web.nomad I get a service health check in Consul looking like this:
The expansion of ${NOMAD_ALLOC_INDEX} (and probably other variables) doesn't happen for either the service name in consul and the actual command + args of that service (again, only during updates, the initial job run is doing it correctly).
Job file:
job "web" {
region = "global"
datacenters = ["dc1"]
type = "service"
priority = 50
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
update {
# Stagger updates every 30 seconds
stagger = "30s"
# Update a single task at a time
max_parallel = 1
}
group "webservers" {
count = 1
restart {
attempts = 10
interval = "1m"
delay = "5s"
mode = "fail"
}
task "web001" {
driver = "exec"
config {
command = "/usr/bin/python"
args = ["-m", "SimpleHTTPServer", "800${NOMAD_ALLOC_INDEX}"]
}
service {
name = "webservice"
tags = ["http", "python", "master"]
check {
type = "script"
name = "check_http_800${NOMAD_ALLOC_INDEX}"
command = "/usr/local/bin/health.sh"
args = ["800${NOMAD_ALLOC_INDEX}"]
interval = "5s"
timeout = "1s"
}
}
resources {
cpu = 500
memory = 64
network {
mbits = 10
}
}
}
}
}
The text was updated successfully, but these errors were encountered:
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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Nomad v0.3.2
Consul v0.6.4
Description: Ubuntu 14.04.4 LTS
I have a simple test job specification running a python web server. The service gets registered in Consul including a script health check. This works flawless except for variable expansion during "updates".
When I change the group count and perform
nomad run web.nomad
I get a service health check in Consul looking like this:The expansion of ${NOMAD_ALLOC_INDEX} (and probably other variables) doesn't happen for either the service name in consul and the actual command + args of that service (again, only during updates, the initial job run is doing it correctly).
Job file:
The text was updated successfully, but these errors were encountered: