influxdata / influxdata/influxdb
Regression: systemd startup script broken for ping-authenticated HTTP endpoint (and 10s race condition)
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
It seems c8de72ddbc broke the systemd startup script for authenticated HTTP endpoints.
__Steps to reproduce:__
1. Set `[http]` `auth-enabled = true` *and* `ping-auth-enabled = true`
2. Run [`curl`](https://github.com/influxdata/influxdb/commit/c8de72#diff-82ba6997bf68af3d3f40da404802a7e32c2ed77f38f2a21b0adf69a4fa00c425R12) to see if it returns `200`. Obviously it doesn't.
__Expected behavior:__
influxd launching without failure
__Actual behavior:__
* Log reporting:
```
influxd-systemd-start.sh[17749]: Failed to reach influxdb http endpoint at http://127.0.0.1:8086/health
systemd[1]: influxdb.service: Control process exited, code=exited, status=1/FAILURE
influxd-systemd-start.sh[17749]: [tcp] tcp.Mux: Listener at 127.0.0.1:8088 failed failed to accept a connection, closing all listeners - accept tcp 127.0.0.1:
systemd[1]: influxdb.service: Failed with result 'exit-code'.
systemd[1]: Failed to start InfluxDB is an open-source, distributed, time series database.
```
* systemd unit startup stuck at `activating (start)`
__Environment info:__
InfluxDB 1.8.9
__Potential fixes and improvements:__
* My hotfix: let the [check](https://github.com/influxdata/influxdb/commit/c8de72#diff-82ba6997bf68af3d3f40da404802a7e32c2ed77f38f2a21b0adf69a4fa00c425R13) also accept 401 as return code, not just 200.
* Let the CI suite include a test for this
* Change the in-situ documentation of `ping-auth-enabled` to "Enables authentication on the /ping, **/health**, /metrics, and deprecated /status"
Contributor guide
Research direction
Start with the linked systemd startup script and its HTTP health check, then reproduce the configuration with both auth-enabled and ping-auth-enabled. Verify the service starts successfully and add coverage for the authenticated health response; update the referenced in-situ documentation if that scope is included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100