[ 
https://issues.apache.org/jira/browse/MESOS-2724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14565804#comment-14565804
 ] 

Shuai Lin commented on MESOS-2724:
----------------------------------

Thanks for the quick reply [~tnachen]!


I'm not that familiar with {{DockerContainerizer}} and {{MesosContainerizer}} 
yet. However, I would rather prefer a more generic way to do custom actions 
when a container is launched. Because even if all [~baotiao] wants is to change 
are {{cfs_period_us}} and {{blkio}} limit, it's very likely that different 
containers may need different settings, e.g. based on the user who launched the 
task, or the label of the task.

Actually I'm thinking if one only need to apply the same set of cgroups 
settings to all docker containers, he can always do that by polling docker 
daemon for the list of running containers from time to time, and apply cgroups 
settings for those new containers that has been created since the last poll: 
there is no work need to do on mesos side at all.

But if he wants different cgroups settings for different containers (e.g. based 
on the user who launches the task), then it requires application level logic 
that is external to mesos, and should be triggered by a hook.



> Support running custom commands on slaves when launcing a docker container
> --------------------------------------------------------------------------
>
>                 Key: MESOS-2724
>                 URL: https://issues.apache.org/jira/browse/MESOS-2724
>             Project: Mesos
>          Issue Type: Improvement
>          Components: framework
>            Reporter: chenzongzhi
>            Assignee: Shuai Lin
>
> gWe use mesos + marathon to build our Paas platform. We meet a problem
> We want to execute some command after the docker container started. such as 
> we want change the cgroup setting.
> We know We can execute some command in the  docker container, but we want 
> execute command in the host machine.
> Anyone know how to implement it or any good idea?
>     Thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to