You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2013/02/06 02:44:12 UTC

[jira] [Commented] (MESOS-334) Shell executor doesn't export the mesos_task_id as a shell variable.

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

Benjamin Mahler commented on MESOS-334:
---------------------------------------

Hey Flo,

You can do this pretty simply by adding MESOS_TASK_ID to your CommandInfo.environment when launching the task.

Inside your scheduler:
  TaskID taskId;
  taskId.setValue("foo");

  TaskInfo task;
  ...
  Environment::Variable* variable = task.mutable_command()->mutable_environment()->add_variables();
  variable->set_name("MESOS_TASK_ID");
  variable->set_value(taskId.value());

Does that work for you?
                
> Shell executor doesn't export the mesos_task_id as a shell variable. 
> ---------------------------------------------------------------------
>
>                 Key: MESOS-334
>                 URL: https://issues.apache.org/jira/browse/MESOS-334
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Florian Leibert (flo)
>            Assignee: Benjamin Mahler
>
> The shell executor should export the mesos_task_id such that it can be used for out-of-band communication about tasks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira