hashicorp / hashicorp/consul

bind_addr and serf_lan completely ignored in favour of advertise_addr

Open
#8,125 0 comments 0 reactions 0 assignees View on GitHub
type/question
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

#### Overview of the Issue

I am attempting data-plane, control-plane separation.

I would like the nodes to gossip on one network and be resolvable on another network... Which seems to be the point of the `serf_lan` config option.

#### Reproduction Steps
```json
{
"server": true,
"advertise_addr": "2001::1",
"serf_lan": "10.0.0.1",
...
}
```
Optionally setting bind_addr seems to have no effect
```json
"bind_addr": "10.0.0.1",
```

### Consul info for both Client and Server

```
agent:
check_monitors = 0
check_ttls = 0
checks = 0
services = 1
build:
prerelease =
revision = d149d7e9
version = 1.7.4
consul:
acl = disabled
bootstrap = true
known_datacenters = 1
leader = true
leader_addr = [2001:0000:0000:0000:0000:0000:0000:0001]:8300
server = true
raft:
applied_index = 1726
commit_index = 1726
fsm_pending = 0
last_contact = 0
last_log_index = 1726
last_log_term = 12
last_snapshot_index = 0
last_snapshot_term = 0
latest_configuration = [{Suffrage:Voter ID:ff2f15a2-0c6c-6ca6-6163-9d448c253d4e Address:[2001:0000:0000:0000:0000:0000:0000:0001]:8300}]
latest_configuration_index = 0
num_peers = 0
protocol_version = 3
protocol_version_max = 3
protocol_version_min = 0
snapshot_version_max = 1
snapshot_version_min = 0
state = Leader
term = 12
runtime:
arch = amd64
cpu_count = 2
goroutines = 73
max_procs = 2
os = linux
version = go1.13.12
serf_lan:
coordinate_resets = 0
encrypted = true
event_queue = 0
event_time = 12
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 50
members = 4
query_queue = 0
query_time = 1
serf_wan:
coordinate_resets = 0
encrypted = true
event_queue = 0
event_time = 1
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 1
members = 1
query_queue = 0
query_time = 1
```

### Operating system and Environment details

Debian Buster

### Log Fragments

According to the log on the client it is trying to gossip with the server's advertise address...
```
Jun 16 22:27:09 buster consul[26755]: memberlist: Failed to send ping: write udp 10.0.0.11:8301->[2001:0000:0000:0000:0000:0000:0000:0001]:8301: address 2001:0000:0000:0000:0000:0000:0000:0001: non-IPv4 address
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the configuration using advertise_addr, serf_lan, and bind_addr, then start from the client log showing the UDP attempt to the advertise address. Trace how these addresses are applied to LAN gossip and verify that the configured gossip address is used without the reported non-IPv4 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.