1. 22 Jan, 2014 1 commit
  2. 03 Jan, 2014 2 commits
    • Mike Hibler's avatar
      Add option (-w) to wait for a locked lease rather than just failing. · 353d846d
      Mike Hibler authored
      The former Approve method of a lease is now AllocResources and there is
      a corresponding DeallocResources.
      
      Check for changes of state that might have occured while waiting for a lease.
      353d846d
    • Mike Hibler's avatar
      First attempt to cleanup some hack jobs. · c5a1812c
      Mike Hibler authored
      Make a createdataset to handle dataset leases and move dataset specific
      code out of approvelease and into Lease.pm (which is now Lease.pm.in as
      it needs to be configured). Lease.pm still needs a bunch of OO-ification
      to properly make datasets a subclass of leases. But, another day...
      c5a1812c
  3. 11 Dec, 2013 1 commit
    • Mike Hibler's avatar
      Add script to approve a lease and add some locking in other scripts. · 6fef3cce
      Mike Hibler authored
      approvelease is the place where storage actually gets allocated for
      a lease. It uses bscontrol to contact an appropriate freeNAS storage
      server and allocate a ZFS volume.
      
      deletelease is the place where storage is deallocated. Note that once
      a lease has been approved and storage allocated, it cannot be returned
      to the unapproved state. The only way to free storage is to delete the
      lease.
      
      Both approve and delete use an intermediate state, "initializing", to
      signal that the lease is in the middle of a potentially time-consuming
      allocation/deallocation procedure. I probably should have just used the
      lease locking mechanism instead.
      
      Approve, delete, and mod all DO use the locking mechanism when examining
      and manipulating the state of a lease. Nonetheless, I am sure that are
      still plenty of races.
      6fef3cce