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

Felix Abecassis edited comment on MESOS-3366 at 9/4/15 9:13 PM:
----------------------------------------------------------------

I totally agree with the two previous comments. Just to provide a more concrete 
example: a wrapper script often ends with something like "exec mesos-slave 
$\{FLAGS\}". The script uses custom logic to construct the command-line 
arguments that are relevant during deployment (e.g. IP, datacenter name, OS 
version, etc).
Now, let's say you want to add accelerators detection when starting the slave, 
the code for doing can be complex. We cannot simply provide our own script 
because we cannot capture the custom logic that already exists, I don't see a 
simple/standard way to chain the existing script with the new script doing 
accelerator discovery.
The approach taken in https://issues.apache.org/jira/browse/MESOS-2902 is to 
specify a script on the command-line, but for resources it seems more complex 
since hooks might decide to override the default values. Also, we clearly don't 
want to start adding "gpu_discovery_command" and then "nic_discovery_command", 
etc.


was (Author: flx42):
I totally agree with the two previous comments. Just to provide a more concrete 
example: a wrapper script often ends with something like "exec mesos-slave 
${FLAGS}". The script uses custom logic to construct the command-line arguments 
that are relevant during deployment (e.g. IP, datacenter name, OS version, etc).
Now, let's say you want to add accelerators detection when starting the slave, 
the code for doing can be complex. We cannot simply provide our own script 
because we cannot capture the custom logic that already exists, I don't see a 
simple/standard way to chain the existing script with the new script doing 
accelerator discovery.
The approach taken in https://issues.apache.org/jira/browse/MESOS-2902 is to 
specify a script on the command-line, but for resources it seems more complex 
since hooks might decide to override the default values. Also, we clearly don't 
want to start adding "gpu_discovery_command" and then "nic_discovery_command", 
etc.

> Allow resources/attributes discovery
> ------------------------------------
>
>                 Key: MESOS-3366
>                 URL: https://issues.apache.org/jira/browse/MESOS-3366
>             Project: Mesos
>          Issue Type: Improvement
>          Components: slave
>            Reporter: Felix Abecassis
>
> In heterogeneous clusters, tasks sometimes have strong constraints on the 
> type of hardware they need to execute on. The current solution is to use 
> custom resources and attributes on the agents. Detecting non-standard 
> resources/attributes requires wrapping the "mesos-slave" binary behind a 
> script and use custom code to probe the agent. Unfortunately, this approach 
> doesn't allow composition. The solution would be to provide a hook/module 
> mechanism to allow users to use custom code performing resources/attributes 
> discovery.
> Please review the detailed document below:
> https://docs.google.com/document/d/15OkebDezFxzeyLsyQoU0upB0eoVECAlzEkeg0HQAX9w
> Feel free to express comments/concerns by annotating the document or by 
> replying to this issue.



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

Reply via email to