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/resourcesports(*):[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