« Previous | Next » 

Revision 7907af91


Added by Christos Stavrakakis about 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.


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences