Hello,

I am running mesos slaves with the modified port announcement.

$ cat /etc/mesos-slave/resources
ports(*):[6379, 9200, 9300, 27017, 31000-35000]

I can that this is being picked up when starting the mesos slaves in ps
output:

--resources=ports(*):[6379, 9200, 9300, 27017, 31000-35000]

However, when i hit the /state.json endpoint of mesos-master, I am seeing
this:


​
I can see the tasks are being assigned ports in the range of 9300-27017.
There are some of these ports which are already used by other applications
running on each mesos slaves but are being announced. I am not sure if this
will cause some issue. I am assuming that it will always check if the port
is already binded by some other process before assigning port to a task.

By going through the code and test cases, it looks like it always expect
port resource in ranges.

https://github.com/apache/mesos/blob/master/src/v1/resources.cpp#L1255-L1263

So I guess, I should always define ports in ranges rather than individual
port.

It will be helpful if someone can confirm if it is the expected behaviour
and my configuration is wrong.

-- 
Regards,
Pradeep Chhetri

Reply via email to