[
https://issues.apache.org/jira/browse/MESOS-3372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14737384#comment-14737384
]
Chad Heuschober commented on MESOS-3372:
----------------------------------------
If we go back to the question I posed above, how would you recommend
accomplishing it? Perhaps I don't understand what you mean by *metrics*.
For the purpose of specificity, let us assume that marathon is the framework in
this case and the application will be run with a UNIQUE host constraint and has
4 instances. Those four instances will be run on 4 different slaves and will
each echo the attributes of the mesos slave on which the task was executed. If
each of my slaves has different values for their attributes I would expect the
output of each task to be different -- representative of the slave on which it
was executed.
The only ways I personally see to make this possible are:
* perform attribute injection in TaskInfo within Mesos
* perform attribute injection in TaskInfo within the framework
* require each task that needs such data have a wrapper (or be custom built to):
** discover its host
** query its host's state (requires some kind of rest client and requires that
permissions allow workloads to query mesos state)
** parse the output (requires a parser)
** apply the discovered information within the to-be executed workload
Is there another way you think this is possible?
> 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": "[email protected]_ID@"
> }
> }
> {code}
> After token replacement:
> {code}
> {
> "discovery": {
> "environment": "RACK_DC131R57"
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)