joh.scheuer
joh.scheuer

Reputation: 576

Mesos on OpenStack VM's Public IP

I have a Setup of 4 CentOS 7.1 VM's which are deployed via OpenStack. They got a public and a private IP address. The host doesn't know the public IP so if I run

ifconfig -a

I only get the private IP address of the host.

Now I want to deploy Mesos 23.0 using the mesosphere packages, at first I deploy the Master with the following options

--cluster="my-cluster" --hostname="<Public-IP>" --log_dir="/var/log/mesos"  --port="5050" --zk="zk://127.0.0.1:2181/mesos" --quorum="1"

the rest of the options are the default Values.

The Slaves get deployed with the following options:

--log_dir=/var/log/mesos --containerizers=docker,mesos --executor_registration_timeout=5mins --hostname=<Public IP> --master=<Master Public IP>:5050

The slaves get added to the cluster but they go direct into the "deactivated" status so I'm not able to run any Framework on my cluster. I can do a telnet to the slaves from the master on 5051. Also I tried to add --ip=<public IP> which results in an bind to error:

Failed to initialize: Failed to bind on <Public IP>:5051: Cannot assign requested address: Cannot assign requested address [99]

because the slave doesn't know it's public IP. And the mesos-slave listens per default on 0.0.0.0

netstat -ltnp | grep ':5051'
tcp        0      0 0.0.0.0:5051            0.0.0.0:*               LISTEN      764/mesos-slave

When I look into the log files from the mesos-master I can see that the slaves anounce themself with their private IP

Slave 20150805-161215-1059104960-5050-715-S1136 at slave(1)@<private IP>:5051 (<Public IP>) disconnected
Disconnecting slave 20150805-161215-1059104960-5050-715-S1136 at slave(1)@<private IP>:5051 (<Public IP>)
Deactivating slave 20150805-161215-1059104960-5050-715-S1136 at slave(1)@<private IP>:5051 (<Public IP>)

Since the VM's can't communicate in the private Network this won't work. Do I have to allow the VM's to talk via their private IP or how can I make my cluster work?

Thanks!

Upvotes: 0

Views: 709

Answers (2)

Fan Jiang
Fan Jiang

Reputation: 11

You can use "--advertise_ip" option to assign your float IP in case you cannot bind to a NIC.

Upvotes: 0

joh.scheuer
joh.scheuer

Reputation: 576

I solved my problem by adding the public IP via ifconfig. Maybe there is a better solution?

We now decided to allow communication between the VM's over the private IP's which also solves the problem.

Upvotes: 1

Related Questions