Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support WAN and LAN Serf Bind Addresses #2380

Closed

Conversation

moofish32
Copy link
Contributor

@slackpad - I am not sure about the non-loopback IP test. I couldn't think of a better way to do this. I need to verify I didn't break any tests, but it should behave the same as the current defaults.

@moofish32
Copy link
Contributor Author

@slackpad -- from what I see running this locally the failing tests are not differing from the list on master. They are not always the same errors as I think you know.

@moofish32
Copy link
Contributor Author

Without a full test setup, I did some quick local checks:

 …/consul/bin   feature/serf-binds-2007  ./consul agent -dev -bind 127.0.0.1 -serf-wan-bind 192.168.1.35 -serf-lan-bind 192.168.1.35   
==>Starting Consul agent
==>Starting Consul agent RPC
==>Consul agent running!
Version: '0.7.1-dev'
Node name: 'SDGL132b22a27.local'
Datacenter: 'dc1'
Server: true (bootstrap: false)
Client Addr: 127.0.0.1 (HTTP: 8500, HTTPS: -1, DNS: 8600, RPC: 8400)
Cluster Addr: 127.0.0.1 (LAN: 8301, WAN: 8302)
Gossip encrypt: false, RPC-TLS: false, TLS-Incoming: false
Atlas: <disabled>
 ==>Log data will now stream in as it occurs:

2016/10/10 09:59:16 [INFO] raft: Initial configuration (index=1): [{Suffrage:Voter ID:127.0.0.1:8300 Address:127.0.0.1:8300}]
2016/10/10 09:59:16 [INFO] raft: Node at 127.0.0.1:8300 [Follower] entering Follower state (Leader: "")
2016/10/10 09:59:16 [INFO] serf: EventMemberJoin: SDGL132b22a27.local 127.0.0.1
2016/10/10 09:59:16 [INFO] consul: Adding LAN server SDGL132b22a27.local (Addr: tcp/127.0.0.1:8300) (DC: dc1)
2016/10/10 09:59:16 [INFO] serf: EventMemberJoin: SDGL132b22a27.local.dc1 127.0.0.1
2016/10/10 09:59:16 [INFO] consul: Adding WAN server SDGL132b22a27.local.dc1 (Addr: tcp/127.0.0.1:8300) (DC: dc1)
2016/10/10 09:59:22 [WARN] raft: Heartbeat timeout from "" reached, starting election
2016/10/10 09:59:22 [INFO] raft: Node at 127.0.0.1:8300 [Candidate] entering Candidate state in term 2
2016/10/10 09:59:22 [DEBUG] raft: Votes needed: 1
2016/10/10 09:59:22 [DEBUG] raft: Vote granted from 127.0.0.1:8300 in term 2. Tally: 1
2016/10/10 09:59:22 [INFO] raft: Election won. Tally: 1
2016/10/10 09:59:22 [INFO] raft: Node at 127.0.0.1:8300 [Leader] entering Leader state
2016/10/10 09:59:22 [INFO] consul: cluster leadership acquired
2016/10/10 09:59:22 [INFO] consul: New leader elected: SDGL132b22a27.local
2016/10/10 09:59:22 [DEBUG] consul: reset tombstone GC to index 3
2016/10/10 09:59:22 [INFO] consul: member 'SDGL132b22a27.local' joined, marking health alive
2016/10/10 09:59:22 [INFO] agent: Synced service 'consul'
2016/10/10 09:59:22 [DEBUG] agent: Node info in sync
2016/10/10 10:01:08 [DEBUG] agent: Service 'consul' in sync
2016/10/10 10:01:08 [DEBUG] agent: Node info in sync

In another terminal I verified the LISTEN ports appear correct

#empty before start
 …/code/test  netstat -an | grep LISTEN | grep 830
#not empty after start
 …/code/test  netstat -an | grep LISTEN | grep 830
tcp4       0      0  192.168.1.35.8302     *.*                    LISTEN
tcp4       0      0  192.168.1.35.8301     *.*                    LISTEN
tcp4       0      0  127.0.0.1.8300         *.*                    LISTEN

…an and lan bind addresses

* updating documentation for serf wan and lan options
Fixes hashicorp#2007
@moofish32 moofish32 force-pushed the feature/serf-binds-2007 branch from 24dd786 to 4040229 Compare October 10, 2016 22:26
@moofish32
Copy link
Contributor Author

@slackpad - one more bump during the merge party

@slackpad slackpad added this to the 0.7.1 milestone Oct 27, 2016
slackpad added a commit that referenced this pull request Nov 3, 2016
slackpad added a commit that referenced this pull request Nov 3, 2016
* * adding cli config and config file support for specifying the serf wan and lan bind addresses
* updating documentation for serf wan and lan options
Fixes #2007

* Cleans up some small things from #2380.

* Uses the bind default for the agent test for Serf WAN and LAN.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants