hashicorp / hashicorp/envconsul

envconsul hangs forever when it can't fetch from vault

Open
#169 8 comments 21 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
2.1k
Forks
194
PR merge metrics
No merged PRs in 30d

Description

### Envconsul version
`envconsul v0.7.3 (daa2947)`

### Configuration
```hcl
upcase = true

vault {
address = "https://vault:8200"

# envconsul will automatically get a new VAULT_TOKEN.
renew_token = true

ssl {
enabled = true
verify = false
}

retry {
attempts = 1
}
}

secret {
no_prefix = true
format = "FOO_{{ key }}"
path = "_vault/non-existing"
}
```

### Command
```shell
export VAULT_TOKEN=$(curl -s )
envconsul -config config.hcl /bin/true
```

### Debug output
https://gist.github.com/RasmusWL/f4e21f069f16f025177d885eaf2c24c2

### Expected behavior
Either of these, although I would prefer the first
1. `envconsul` will pass control to the program, without setting the `FOO_` environment variables
2. `envconsul` returns with error code

### Actual behavior
`envconsul` hangs forever. The status from `ps` is `Sl+`, meaning it is in _interruptible sleep (waiting for an event to complete)_.

### Steps to reproduce
1. add `secret` with `path` that does not exist, or where the `VAULT_TOKEN` does not give permission to this secret.
2. run `envconsul -config config.hcl /bin/true`
3. stare forever at your terminal, because `envconsul` hangs

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.