Faced strange problem. Have Nomad job with several tasks. One of the task I’d like to execute after main task stops. So lifecycle is set for “poststop”. But it cannot be executed because of strange error “Vault: server failed to derive vault token: Can’t request Vault token for terminal allocation”. And this happens only when task is marked as poststop. If I change nothing but lifecycle to “prestart” everything works perfectly.
What additional information should I provide to get any help? Am spending too much time on this problem and cannot find what is wrong.
I’m having the same issue as well - I’m wanting to do some final cleanup + backup and w/o vault available cannot get the keys.
I also realized that even before I had a template that used the value - the post-stop action reported a failure if I had the vault dependency declared at the group level.
… interestingly… with the template declared - it tried to render the secrets despite not getting a vault token and failed there… so looks like the system tried to go through the remaining work-items to create the task, even though it wouldn’t have run because the vault token wouldn’t have been issued.