[ https://issues.apache.org/jira/browse/MESOS-2724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14580336#comment-14580336 ]
chenzongzhi commented on MESOS-2724: ------------------------------------ After see the Hook and Anonymous Module. I find Anonymous Module is not suitable for this ticket. Because Anonymous Module don't inject into Mesos core, The Anonymous Module can't get the container infomation And for Hook Module, as [~lins05] said, we should add a hook after a container is launched. like this way virtual Try<Nothing> slaveAfterLaunchTaskHook( const TaskInfo& taskInfo const SlaveInfo& slaveInfo) in this hook, we can get the cgroup id from taskInfo, and we can set the limit here. My consider here is that shall we need a hook after launch a task? I think this is a generic requirement. Do you guys have any suggestion? [~lins05] [~tnachen] > Support running custom commands on slaves when launching a docker container > --------------------------------------------------------------------------- > > Key: MESOS-2724 > URL: https://issues.apache.org/jira/browse/MESOS-2724 > Project: Mesos > Issue Type: Improvement > Components: framework > Reporter: chenzongzhi > Labels: features > > We 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)