[
https://issues.apache.org/jira/browse/MESOS-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16139429#comment-16139429
]
Qian Zhang commented on MESOS-7910:
-----------------------------------
We found this issue when reviewing
https://reviews.apache.org/r/60591/#comment259610. When agent is started with
an incorrect port range, it can register with master successfully, see master
log:
{code}
...
I0823 18:11:33.031635 34207 hierarchical.cpp:593] Added agent
46c732f1-21d6-4808-8dd7-1b5961c756b4-S0 (localhost) with
ports:[999999-9999999]; cpus:48; mem:63127; disk:3617760 (allocated: {})
I0823 18:11:33.031163 34228 master.cpp:5943] Registered agent
46c732f1-21d6-4808-8dd7-1b5961c756b4-S0 at slave(1)@127.0.0.1:36251 (localhost)
with
[{"name":"ports","ranges":{"range":[{"begin":999999,"end":9999999}]},"type":"RANGES"},{"name":"cpus","scalar":{"value":48.0},"type":"SCALAR"},{"name":"mem","scalar":{"value":63127.0},"type":"SCALAR"},{"name":"disk","scalar":{"value":3617760.0},"type":"SCALAR"}]
I0823 18:11:33.042551 34228 master.cpp:6688] Received update of agent
46c732f1-21d6-4808-8dd7-1b5961c756b4-S0 at slave(1)@127.0.0.1:36251 (localhost)
with total oversubscribed resources {}
I0823 18:11:33.043072 34214 hierarchical.cpp:660] Agent
46c732f1-21d6-4808-8dd7-1b5961c756b4-S0 (localhost) updated with total
resources ports:[999999-9999999]; cpus:48; mem:63127; disk:3617760
...
{code}
> The ports resource doesn't range check.
> ---------------------------------------
>
> Key: MESOS-7910
> URL: https://issues.apache.org/jira/browse/MESOS-7910
> Project: Mesos
> Issue Type: Bug
> Components: agent
> Reporter: James Peach
> Priority: Minor
>
> The agent doesn't range check the port resource, so it is possible to specify
> something non-sensical:
> {noformat}
> $ sudo /opt/mesos/agent --resources="ports:[999999-9999999]"
> ...
> New agent info:
> hostname: "jpeach.apple.com"
> resources {
> name: "ports"
> type: RANGES
> ranges {
> range {
> begin: 999999
> end: 9999999
> }
> }
> }
> resources {
> name: "cpus"
> type: SCALAR
> scalar {
> value: 12
> }
> }
> resources {
> name: "mem"
> type: SCALAR
> scalar {
> value: 63374
> }
> }
> resources {
> name: "disk"
> type: SCALAR
> scalar {
> value: 250519
> }
> }
> checkpoint: true
> port: 5051
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)