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

Command Health Checks Silent Validation Changes

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Health & Readiness
    • Labels:

      Description

      For Mesos command health checks should support argv and marathon doesn't seem to handle them correctly.    That is filed on another JIRA.   This JIRA is the fact that this code

      "healthChecks": [
        {
          "gracePeriodSeconds": 300,
          "intervalSeconds": 60,
          "maxConsecutiveFailures": 3,
          "timeoutSeconds": 20,
          "delaySeconds": 15,
          "command": {
            "shell": false,
            "value": "bash",
            "argv": ["-c", "\"</dev/tcp/$HOST/$PORT0\""]
          },
          "protocol": "COMMAND"
        }
      ],
      

      Is accepted... in other words it passes validation... and when asked to get the details back it is this code:

      "healthChecks": [
        {
          "gracePeriodSeconds": 300,
          "intervalSeconds": 60,
          "maxConsecutiveFailures": 3,
          "timeoutSeconds": 20,
          "delaySeconds": 15,
          "protocol": "COMMAND",
          "command": {
            "value": "bash"
          }
        }
      ],

       

      We should NEVER silently change the contents of the appdef without warning or error.   It is either valid JSON or it is NOT.   According to haosdent on Apr 17 of https://github.com/mesosphere/marathon/issues/3333

      According to https://github.com/apache/mesos/blob/master/include/mesos/mesos.proto

      command == CommandInfo

      https://github.com/apache/mesos/blob/master/include/mesos/mesos.proto#L593

      and CommandInfo takes arguments:  https://github.com/apache/mesos/blob/master/include/mesos/mesos.proto#L693

      replacing `argv` with `arguments` doesn't work.

       

      This JIRA is specifically that healthchecks should be validated and when NOT valid should fail with a validation error.

      Useful link to code:  https://github.com/mesosphere/marathon/blob/05d1cce91fc7a7a54f573da42619e0e8dde5f38f/src/main/scala/mesosphere/marathon/raml/HealthCheckConversion.scala#L23-L28

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ken Ken Sipe
                Reporter:
                ken Ken Sipe
                Team:
                Orchestration Team
                Watchers:
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: