Changeset 540


Ignore:
Timestamp:
May 31, 2008, 1:18:40 AM (16 years ago)
Author:
broder
Message:

Disable image cloning when ice3 is booted - this should work as a locking
mechanism

Location:
trunk/packages/sipb-xen-www/code
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/main.py

    r536 r540  
    204204    xmlist = g.xmlist
    205205    checkpoint.checkpoint('Got uptimes')
     206    can_clone = (controls.getList([Machine.get_by(name='ice3')])) == {}
    206207    for m in machines:
    207208        if m not in xmlist:
     
    233234             defaults=defaults,
    234235             machines=machines,
    235              has_vnc=has_vnc)
     236             has_vnc=has_vnc,
     237             can_clone=can_clone)
    236238    return d
    237239
  • trunk/packages/sipb-xen-www/code/templates/list.tmpl

    r536 r540  
    6262        <tr>
    6363          <td>Clone image?</td>
     64#if $can_clone
    6465          <td><input type="checkbox" name="clone_from" id="clone_from" value="ice3" onchange="onclone(event)"/>
    6566              (experimental; 1-2 minutes, and you have an etch machine; root pw is 'password'.)
    6667              <script type='text/javascript'>function onclone(e){ document.getElementById('cdromlist').value = ''; }</script></td>
     68#else
     69          <td><input type="checkbox" name="clone_from" id="clone_from" value="ice3" disabled="disabled"/> Image cloning is currently disabled for maintenence</td>
     70#end if
    6771        </tr>
    6872#filter None
Note: See TracChangeset for help on using the changeset viewer.