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

/v2/apps/{appId}/tasks throws exceptions

    Details

      Description

      In EndpointsHelper we see for ((port, i) <- app.ports.zipWithIndex) { ....

      This code is unsafe: the logic assumes that each running task has the same number of ports as the associated app definition. However, the task could have been launched with a older app version that specified fewer ports. In this case, Marathon throws the following exception:

      java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
          at java.util.ArrayList.rangeCheck(ArrayList.java:638)
          at java.util.ArrayList.get(ArrayList.java:414)
          at java.util.Collections$UnmodifiableList.get(Collections.java:1369)
          at mesosphere.marathon.Protos$MarathonTask.getPorts(Protos.java:5342)
          at mesosphere.marathon.api.EndpointsHelper$$anonfun$appsToEndpointString$1$$anonfun$apply$3$$anonfun$apply$4.apply(EndpointsHelper.scala:33)
          at mesosphere.marathon.api.EndpointsHelper$$anonfun$appsToEndpointString$1$$anonfun$apply$3$$anonfun$apply$4.apply(EndpointsHelper.scala:32)
      ...
      

        Attachments

          Activity

            People

            • Assignee:
              GitHub_drexin Dario Rexin (Inactive)
              Reporter:
              GitHub_ConnorDoyle Connor Doyle (Inactive)
              Team:
              Orchestration Team
              Watchers:
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: