-
Notifications
You must be signed in to change notification settings - Fork 192
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
envconsul hangs forever when it can't fetch from vault #169
Comments
I wouldn't have otherwise seen this as a huge problem, until my docker container sat for several days in AWS Batch waiting for the process to exit. Anyone know of some type of workaround I can use to detect this in bash? |
Surprisingly, the same thing happens if there is no |
It seems to be working as intended. 🤨
vault {
retry {
enabled = true
attempts = 5
backoff = "2s"
max_backoff = "10s"
}
} * permission denied (retry attempt 1 after "2s")
* permission denied (retry attempt 2 after "4s")
* permission denied (retry attempt 3 after "8s")
* permission denied (retry attempt 4 after "10s")
* permission denied (retry attempt 5 after "10s")
* permission denied (exceeded maximum retries)
2018/10/03 20:24:34.443921 [WARN] vault.token: renewer returned (maybe the lease expired)
2018/10/03 20:24:34.443974 [ERR] (view) lease expired or is not renewable (exceeded maximum retries)
2018/10/03 20:24:34.444010 [ERR] (runner) watcher reported error: lease expired or is not renewable
...hangs forever... |
envconsul --help
So the solution would be something like: envconsul -once -config config.hcl /bin/true |
+1 on just passing control the the program without setting the environment variable. If a Vault secret is required by the application, then the application will not start up successfully. Let us decide how to handle that scenario. In our use case specifying a non-existent path is a valid state. Take the following for example:
I would like the app to startup with the value from the default path and simply ignore the fact that |
@jmcmaster05 the Env section of the README gives an example with |
Hi @catsby, is there any chance that you (or someone else at HashiCorp) could have a look at this? Is there some simple fix that we are overlooking? |
Bumped into this too. I'm not running batch-style jobs, just ordinary pods on Kubernetes. From time to time due to networking issues there is a chance to get a pod running with revoked token indefinitely. And It would be nice to be able to instruct envconsul to die when token can't be renewed or explicitly expired and let Kubernetes (or whatever external scheduler) to handle this. |
Envconsul version
envconsul v0.7.3 (daa2947)
Configuration
Command
Debug output
https://gist.github.com/RasmusWL/f4e21f069f16f025177d885eaf2c24c2
Expected behavior
Either of these, although I would prefer the first
envconsul
will pass control to the program, without setting theFOO_<key>
environment variablesenvconsul
returns with error codeActual behavior
envconsul
hangs forever. The status fromps
isSl+
, meaning it is in interruptible sleep (waiting for an event to complete).Steps to reproduce
secret
withpath
that does not exist, or where theVAULT_TOKEN
does not give permission to this secret.envconsul -config config.hcl /bin/true
envconsul
hangsThe text was updated successfully, but these errors were encountered: