Skip to content

Commit 1ab5328

Browse files
committed
Fixed #79, port allocation in case of using --starter.address=127.0.0.1 with --starter.local
1 parent 4790ff8 commit 1ab5328

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Changes from version 0.9.0 to master
2+
3+
- Fixed port allocation in case of using `--starter.address=127.0.0.1` with `--starter.local` (#79)
4+
15
# Changes from version 0.8.2 to 0.9.0
26

37
- Added `--docker.imagePullPolicy` option

service/cluster_config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,12 @@ func (p ClusterConfig) IDs() []string {
124124
// GetFreePortOffset returns the first unallocated port offset.
125125
func (p ClusterConfig) GetFreePortOffset(peerAddress string, basePort int, allPortOffsetsUnique bool) int {
126126
portOffset := 0
127+
peerAddress = normalizeHostName(peerAddress)
127128
for {
128129
found := false
129130
for _, p := range p.AllPeers {
130131
if p.PortRangeOverlaps(basePort + portOffset) {
131-
if allPortOffsetsUnique || p.Address == peerAddress {
132+
if allPortOffsetsUnique || normalizeHostName(p.Address) == peerAddress {
132133
found = true
133134
break
134135
}

0 commit comments

Comments
 (0)