From b064cfab48993c4a009858a86000f69777ce9636 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Fri, 17 Apr 2009 12:51:42 -0400 Subject: [PATCH] When creating a new VM, create the disks in the try/except block so that everything gets rolled back if that fails. svn path=/trunk/packages/invirt-web/; revision=2295 --- code/controls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controls.py b/code/controls.py index 911c41a..e32b1c2 100644 --- a/code/controls.py +++ b/code/controls.py @@ -105,11 +105,11 @@ def createVm(username, state, owner, contact, name, description, memory, disksiz session.save_or_update(nic) session.save_or_update(disk) cache_acls.refreshMachine(machine) + makeDisks(machine) session.commit() except: session.rollback() raise - makeDisks(machine) try: if autoinstall: lvinstall(machine, autoinstall) -- 1.7.9.5