We are testing environment for network disconnect with 3 consul servers (0.6.3), and encountered the following issue:
The server (not the new leader) drops the appendEntries request, without notifying the leader on the stale term.
2016/02/28 11:11:23 [INFO] memberlist: Suspect stratonode15159 has failed, no acks received
2016/02/28 11:11:23 [WARN] raft: Heartbeat timeout reached, starting election
2016/02/28 11:11:23 [INFO] raft: Node at 1.104.195.175:8300 [Candidate] entering Candidate state
2016/02/28 11:11:24 [INFO] memberlist: Suspect stratonode6577 has failed, no acks received
2016/02/28 11:11:24 [WARN] raft: Election timeout reached, restarting election
...
2016/02/28 11:11:23 [INFO] memberlist: Suspect stratonode0 has failed, no acks received
2016/02/28 11:11:23 [WARN] raft: Heartbeat timeout reached, starting election
2016/02/28 11:11:23 [INFO] raft: Node at 1.104.217.177:8300 [Candidate] entering Candidate state
2016/02/28 11:11:23 [INFO] raft: Duplicate RequestVote for same term: 2
2016/02/28 11:11:24 [WARN] raft: Election timeout reached, restarting election
2016/02/28 11:11:24 [INFO] raft: Node at 1.104.217.177:8300 [Candidate] entering Candidate state
2016/02/28 11:11:25 [INFO] raft: Election won. Tally: 2
2016/02/28 11:11:25 [INFO] raft: Node at 1.104.217.177:8300 [Leader] entering Leader state
2016/02/28 11:11:25 [INFO] consul: cluster leadership acquired
2016/02/28 11:11:25 [INFO] consul: New leader elected: stratonode6577
2016/02/28 11:11:25 [INFO] raft: pipelining replication to peer 1.104.251.55:8300
2016/02/28 11:11:25 [WARN] raft: Failed to contact 1.104.195.175:8300 in 509.819706ms
2016/02/28 11:11:25 [WARN] raft: Failed to contact 1.104.195.175:8300 in 977.860525ms
2016/02/28 11:11:26 [INFO] memberlist: Suspect stratonode0 has failed, no acks received
2016/02/28 11:11:26 [WARN] raft: Failed to contact 1.104.195.175:8300 in 1.435647139s
2016/02/28 11:11:28 [INFO] memberlist: Marking stratonode0 as failed, suspect timeout reached
2016/02/28 11:11:28 [INFO] serf: EventMemberFailed: stratonode0 1.104.195.175
2016/02/28 11:11:28 [INFO] consul: removing LAN server stratonode0 (Addr: 1.104.195.175:8300) (DC: stratocluster-18381067762067666372__1_2_1_0_025225eb)
2016/02/28 11:11:28 [INFO] consul: member 'stratonode0' failed, marking health critical
2016/02/28 11:11:29 [INFO] memberlist: Suspect stratonode0 has failed, no acks received
2016/02/28 11:11:33 [ERR] raft: Failed to make RequestVote RPC to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: i/o timeout
2016/02/28 11:11:34 [ERR] raft: Failed to make RequestVote RPC to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: i/o timeout
2016/02/28 11:11:35 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: i/o timeout
2016/02/28 11:11:35 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: i/o timeout
2016/02/28 11:11:45 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: i/o timeout
2016/02/28 11:11:45 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: i/o timeout
...
2016/02/28 11:19:18 [INFO] serf: attempting reconnect to stratonode0 1.104.195.175:8301
2016/02/28 11:19:28 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:19:31 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:19:41 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:19:44 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:19:55 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:19:58 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:20:08 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:20:11 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:20:18 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:20:24 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:20:31 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:20:38 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:20:45 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:20:51 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:20:58 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:21:04 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:21:11 [ERR] raft: Failed to AppendEntries to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:21:18 [ERR] raft: Failed to heartbeat to 1.104.195.175:8300: dial tcp 1.104.195.175:8300: getsockopt: no route to host
2016/02/28 11:21:28 [WARN] raft: Rejecting vote from 1.104.195.175:8300 since we have a leader: 1.104.217.177:8300
2016/02/28 11:21:28 [ERR] raft: peer 1.104.195.175:8300 has newer term, stopping replication
2016/02/28 11:21:28 [INFO] raft: Node at 1.104.217.177:8300 [Follower] entering Follower state
2016/02/28 11:21:28 [INFO] raft: aborting pipeline replication to peer 1.104.251.55:8300 2016/02/28 11:21:28 [INFO] consul: cluster leadership lost
2016/02/28 11:21:29 [WARN] raft: Heartbeat timeout reached, starting election
2016/02/28 11:21:29 [INFO] raft: Node at 1.104.217.177:8300 [Candidate] entering Candidate state
2016/02/28 11:21:29 [INFO] raft: Election won. Tally: 2
2016/02/28 11:21:29 [INFO] raft: Node at 1.104.217.177:8300 [Leader] entering Leader state
2016/02/28 11:21:29 [INFO] consul: cluster leadership acquired
2016/02/28 11:21:29 [INFO] consul: New leader elected: stratonode6577
2016/02/28 11:21:29 [WARN] raft: AppendEntries to 1.104.195.175:8300 rejected, sending older logs (next: 1630)
2016/02/28 11:21:29 [INFO] raft: pipelining replication to peer 1.104.251.55:8300
2016/02/28 11:21:29 [WARN] raft: AppendEntries to 1.104.195.175:8300 rejected, sending older logs (next: 1629)
2016/02/28 11:21:30 [INFO] raft: pipelining replication to peer 1.104.195.175:8300
And the third server:
2016/02/28 11:11:23 [WARN] raft: Rejecting vote from 1.104.217.177:8300 since we have a leader: 1.104.195.175:8300
2016/02/28 11:11:24 [WARN] raft: Heartbeat timeout reached, starting election
2016/02/28 11:11:24 [INFO] raft: Node at 1.104.251.55:8300 [Candidate] entering Candidate state
2016/02/28 11:11:24 [INFO] memberlist: Suspect stratonode0 has failed, no acks received
2016/02/28 11:11:25 [INFO] raft: Node at 1.104.251.55:8300 [Follower] entering Follower state
2016/02/28 11:11:25 [INFO] consul: New leader elected: stratonode6577
2016/02/28 11:11:25 [ERR] http: Request GET /v1/kv/cluster/nodestates?recurse, error: No cluster leader from=127.0.0.1:60137
2016/02/28 11:11:26 [INFO] memberlist: Suspect stratonode0 has failed, no acks received
2016/02/28 11:11:27 [ERR] http: Request GET /v1/kv/cluster/nodestates?recurse, error: No cluster leader from=127.0.0.1:60137
2016/02/28 11:11:28 [ERR] http: Request GET /v1/session/info/f56286a4-ea02-8a9b-d3cd-b51e4c968900, error: No cluster leader from=127.0.0.1:60120
2016/02/28 11:11:28 [INFO] memberlist: Marking stratonode0 as failed, suspect timeout reached
2016/02/28 11:11:28 [INFO] serf: EventMemberFailed: stratonode0 1.104.195.175
2016/02/28 11:11:28 [INFO] consul: removing LAN server stratonode0 (Addr: 1.104.195.175:8300) (DC: stratocluster-18381067762067666372__1_2_1_0_025225eb)
2016/02/28 11:11:28 [INFO] memberlist: Suspect stratonode0 has failed, no acks received
2016/02/28 11:11:29 [ERR] http: Request GET /v1/session/info/f56286a4-ea02-8a9b-d3cd-b51e4c968900, error: No cluster leader from=127.0.0.1:60120
2016/02/28 11:11:30 [ERR] http: Request GET /v1/kv/cluster/nodestates?recurse, error: No cluster leader from=127.0.0.1:60137
2016/02/28 11:11:31 [ERR] http: Request GET /v1/session/info/f56286a4-ea02-8a9b-d3cd-b51e4c968900, error: No cluster leader from=127.0.0.1:60120
2016/02/28 11:11:32 [ERR] agent: coordinate update error: No cluster leader...
2016/02/28 11:21:28 [WARN] raft: Rejecting vote from 1.104.195.175:8300 since we have a leader: 1.104.217.177:8300
2016/02/28 11:21:28 [ERR] http: Request GET /v1/kv/cluster/nodestates?recurse&wait&index=822, error: No cluster leader from=127.0.0.1:61869
2016/02/28 11:21:29 [WARN] raft: Rejecting vote from 1.104.195.175:8300 since we have a leader: 1.104.217.177:8300
2016/02/28 11:21:29 [ERR] http: Request GET /v1/kv/cluster/nodestates?recurse, error: No cluster leader from=127.0.0.1:60137
2016/02/28 11:21:30 [WARN] raft: Rejecting vote from 1.104.217.177:8300 since we have a leader: 1.104.217.177:8300
2016/02/28 11:21:30 [INFO] consul: New leader elected: stratonode6577
Am I correct in understanding the issue?