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

Allow Persistent Volumes on already reserved resources

    Details

    • Type: Task
    • Status: Accepted
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage Volumes
    • Labels:
    • Zendesk Ticket IDs:
      8455

      Description

      Problem
      Static reservations are discouraged in favor of dynamic reservations issued via Mesos' http API.
      Marathon can only use persistent volumes if it creates the reservations/volumes itself.

      Original Text
      Error Message: A resident app must have acceptedResourceRoles = ["*"].
      Here are two examples. One that works and one that is broken once try to add:

        "acceptedResourceRoles": [
          "*",
          "slave_public"
        ],
      

      Working JSON:

      {
        "id": "/mysql",
        "cpus": 1,
        "mem": 512,
        "disk": 0,
        "instances": 1,
        "container": {
          "type": "DOCKER",
          "volumes": [
            {
              "containerPath": "mysqldata",
              "mode": "RW",
              "persistent": {
                "type": "root",
                "size": 1000
              }
            },
            {
              "containerPath": "/var/lib/mysql",
              "hostPath": "mysqldata",
              "mode": "RW"
            }
          ],
          "docker": {
            "image": "mysql",
            "network": "BRIDGE",
            "portMappings": [
              {
                "containerPort": 3306,
                "hostPort": 0,
                "servicePort": 10000,
                "protocol": "tcp"
              }
            ],
            "forcePullImage": false
          }
        },
        "env": {
          "MYSQL_USER": "wordpress",
          "MYSQL_PASSWORD": "secret",
          "MYSQL_ROOT_PASSWORD": "supersecret",
          "MYSQL_DATABASE": "wordpress"
        },
        "upgradeStrategy": {
          "minimumHealthCapacity": 0,
          "maximumOverCapacity": 0
        }
      }
      

      Not Working JSON:

      {
        "id": "/mysql-broken",
        "cpus": 1,
        "mem": 512,
        "disk": 0,
        "instances": 1,
        "container": {
          "type": "DOCKER",
          "volumes": [
            {
              "containerPath": "mysqldata",
              "mode": "RW",
              "persistent": {
                "type": "root",
                "size": 1000
              }
            },
            {
              "containerPath": "/var/lib/mysql",
              "hostPath": "mysqldata",
              "mode": "RW"
            }
          ],
          "docker": {
            "image": "mysql",
            "network": "BRIDGE",
            "portMappings": [
              {
                "containerPort": 3306,
                "hostPort": 0,
                "servicePort": 10000,
                "protocol": "tcp"
              }
            ],
            "forcePullImage": false
          }
        },
        "env": {
          "MYSQL_USER": "wordpress",
          "MYSQL_PASSWORD": "secret",
          "MYSQL_ROOT_PASSWORD": "supersecret",
          "MYSQL_DATABASE": "wordpress"
        },
        "upgradeStrategy": {
          "minimumHealthCapacity": 0,
          "maximumOverCapacity": 0
        },
        "acceptedResourceRoles": [
          "*",
          "slave_public"
        ]
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marco.monaco Marco Monaco
                Team:
                Orchestration Team
                Watchers:
                brugidou, drcrallen
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: