Hi Klaus,

Thank you for the quick reply.

One quick question:

I have some of the ports like 8400,8500,8600 which are already in use by
consul agent running on each mesos slave. But they are also being announced
by each mesos slave. Will this cause any problem to tasks which maybe
assigned those ports in future by mesos ?

Thanks

On Tue, Mar 29, 2016 at 11:01 AM, Klaus Ma <klaus1982...@gmail.com> wrote:

> Yes, all port resources must be ranges for now, e.g. 31000-35000.
>
> There’s already JIRA (MESOS-4627: Improve Ranges parsing to handle single
> values) on that, patches are pending on review :).
>
> ----
> Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
> Platform OpenSource Technology, STG, IBM GCG
> +86-10-8245 4084 | klaus1982...@gmail.com | http://k82.me
>
>
> ------------------------------
> Date: Tue, 29 Mar 2016 10:51:44 +0100
> Subject: Port Resource Offers
> From: pradeep.chhetr...@gmail.com
> To: user@mesos.apache.org
>
>
> 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
>



-- 
Regards,
Pradeep Chhetri

Reply via email to