From: Evan Broder Date: Sat, 31 May 2008 05:18:40 +0000 (-0400) Subject: Disable image cloning when ice3 is booted - this should work as a locking X-Git-Tag: sipb-xen-www/3.4~4 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/18eb0699531716f3ed495d1e4677c8b981a35439 Disable image cloning when ice3 is booted - this should work as a locking mechanism svn path=/trunk/packages/sipb-xen-www/; revision=540 --- diff --git a/code/main.py b/code/main.py index ce523cb..60c2818 100755 --- a/code/main.py +++ b/code/main.py @@ -203,6 +203,7 @@ def getListDict(user): has_vnc = {} xmlist = g.xmlist checkpoint.checkpoint('Got uptimes') + can_clone = (controls.getList([Machine.get_by(name='ice3')])) == {} for m in machines: if m not in xmlist: has_vnc[m] = 'Off' @@ -232,7 +233,8 @@ def getListDict(user): max_disk=max_disk, defaults=defaults, machines=machines, - has_vnc=has_vnc) + has_vnc=has_vnc, + can_clone=can_clone) return d def listVms(user, fields): diff --git a/code/templates/list.tmpl b/code/templates/list.tmpl index c55261c..5c6f2c5 100644 --- a/code/templates/list.tmpl +++ b/code/templates/list.tmpl @@ -61,9 +61,13 @@ $errorRow('vmtype', $err) #end filter Clone image? +#if $can_clone (experimental; 1-2 minutes, and you have an etch machine; root pw is 'password'.) +#else + Image cloning is currently disabled for maintenence +#end if #filter None $errorRow('autoinstall', $err)