Ticket #333 (new defect)
Operations must be atomic
| Reported by: | dana | Owned by: | KevinLai |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.6.0 New Feature Release |
| Component: | Auctioneer | Version: | |
| Severity: | critical | Keywords: | |
| Cc: |
Description (last modified by dana) (diff)
Operations must be atomic in order to avoid race conditions (e.g. user account creation and deployment of the virtual machine).
If two different users try to deploy virtual machines at the same time and in the same physical node and the sum of required resources exceed the free resources of the machine only one will have the account and the virtual machine deployed (as expected) while the other will have only the account without virtual machine (then, the operations "create_account" and "deploy_machine" are not atomic). The major problem appears when the second tries to delete the account and the refund is not the total amount used in "create_account" (e.g. initial fund of 1 and refund of 0.99998).
User1: 1.5 GB MEM
User2: 1.0 GB MEM
Host0: 2.0 GB MEM
User1 ---> Host0 <--- User2
