Skip to content

Commit

Permalink
Explicitly set gossip.endpoint in integration test (hyperledger#1455)
Browse files Browse the repository at this point in the history
This change explicitly sets the advertised gossip endpoint to override
the address computed by the peer.

The configuration used for our integration test networks explicitly sets
the listen addresses to the IPv4 loopback address for endpoints other
than the chaincode server. The chaincode server listener is special
because it must be available to chaincode running in docker containers.

We configure the chaincode server to listen on INADDR_ANY and enable
address auto-detection so the peer can try to determine the address to
advertise for the chaincode server.

The auto-detect "feature" has a bizarre side effect in that it takes
precedence over an explicit configuration of the peer.address and this
impacts the advertised address for other subsystems like gossip.

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>
  • Loading branch information
sykesm authored and Sijo Cherian committed Jun 28, 2020
1 parent 624bc77 commit c5b40d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration/nwo/core_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ peer:
timeout: 20s
gossip:
bootstrap: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
endpoint: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
externalEndpoint: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
useLeaderElection: true
orgLeader: false
membershipTrackerInterval: 5s
endpoint:
maxBlockCountToStore: 100
maxPropagationBurstLatency: 10ms
maxPropagationBurstSize: 10
Expand All @@ -52,7 +53,6 @@ peer:
aliveTimeInterval: 5s
aliveExpirationTimeout: 25s
reconnectInterval: 25s
externalEndpoint: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
election:
startupGracePeriod: 15s
membershipSampleInterval: 1s
Expand Down

0 comments on commit c5b40d3

Please sign in to comment.