consul/agent
Frank Schroeder 0a9ac9749e
local state: replace multi-map state with structs
The state of the service and health check records was spread out over
multiple maps guarded by a single lock. Access to the maps has to happen
in a coordinated effort and the tests often violated this which made
them brittle and racy.

This patch replaces the multiple maps with a single one for both checks
and services to make the code less fragile.

This is also necessary since moving the local state into its own package
creates circular dependencies for the tests. To avoid this the tests can
no longer access internal data structures which they should not be doing
in the first place.

The tests still don't compile but this is a ncessary step in that
direction.
2017-10-23 10:56:03 +02:00
..
ae agent: refactor sync loop to linear flow of control 2017-10-23 10:56:03 +02:00
config Merge pull request #3585 from hashicorp/document-runtime-config 2017-10-23 10:51:22 +02:00
consul test: replace porter tool with freeport lib 2017-10-21 22:01:09 +02:00
local local state: replace multi-map state with structs 2017-10-23 10:56:03 +02:00
metadata Skips unique node ID check for old versions of Consul. 2017-09-05 22:57:29 -07:00
mock agent: replace docker check 2017-07-18 20:24:38 +02:00
pool Makes RPC handling more robust when rolling servers. (#3561) 2017-10-10 15:19:50 -07:00
router Add segment addr field to tags for LAN flood joiner 2017-08-30 11:58:29 -07:00
structs Fixes agent error handling when check definition is invalid. Distingu… (#3560) 2017-10-10 16:54:06 -07:00
systemd agent: notify systemd after JoinLAN (#2121) 2017-06-21 06:43:55 +02:00
token Adds secure introduction for the ACL replication token. (#3357) 2017-08-03 15:39:31 -07:00
acl.go Revert "local state: tests compile" 2017-10-23 10:08:34 +02: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 Revert "local state: tests compile" 2017-10-23 10:08:34 +02:00
agent.go local state: replace multi-map state with structs 2017-10-23 10:56:03 +02:00
agent_endpoint.go agent: decouple anti-entropy from local state 2017-10-23 10:56:03 +02:00
agent_endpoint_test.go Revert "local state: tests compile" 2017-10-23 10:08:34 +02:00
agent_test.go Revert "local state: tests compile" 2017-10-23 10:08:34 +02:00
bindata_assetfs.go Fixes an XSS issue with unescaped node names. (#3578) 2017-10-16 09:12:36 -07:00
blacklist.go Adds the ability to blacklist specific HTTP endpoints. (#3252) 2017-07-10 13:51:25 -07:00
blacklist_test.go Adds the ability to blacklist specific HTTP endpoints. (#3252) 2017-07-10 13:51:25 -07:00
catalog_endpoint.go agent: consolidate handling of 405 Method Not Allowed (#3405) 2017-09-25 23:11:19 -07:00
catalog_endpoint_test.go Revert "local state: tests compile" 2017-10-23 10:08:34 +02:00
check.go Fixes API client for ScriptArgs and updates documentation. (#3589) 2017-10-18 11:28:39 -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 Fixes API client for ScriptArgs and updates documentation. (#3589) 2017-10-18 11:28:39 -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 dns: return NXDOMAIN if datacenter is invalid (#3200) (#3596) 2017-10-20 16:49:17 -07:00
dns_test.go dns: return NXDOMAIN if datacenter is invalid (#3200) (#3596) 2017-10-20 16:49:17 -07:00
docker.go agent: make docker client work on windows 2017-07-19 12:03:59 +02:00
docker_unix.go agent: make docker client work on windows 2017-07-19 12:03:59 +02:00
docker_windows.go agent: replace docker check 2017-07-18 20:24:38 +02:00
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 Replace time.Now().Sub(x) with time.Since(x) 2017-10-17 20:38:24 +02: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 agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
keyring_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
kvs_endpoint.go agent: drop status code comments 2017-08-23 22:36:23 +02:00
kvs_endpoint_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
notify.go agent: move NotifyGroup into the agent pkg 2017-06-21 05:42:39 +02:00
notify_test.go agent: move NotifyGroup into the agent pkg 2017-06-21 05:42:39 +02:00
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 Replace time.Now().Sub(x) with time.Since(x) 2017-10-17 20:38:24 +02: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 agent: fix code for updated go-discover signature 2017-08-03 21:32:11 +02: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 Revert "local state: fix anti-entropy state tests" 2017-10-23 10:08:34 +02: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 Revert "local state: tests compile" 2017-10-23 10:08:34 +02:00
user_event_test.go Revert "local state: tests compile" 2017-10-23 10:08:34 +02:00
util.go agent: decouple anti-entropy from local state 2017-10-23 10:56:03 +02:00
util_other.go Kill check processes after the timeout is reached (#3567) 2017-10-11 11:57:39 -07:00
util_test.go agent: decouple anti-entropy from local state 2017-10-23 10:56:03 +02:00
util_windows.go Kill check processes after the timeout is reached (#3567) 2017-10-11 11:57:39 -07:00
watch_handler.go Cleans up import sorting. 2017-10-21 20:08:11 -07:00
watch_handler_test.go Cleans up import sorting. 2017-10-21 20:08:11 -07:00