[
https://issues.apache.org/jira/browse/MESOS-1654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080454#comment-14080454
]
Tobias Weingartner commented on MESOS-1654:
-------------------------------------------
I think that a more general concept resources along with what they cover may be
required. In particular, I think that a resource pool may be bigger than one
slave, or even one "domain". Let me try to explain.
One example would be a pool of IP addresses that could be used to assign ip
addresses to containers. If you happen to have a subnet routed to a
top-of-rack switch, it would make sense to expose this pool of IP addresses as
an allocatable resource, which would be managed across multiple domains
(slaves).
Even within a slave, you may have one domain (the slave itself), or possibly
multiple domains, that you may have resources for, etc. Multiple containers
may allocate resources from a single domain that provides these resources.
Let's assume that we identify resource domains with attributes. In the case of
host based resources, a simple mapping of something like:
{noformat}
attribute:host=$HOSTNAME
cpu:24
mem:24000
...
{noformat}
Would be a method of specifying and having resources show up for each distinct
attribute host. For the previous example of IPs, a possibly similar mapping:
{noformat}
attribute:rack=$RACKNAME
ips={10.0.0.1,10.0.0.2,...}
{noformat}
It may make sense to be able to define some of these resources in a generic
manner at the master level, instead of having every subset of same slaves
(re)define the same resources in the same way. The master may be able to
specify a generic {{attribute:rack=*}} based resource, that is initialized to a
given "full resource set" upon an offer with a currently not existing
attribute. IE: new racks of hosts coming online.
Why do I bring this up? I see the on-slave resources in a similar manner. In
other words, exposing the ephemeral ports per container as a resource, at least
in the case of port based network containerization is the global (slave wide)
allocation of a resource that is then presented at the container level. At the
current time, there is an implicit assumption (at least in the specification of
the resources) that all resources are host based. We also seem to assume that
all resources are uniformly allocatable on a host. They are all independent of
each other.
In the generic case, where a slave host may have 2 network interfaces, with one
being mapped via port range based isolation, and the other network interface
being done via IP based mapping, containers could possibly require resources
from two different pools at different rates.
Will require more thought and hashing out to get my thoughts straight.
> Expose ephemeral ports per container as a resource
> --------------------------------------------------
>
> Key: MESOS-1654
> URL: https://issues.apache.org/jira/browse/MESOS-1654
> Project: Mesos
> Issue Type: Story
> Affects Versions: 0.20.0
> Reporter: Dominic Hamon
> Priority: Critical
>
> Ephemeral port static allocation requires fixed limit of containers per host.
> This is not exposed to frameworks so they will receive TASK_LOST
> notifications without the ability to proactively control this or react
> accordingly.
> By exposing the ephemeral port ranges assigned to containers as a resource,
> frameworks can potentially fit more containers per host, but also won't
> receive offers for slaves that can't run any more tasks due to hitting the
> limit.
--
This message was sent by Atlassian JIRA
(v6.2#6252)