cloudfoundry/cloud_controller_ng — pull request #120 by julz (2013-11-01 15:11:09+00:00)
Title: Consider available disk before deciding where to start app.

CC currently assumes that if a DEA has enough memory, it has enough disk
space. This doesn't work in all cases, especially with larger build packs
or apps with larger disk_quota settings. This change considers the
available disk space on a DEA before making the placement decision.

We had many problems starting apps when a DEA which had enough memory but
had run out of reservable disk space would often get chosen to start an app and
immediately fail when it attempted to reserve the resources.

This commit relies on an available_disk key having been added to the stager (see https://github.com/cloudfoundry/dea_ng/pull/77 ).
However if the key isn't there, it will revert to the old behaviour, so there's no need
to bump both modules at the same time.