GSoC/GCI Archive
Google Code-in 2010 Oregon State University Open Source Lab

Ganeti Web Manager: clusters page lists virtual machine counts directly from ganeti

completed by: kylc

mentors: Leslie Hawthorn

Please make sure to submit your patch for this task and to take required notes for it in the OSUOSL issue tracker at http://code.osuosl.org/issues/603. Required notes would include letting the community know you are working on the issue with a note in the tracker, any notes on progress or difficulties implementing, etc.

For help with this task, contact kreneskyp or ramereth in #osuosl on Freenode. 

Task Description:

The clusters page lists counts of nodes and virtual machines, but it uses values taken from Cluster.instances() which always queries ganeti. Not only should querying ganeti be avoided, but it is causing inconsistency between counts when virtual machines were deleted from ganeti but not yet removed from the database.

This should be updated to use Cluster.virtual_machines.all().count()