Nova Cells v1 Support for Server Groups

In a previous post, I described how we implemented Nova Cells v1 support for server group objects using MySQL triggers.  We’d been running that for a while, but needed a real solution (mostly because we created a new cell whose database was in on a different MySQL server.)

The patch for Nova is here, and it’s pretty basic but it works for our needs.  At a glance this patch:

  • Stubs out the server groups API operations (for v2.1 and v3 API) to a compute ServerGroupAPI class
  • RPC calls for server group create, delete, and add_members are added to the nova-cells service
  • When cells are enabled, a cast call is done to execute the server group operation in all compute cells
  • The operation is also called for the API cell

This ensures that all the server groups (as well as policy and membership) are created in all the compute cells and can be used by the scheduler in each cell.

We welcome any feedback or suggestions for improvements.  Hopefully this will be useful to others as well.