Check cache when creating Mesos resources using make_disk_resources.py.
Check cache when creating Mesos resources using make_disk_resources.py.

This concerns agents and the file `/var/lib/dcos/mesos-resources`.
We previously used the free space on the agent's mounted volumes
when using `make_disk_resources.py` to create the Mesos resources
file.

We recently saw that the Mesos agent would not restart due to this
behavior for a specific case: a mount volume is used on an agent
by a framework, the agent is stopped and a new volume is mounted.
This is because, when adding an agent, we create again the Mesos
resources file and, if a mount volume is used, its free disk space
will have decreased. Mesos will then not accept to restart as it
cannot find the volume (due to the change of value).

To fix this, we now use a cache to know what was the original free
amount of disk space available on the mount volumes. When the Mesos
resources file is getting created again, we check for the mounted
volumes in the cache and use the amount of disk displayed there.
Due to the use of a new argument, a default value, and a condition
checking for the cache file, these changes will not negatively
impact users updating to a version of DC/OS including this fix.

The documentation regarding mounting a new volume will be updated
as the file `/var/lib/dcos/mesos-resources` should be moved to
`/var/lib/dcos/mesos-resources.cache` instead of being removed
when adding a new mount volume.

kensipe/dcos,surdy/dcos,mesosphere-mergebot/mergebot-test-dcos,mesosphere-mergebot/mergebot-test-dcos,mesosphere-mergebot/mergebot-test-dcos,dcos/dcos,mesosphere-mergebot/mergebot-test-dcos,dcos/dcos,mesosphere-mergebot/dcos,surdy/dcos,kensipe/dcos,mesosphere-mergebot/dcos,GoelDeepak/dcos,GoelDeepak/dcos,dcos/dcos,mesosphere-mergebot/dcos,kensipe/dcos,GoelDeepak/dcos,dcos/dcos,kensipe/dcos,surdy/dcos,mesosphere-mergebot/dcos,GoelDeepak/dcos,dcos/dcos,surdy/dcos