Api server is not disabled when loading a configuration that has api.enabled=false #13508
Labels
domain: reload
Anything related to reloading Vector (updating configuration)
type: bug
A code related bug.
A note for the community
Problem
Current behavior: When running vector with a http provider, loading a remote configuration with the
api.enabled = true
means that the api server can never be disabled by loading a new configuration withapi.enabled = false
. The reverse is also true, loading a remote configuration with the api disabled means that the api cannot be started by subsequent configurations.Expected behavior: I would expect that the api server would start/stop depending on whether or not the loaded config has it enabled.
Based on the following code in
app.rs
, it appears that the api_server variable is initialized once before the main loop, and is only updated with config changes from that point on.In order to actually shut down the api server, I think that it would have to be dropped and the value of api_server would be reassigned, like so:
Configuration
Version
0.23.0
Debug Output
Example Data
No response
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: