Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Port conflict trouble when separate machines are specified #232

Closed
cdavisafc opened this issue Jan 19, 2020 · 2 comments · Fixed by #233
Closed

Port conflict trouble when separate machines are specified #232

cdavisafc opened this issue Jan 19, 2020 · 2 comments · Fixed by #233
Assignees

Comments

@cdavisafc
Copy link

cdavisafc commented Jan 19, 2020

Attached are two footloose manifests.

  • One has a single machine specification (including portMappings) and requests 2 machines
  • The other has two identical machine specifications (including identical portMappings) and requests 1 of each of these machines (with different base names)

Running footloose create with the former succeeds, but with the latter fails reporting ports being unavailable.

Why?

INFO[0000] Creating SSH key: cluster-key ...
INFO[0000] Image: quay.io/footloose/centos7:0.6.0 present locally
INFO[0000] Creating machine: firekube-node0 ...
INFO[0001] Creating machine: firekube-node1 ...

> footloose delete -c footloose_2machines_1machinespec.yaml
INFO[0000] Machine firekube-node0 is started, stopping and deleting machine...
INFO[0000] Machine firekube-node1 is started, stopping and deleting machine...

> footloose create -c footloose_2machines_2machinespecs.yaml
INFO[0000] Image: quay.io/footloose/centos7:0.6.0 present locally
INFO[0000] Image: quay.io/footloose/centos7:0.6.0 present locally
INFO[0000] Creating machine: firekube-master0 ...
INFO[0001] Creating machine: firekube-worker0 ...
ERRO[0001] Error response from daemon: driver failed programming external connectivity on endpoint firekube-worker0 (1c9f2625b25f7f7ec2c2f69c1de2e94f50969a9fcf9d159e72b2109c3c212e92): Bind for 0.0.0.0:30443 failed: port is already allocated
ERRO[0001] Error: failed to start containers: firekube-worker0
FATA[0001] exit status 1

footloose_2machines_1machinespec.yaml.txt
footloose_2machines_2machinespecs.yaml.txt

@chanwit chanwit self-assigned this Jan 19, 2020
@chanwit
Copy link
Member

chanwit commented Jan 19, 2020

currently, it's been designed like this.
if we create machines from the same spec like node0 , node1, port numbers will be mapped with an increment variable.

while when we have master0 and worker0 specs , both start from index 0 but have the similar port mapping spec. so their port mappings collide.

@chanwit
Copy link
Member

chanwit commented Jan 19, 2020

@dlespiau wdyt if this might be a bug?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants