Skip to content
  • Christos Stavrakakis's avatar
    Restore quotas if enqueuing job to Ganeti fails · 6554b86a
    Christos Stavrakakis authored
    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.
    6554b86a