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

Health check command is not interpolated and sent as raw string to mesos

    Details

      Description

      I defined a mesos command executor health check, following the API documentation:

      "healthChecks": [{
                      "protocol": "COMMAND",
                      "command": { "value": "curl -f -X GET http://$HOST:$PORT0/dashboard/" },
                      "gracePeriodSeconds": 10,
                      "intervalSeconds": 10,
                      "portIndex": 0,
                      "timeoutSeconds": 10,
                      "maxConsecutiveFailures": 3
                  }]
      

      The command is not interpolated by Marathon with the task's environment. Hence, it is sent to Mesos leading to the following line the Mesos task log:

      /usr/local/libexec/mesos/mesos-health-check --executor=10.0.0.1:8945 --health_check_json={"command":

      {"shell":true,"value":"curl -f -X GET http:\/\/$HOST:$PORT0\/dashboard\/"}

      ,"consecutive_failures":3,"delay_seconds":0,"grace_period_seconds":10,"interval_seconds":10,"timeout_seconds":10} --task_id=master_services_backend.ff9b5375-4953-11e4-a7a4-56960139be21

      I replaced the command in this command line with "set" and rerun it, showing me the environment of the health check. PORT0 and HOST are not part of it. Hence, the health check fails.

        Attachments

          Activity

            People

            • Assignee:
              GitHub_ConnorDoyle Connor Doyle (Inactive)
              Reporter:
              sttts Stefan Schimanski (Inactive)
              Team:
              Orchestration Team
              Watchers:
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: