Log file copy fails when capturing from a non-local Nomad server
Open
enhancement
nomad
vault
- Dominant language
- Go
- Stars
- 58
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
When the environment variable NOMAD_ADDR points to a non-local IP address, `hcdiag` incorrectly attempts to read log files from the local filesystem.
Example output snippet:
```
$ hcdiag -nomad
...
2022-03-04T18:01:10.339-0500 [INFO] hcdiag: Running seekers for: product=nomad
2022-03-04T18:01:10.340-0500 [INFO] hcdiag: running: seeker="copy /var/log/nomad/nomad*.log"
2022-03-04T18:01:10.340-0500 [WARN] hcdiag: result: seeker="copy /var/log/nomad/nomad*.log" result=%!s() error="lstat /var/log/nomad/: no such file or directory"
...
```
Contributor guide
Assessment
This issue has not been assessed yet.