Details

      Description

      Network normalization issue

      This regression was detected by our integration test suite, test_vip in test_networking.py.

      In the test, we post the following JSON:

      {
        "id": "integration-test-eefa27051a3641119741a4c57f1c23a2",
        "cmd": "/opt/mesosphere/bin/dcos-shell python /opt/mesosphere/active/dcos-integration-test/util/python_test_server.py 16208",
        "acceptedResourceRoles": [
          "*",
          "slave_public"
        ],
        "constraints": [
          [
            "hostname",
            "CLUSTER",
            "10.10.0.134"
          ]
        ],
        "healthChecks": [
          {
            "gracePeriodSeconds": 5,
            "timeoutSeconds": 10,
            "path": "/ping",
            "maxConsecutiveFailures": 3,
            "intervalSeconds": 10,
            "port": 16208,
            "protocol": "HTTP"
          }
        ],
        "cpus": 0.1,
        "env": {
          "HOME": "/",
          "DCOS_TEST_UUID": "eefa27051a3641119741a4c57f1c23a2"
        },
        "mem": 32,
        "instances": 1,
        "container": {
          "volumes": [
            {
              "mode": "RO",
              "containerPath": "/opt/mesosphere",
              "hostPath": "/opt/mesosphere"
            }
          ],
          "docker": {
            "image": "debian:jessie"
          },
          "type": "MESOS"
        },
        "ipAddress": {
          "discovery": {
            "ports": [
              {
                "number": 16208,
                "labels": {
                  "VIP_0": "/namedvip:31208"
                },
                "name": "test",
                "protocol": "tcp"
              }
            ]
          },
          "networkName": "dcos"
        }
      }
      

      The normalization process drops the labels for the ports item ("VIP_0": "/namedvip:31208"). When we get the created app, we see the following normalized JSON result (note that there is no mention of VIP_0):

      {
        "id": "/integration-test-eefa27051a3641119741a4c57f1c23a2",
        "acceptedResourceRoles": [
          "*",
          "slave_public"
        ],
        "backoffFactor": 1.15,
        "backoffSeconds": 1,
        "cmd": "/opt/mesosphere/bin/dcos-shell python /opt/mesosphere/active/dcos-integration-test/util/python_test_server.py 16208",
        "constraints": [
          [
            "hostname",
            "CLUSTER",
            "10.10.0.134"
          ]
        ],
        "container": {
          "type": "MESOS",
          "docker": {
            "forcePullImage": false,
            "image": "debian:jessie",
            "parameters": [],
            "privileged": false
          },
          "volumes": [
            {
              "containerPath": "/opt/mesosphere",
              "hostPath": "/opt/mesosphere",
              "mode": "RO"
            }
          ],
          "portMappings": [
            {
              "containerPort": 16208,
              "labels": {},
              "name": "test",
              "protocol": "tcp",
              "servicePort": 0
            }
          ]
        },
        "cpus": 0.1,
        "disk": 0,
        "env": {
          "HOME": "/",
          "DCOS_TEST_UUID": "eefa27051a3641119741a4c57f1c23a2"
        },
        "executor": "",
        "healthChecks": [
          {
            "gracePeriodSeconds": 5,
            "ignoreHttp1xx": false,
            "intervalSeconds": 10,
            "maxConsecutiveFailures": 3,
            "path": "/ping",
            "port": 16208,
            "protocol": "HTTP",
            "timeoutSeconds": 10,
            "delaySeconds": 15
          }
        ],
        "instances": 1,
        "labels": {},
        "maxLaunchDelaySeconds": 3600,
        "mem": 32,
        "gpus": 0,
        "networks": [
          {
            "name* Connection #0 to host marathon.mesos left intact": "dcos",
            "mode": "container"
          }
        ],
        "requirePorts": false,
        "upgradeStrategy": {
          "maximumOverCapacity": 1,
          "minimumHealthCapacity": 1
        },
        "version": "2017-05-27T00:04:07.622Z",
        "killSelection": "YOUNGEST_FIRST",
        "unreachableStrategy": {
          "inactiveAfterSeconds": 300,
          "expungeAfterSeconds": 600
        },
        "tasksStaged": 0,
        "tasksRunning": 0,
        "tasksHealthy": 0,
        "tasksUnhealthy": 0,
        "deployments": [
          {
            "id": "8aed7794-41a1-48c1-b851-d293d2ce3327"
          }
        ],
        "tasks": []
      }
      

      Migration issue

      Upon discovery of the former, [~james] keenly spotted that the migration was missing this as well. To reproduce, post the above app-def to Marathon 1.4.x, then run the migrations to 1.5.x, and see the labels get dropped.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tharper Tim Harper
                Reporter:
                tharper Tim Harper
                Team:
                Orchestration Team
                Watchers:
                Jan-Philip Gehrcke (Inactive), Tim Harper
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: