Changes to connect stanza get ignored on job re-run
shoenig opened this issue · 1 comments
If for example I have a job.nomad
file with a consul connect stanza defined like,
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "count-api"
local_bind_port = 8080
}
}
}
}
and then modify something like the local_bind_port
to be something different,
local_bind_port = 8888
and then re-run the job.nomad
job,
nomad job run job.nomad
I'd expect to see the change get applied, but nothing happens (the container is left as-is), e.g.
$ docker inspect dashboard-7dd35aec-30e4-e412-314b-5310be43ff4a | jq -r .[0].Config.Env[] | grep NOMAD_UPSTREAM
NOMAD_UPSTREAM_ADDR_count-api=127.0.0.1:8080
NOMAD_UPSTREAM_ADDR_count_api=127.0.0.1:8080
NOMAD_UPSTREAM_IP_count-api=127.0.0.1
NOMAD_UPSTREAM_IP_count_api=127.0.0.1
NOMAD_UPSTREAM_PORT_count-api=8080
NOMAD_UPSTREAM_PORT_count_api=8080
On the other hand, issuing a job stop
and job run
destroys everything and creates the new job with the changes as expected.
From the logs, it seems the change gets ignored
2019-10-09T18:04:05.880Z [DEBUG] worker.service_sched: reconciled current state with desired state: eval_id=ab10fcba-c7c2-7ece-6c88-69aac89fef49 job_id=myjob namespace=default results="Total changes: (place 0) (destructive 0) (inplace 2) (stop 0)
Created Deployment: "c5278f31-e75e-16e6-0799-68f15ea0de2f"
Desired Changes for "dashboard": (place 0) (inplace 1) (destructive 0) (stop 0) (migrate 0) (ignore 0) (canary 0)
Desired Changes for "api": (place 0) (inplace 1) (destructive 0) (stop 0) (migrate 0) (ignore 0) (canary 0)"
...
2019-10-09T18:04:17.389Z [DEBUG] worker.service_sched: reconciled current state with desired state: eval_id=c5a395e0-d516-68b9-e75f-5084809e359c job_id=myjob namespace=default results="Total changes: (place 0) (destructive 0) (inplace 0) (stop 0)
Deployment Update for ID "c5278f31-e75e-16e6-0799-68f15ea0de2f": Status "successful"; Description "Deployment completed successfully"
Desired Changes for "api": (place 0) (inplace 0) (destructive 0) (stop 0) (migrate 0) (ignore 1) (canary 0)
Desired Changes for "dashboard": (place 0) (inplace 0) (destructive 0) (stop 0) (migrate 0) (ignore 1) (canary 0)"
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.