Closed cyrilgdn closed 7 years ago
Thats documented behavior in consul-template - please use key_or_default
(renamed to keyOrDefault
in recent version, which is not bundled with Nomad yet) if you want to avoid this blocking behavior - or use keyExists
around your usage
@cyrilgdn As @jippi explained this is expected behavior. Nomad 0.5.3 will bring key_or_default
which you can use to have non-blocking behavior. Further it will hopefully bring task events that will make understanding the behavior more straight forward! Thanks!
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 version
Nomad v0.5.2
Issue
I created a simple test job (see below) which try to download a consul key in a file with:
data = "{{ key \"configtest\" }}"
When I run this job, if the read of consul key return a 404 (key does not exists or, in my case, key is protected by ACL), the allocation remains in Pending state forever (an job in Starting state)
Is this a wanted behavior? Maybe the job should failed after a few tries?
Reproduction steps
Job file
Nomad Server logs