open-consul/agent
James Phillips a1db119d02 Fixes handling of stop channel and failed barrier attempts. (#3546)
* Fixes handling of stop channel and failed barrier attempts.

There were two issues here. First, we needed to not exit when there
was a timeout trying to write the barrier, because Raft might not
step down, so we'd be left as the leader but having run all the step
down actions.

Second, we didn't close over the stopCh correctly, so it was possible
to nil that out and have the leaderLoop never exit. We close over it
properly AND sequence the nil-ing of it AFTER the leaderLoop exits for
good measure, so the code is more robust.

Fixes #3545

* Cleans up based on code review feedback.

* Tweaks comments.

* Renames variables and removes comments.
2017-10-06 07:54:49 -07:00
..
config Minor typo (boostrap) 2017-10-05 16:28:48 +02:00
consul Fixes handling of stop channel and failed barrier attempts. (#3546) 2017-10-06 07:54:49 -07:00
metadata
mock
pool Bumps default Raft protocol to version 3. (#3477) 2017-09-25 15:27:04 -07:00
router
structs Adds script warning and fixes Docker args recognition. 2017-10-04 21:41:27 -07:00
systemd
token
acl.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
acl_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
acl_endpoint_test.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
acl_test.go Introduce Code Policy validation via sentinel, with a noop implementation 2017-09-25 13:44:55 -05:00
agent.go Adds script warning and fixes Docker args recognition. 2017-10-04 21:41:27 -07:00
agent_endpoint.go Provide stable config for agent/self (#3532) 2017-10-04 10:43:17 -07:00
agent_endpoint_test.go Provide stable config for agent/self (#3532) 2017-10-04 10:43:17 -07:00
agent_test.go Clean up subprocess handling and make shell use optional (#3509) 2017-10-04 16:48:00 -07:00
bindata_assetfs.go Updates checked in web assets to pick up CSS change. 2017-10-04 09:52:15 -07:00
blacklist.go
blacklist_test.go
catalog_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
catalog_endpoint_test.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
check.go Clean up subprocess handling and make shell use optional (#3509) 2017-10-04 16:48:00 -07:00
check_test.go Clean up subprocess handling and make shell use optional (#3509) 2017-10-04 16:48:00 -07:00
config.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
coordinate_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
coordinate_endpoint_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
dns.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
dns_test.go Fix tests after config refactor 2017-09-28 12:32:46 +02:00
docker.go
docker_unix.go
docker_windows.go
event_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
event_endpoint_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
health_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
health_endpoint_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
http.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
http_test.go Renames enable_ui to ui to keep compatibility with existing configs. 2017-09-26 00:05:55 -07:00
keyring.go
keyring_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
kvs_endpoint.go
kvs_endpoint_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
local.go fix data race 2017-09-26 13:42:10 +02:00
local_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
notify.go
notify_test.go
operator_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
operator_endpoint_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
prepared_query_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
prepared_query_endpoint_test.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
remote_exec.go Clean up subprocess handling and make shell use optional (#3509) 2017-10-04 16:48:00 -07:00
remote_exec_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
retry_join.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
retry_join_test.go
segment_stub.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
session_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
session_endpoint_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
snapshot_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
snapshot_endpoint_test.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
status_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
status_endpoint_test.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
testagent.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
testagent_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
translate_addr.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
txn_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
txn_endpoint_test.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
ui_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
ui_endpoint_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
user_event.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
user_event_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
util.go Clean up subprocess handling and make shell use optional (#3509) 2017-10-04 16:48:00 -07:00
util_other.go Clean up subprocess handling and make shell use optional (#3509) 2017-10-04 16:48:00 -07:00
util_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
util_windows.go Clean up subprocess handling and make shell use optional (#3509) 2017-10-04 16:48:00 -07:00
watch_handler.go Clean up subprocess handling and make shell use optional (#3509) 2017-10-04 16:48:00 -07:00
watch_handler_test.go