open-consul/agent/consul
Pierre Souchay 3d0a960470 When renaming a node, ensure the name is not taken by another node.
Since DNS is case insensitive and DB as issues when similar names with different
cases are added, check for unicity based on case insensitivity.

Following another big incident we had in our cluster, we also validate
that adding/renaming a not does not conflicts with case insensitive
matches.

We had the following error once:

 - one node called: mymachine.MYDC.mydomain was shut off
 - another node (different ID) was added with name: mymachine.mydc.mydomain before
   72 hours

When restarting the consul server of domain, the consul server restarted failed
to start since it detected an issue in RAFT database because
mymachine.MYDC.mydomain and mymachine.mydc.mydomain had the same names.

Checking at registration time with case insensitivity should definitly fix
those issues and avoid Consul DB corruption.
2018-07-11 14:42:54 +02:00
..
autopilot Improve autopilot shutdown to be idempotent 2018-02-20 15:51:59 -08:00
fsm agent/consul/fsm: begin using testify/assert 2018-03-06 09:48:15 -08:00
prepared_query Add agent.segment interpolation to prepared queries 2017-08-30 11:58:29 -07:00
state When renaming a node, ensure the name is not taken by another node. 2018-07-11 14:42:54 +02:00
acl.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
acl_endpoint.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
acl_endpoint_test.go acl: consolidate error handling (#3401) 2017-08-23 16:52:48 +02:00
acl_replication.go Spelling (#3958) 2018-03-19 16:56:00 +00:00
acl_replication_test.go Replace time.Now().Sub(x) with time.Since(x) 2017-10-17 20:38:24 +02:00
acl_test.go Bumps default Raft protocol to version 3. (#3477) 2017-09-25 15:27:04 -07:00
autopilot.go remove golint warnings 2018-01-28 22:40:13 +04:00
autopilot_oss.go Fix vet error 2017-12-18 18:04:42 -08:00
autopilot_test.go Test autopilots start/stop idempotency 2018-02-21 10:19:30 -08:00
catalog_endpoint.go Spelling (#3958) 2018-03-19 16:56:00 +00:00
catalog_endpoint_test.go Move check definition to a sub-struct 2017-11-01 14:54:46 -07:00
client.go Moves the LAN event handler after the router is created. 2017-11-10 12:26:48 -08:00
client_serf.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
client_test.go Removes bogus getPort() in favor of freeport. 2017-11-08 19:55:50 -08:00
config.go Make some final tweaks to autopilot package 2017-12-18 12:26:47 -08:00
coordinate_endpoint.go Fill out the tests around coordinate/node functionality 2017-10-31 15:36:44 -07:00
coordinate_endpoint_test.go Fill out the tests around coordinate/node functionality 2017-10-31 15:36:44 -07:00
filter.go Revert "Return 403 rather than a 404 when acls cause all results to be filter…" 2017-08-09 15:06:57 -07:00
filter_test.go Introduce Code Policy validation via sentinel, with a noop implementation 2017-09-25 13:44:55 -05:00
flood.go Add segment addr field to tags for LAN flood joiner 2017-08-30 11:58:29 -07:00
health_endpoint.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
health_endpoint_test.go Adds open source side of network segments (feature is Enterprise-only). 2017-08-30 11:58:29 -07:00
helper_test.go Cleans up some drift between the OSS and Enterprise trees. 2017-10-11 15:53:07 -07:00
internal_endpoint.go Cleans up formatting. 2017-09-07 12:26:58 -07:00
internal_endpoint_test.go acl: consolidate error handling (#3401) 2017-08-23 16:52:48 +02:00
issue_test.go Moves the FSM into its own package. 2017-11-29 18:36:53 -08:00
kvs_endpoint.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
kvs_endpoint_test.go Replace time.Now().Sub(x) with time.Since(x) 2017-10-17 20:38:24 +02:00
leader.go Make sure revokeLeadership is called if establishLeadership errors 2018-02-21 12:33:22 -06:00
leader_test.go Spelling (#3958) 2018-03-19 16:56:00 +00:00
merge.go Takes the skip out of the client check. 2017-09-06 17:05:40 -07:00
merge_test.go Skips unique node ID check for old versions of Consul. 2017-09-05 22:57:29 -07:00
operator_autopilot_endpoint.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
operator_autopilot_endpoint_test.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
operator_endpoint.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_raft_endpoint.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
operator_raft_endpoint_test.go Removes bogus getPort() in favor of freeport. 2017-11-08 19:55:50 -08:00
prepared_query_endpoint.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
prepared_query_endpoint_test.go acl: consolidate error handling (#3401) 2017-08-23 16:52:48 +02:00
raft_rpc.go agent: move conn pool for muxed connections into separate pkg 2017-06-21 05:42:39 +02:00
rpc.go fix globalRPC goroutine leak 2017-12-05 11:53:30 +08:00
rpc_test.go Moves the FSM into its own package. 2017-11-29 18:36:53 -08:00
rtt.go Added Coordinate.Node rpc endpoint and client api method 2017-10-26 19:16:40 -07:00
rtt_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
segment_oss.go Renames stubs to be more consistent. 2017-11-29 18:36:52 -08:00
serf_test.go pkg refactor 2017-06-10 18:52:45 +02:00
server.go Move autopilot health loop into leader operations 2018-01-23 11:17:41 -08:00
server_lookup.go More cleanup from code review 2017-08-30 12:31:36 -05:00
server_lookup_test.go More cleanup from code review 2017-08-30 12:31:36 -05:00
server_oss.go Fixes a go fmt cleanup. 2017-12-20 13:43:38 -08:00
server_serf.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
server_test.go Spelling (#3958) 2018-03-19 16:56:00 +00:00
session_endpoint.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
session_endpoint_test.go acl: consolidate error handling (#3401) 2017-08-23 16:52:48 +02:00
session_timers.go address review comments 2017-07-07 09:22:34 +02:00
session_timers_test.go rpc: refactor sessionTimers and fix racy tests 2017-07-07 09:22:34 +02:00
session_ttl.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
session_ttl_test.go Moves the FSM into its own package. 2017-11-29 18:36:53 -08:00
snapshot_endpoint.go acl: consolidate error handling (#3401) 2017-08-23 16:52:48 +02:00
snapshot_endpoint_test.go Cleans up some edge cases in TestSnapshot_Forward_Leader. 2017-09-26 14:07:28 -07:00
stats_fetcher.go More refactoring to make autopilot consul-agnostic 2017-12-12 17:46:28 -08:00
stats_fetcher_test.go More refactoring to make autopilot consul-agnostic 2017-12-12 17:46:28 -08:00
status_endpoint.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
status_endpoint_test.go rpc: run agent/consul tests in parallel 2017-07-07 09:22:34 +02:00
txn_endpoint.go Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
txn_endpoint_test.go acl: consolidate error handling (#3401) 2017-08-23 16:52:48 +02:00
util.go remove golint warnings 2018-01-28 22:40:13 +04:00
util_test.go pkg refactor 2017-06-10 18:52:45 +02:00