Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-2220

Support using MESOS_TASK_ID in app definitions

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Mesos Integration
    • Labels:

      Description

      It would be very useful to be able to use mesos task IDs in context of docker labels. This would enable users to query containers by mesos task id and find the container they are looking for:

      $ docker ps --filter label=mesos_task_id="myapp.d07b42e2-6b85-11e6-8aec-fa163ed2b060"
      

      Docker labels can also be utilized to map logs to mesos tasks:

      When shipping container logs with filebeat, container labels are used to tag loglines. To have mesos task id as a container label would allow one-to-one mapping between log lines and mesos tasks. This way searching logs of a specific mesos task would be a breeze.

      Application definition file to illustrate the idea:

      {
          "id": "myapp",
          "cpus": 0.2,
          "mem": 128,
          "container": {
              "type": "DOCKER",
              "docker": {
                  "image": "myapp",
                  "parameters": [
                      { "key": "label", "value": "mesos_task_id=$MESOS_TASK_ID"}
                  ]
              }
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              GitHub_aseppala Antti Seppälä (Inactive)
              Team:
              Orchestration Team
              Watchers:
              Jason Gilanfarr (Inactive), Matthias Eichstedt
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: