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

Chad Heuschober commented on MESOS-3372:
----------------------------------------

When last I checked, even though those attributes are part of TaskInfo, I 
cannot inject them wherever I need them in the task. For example, if I need to 
use a slave attribute as a whole or part of a docker environment variable:

{code}
...
                {
                    "id": "my_container",
                    "mem": 256,
                    "env": {
                        "RACK_ID": "$MESOS_AGENT_ATTRS_RACK_ID",
                        "CPU_TYPE": "$MESOS_AGENT_ATTRS_CPU"
                    },
                    "container": {
                        "type": "DOCKER",
                        "docker": {
                            "image": "my/container"
                        }
                    },
                }
...
{code}

> Allow mesos agent attributes to be tokenized in taskInfo
> --------------------------------------------------------
>
>                 Key: MESOS-3372
>                 URL: https://issues.apache.org/jira/browse/MESOS-3372
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Chad Heuschober
>
> Some applications workloads would benefit from having access to the 
> statically defined slave attributes. By processing `taskInfo` on the slave 
> such tokens, as defined in `taskInfo` could be replaced with the appropriate 
> values to achieve such objectives as rack locality.
> Example:
> Before token replacement:
> {code}
> {
>   "discovery": {
>     "environment": "RACK_@MESOS.AGENT.ATTRS.RACK_ID@"
>   }
> }
> {code}
> After token replacement:
> {code}
> {
>   "discovery": {
>     "environment": "RACK_DC131R57"
>   }
> }
> {code}



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

Reply via email to