0

In Mesos you are able to define restrictions for services according the resources (cpu, mem, disk, etc.). In Marathon this can look like:

{
  "id": "/grafana/demo",
  "instances": 1,
  "cpus": 1.0,
  "mem": 256,
  "disk": 128,
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "grafana/grafana:latest",
     ...
   }
 }

}

Now my question: Does the docker image size of grafana/grafana:latest count INTO the "disk": 128, allocation? Or is it "disk": 128, + size of the docker imagegrafana/grafana:latest?

Andy
  • 181
  • 1
  • 4
  • Are you sure this is a restriction or is it a scheduling requirement? The way I understood these parameters were that they are used by Mesos to make scheduling decisions. For example, if you have a node that has a disk of `256` and a service with a disk of `128`, then it could schedule 2 units of that service onto the node before the `disk` is fulfilled. – Andy Shinn May 23 '17 at 17:39

1 Answers1

0

It depends on configuration. Docker containerizer does not support disk resources. You can use Posix Disk Isolator but it only scan application sandbox so images don't count.

janisz
  • 6,292
  • 4
  • 37
  • 70