« Previous | Next » 

Revision 7907af91

ID7907af917263226b517df484acc63ac65d61f7a4

Added by Christos Stavrakakis almost 11 years ago

Restore quotas if enqueuing job to Ganeti fails

When creating a server, we commit the VM model in DB and reserve the
corresponding quotas in Quotaholder before enqueuing the
OP_INSTANCE_CREATE job (because messages from dispatcher may arrive
before committing). In case enqueuing job to Ganeti fails we must
restore the quotas to their previous value. This commit achieves this by
issuing a "delete" commission for the VM. Also, instead of deleting the
VM entry, we mark the VM as deleted, in order to keep the relation
with the Quotaholder serial.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences