cloudfoundry/dea_ng — pull request #87 by sykesm (2013-12-11 15:09:51+00:00)
Title: Ensure %CPU is available when disk quota disabled

The stat_collector task was coded with the expectation that disk statistics would always be available but, when disk quotas are disabled for warden, the [statistics are not populated][quota]. When disk_stat is nil, the collector takes an exception dereferencing the message and that exception prevents the cpu statistics management code from executing. The result is the dea reporting 0% CPU consumption for the droplet container.

This adds a check for nil on the disk usage assignment.

[quota]: https://github.com/cloudfoundry/warden/blob/master/warden/lib/warden/container/features/quota.rb#L105