mirror of https://github.com/hashicorp/consul
b7587cac42
This change consolidates loading services and checks from both config and persisted state into methods on the agent. As part of this, we introduce optional persistence when calling RemoveCheck/RemoveService. Fixes a bug where config reloads would kill persisted services/checks. Also fixes an edge case: 1. A service or check is registered via the HTTP API 2. A new service or check definition with the same ID is added to config 3. Config is reloaded The desired behavior (which this implements) is: 1. All services and checks deregistered in memory 2. All services and checks in config are registered first 3. All persisted checks are restored using the same logic as the agent start sequence, which prioritizes config over persisted, and removes any persistence files if new config counterparts are present. |
||
---|---|---|
.. | ||
agent | ||
event.go | ||
event_test.go | ||
exec.go | ||
exec_test.go | ||
force_leave.go | ||
force_leave_test.go | ||
info.go | ||
info_test.go | ||
join.go | ||
join_test.go | ||
keygen.go | ||
keygen_test.go | ||
keyring.go | ||
keyring_test.go | ||
leave.go | ||
leave_test.go | ||
members.go | ||
members_test.go | ||
monitor.go | ||
reload.go | ||
reload_test.go | ||
rpc.go | ||
util_test.go | ||
version.go | ||
version_test.go | ||
watch.go | ||
watch_test.go |