1. 09 Nov, 2017 1 commit
    • Mike Hibler's avatar
      Introduce a "failed" state for resource allocation. · 7e13f79b
      Mike Hibler authored
      If a background resource allocation fails, we put the lease in the "failed"
      state instead of destroying it. There were some ripple effects, specifically,
      the lease_daemon now checks for "failed" leases and send messages to us at
      the same frequency as for "unapproved" leases. The correct response here is
      almost certainly to destroy the lease, though you can put it back in the
      "unapproved" state (via modlease) and try to approve it to see what happened.
      Also add background mode to approvelease since it can do time consuming
      resource allocation.
      Nit: cleanup logfiles used in backgroud operation.
  2. 11 Nov, 2014 1 commit
    • Leigh B Stoller's avatar
      Add gid to project_leases, and allow creation in subgroups. · d859078e
      Leigh B Stoller authored
      This is not exposed to users, the main reason for this is so that the name
      space for leases (datasets) is per-group instead of per-project. We need
      this when creating datasets via the geni interface (backend to APT), since
      all leases are created in the holding project. Without a subgroup, we would
      run into name collisions on the backend. It also gives us finer access
      permission control for the same reason.
      Note that I yanked out the lease cache from Lease.pm (not worth the
      trouble), and I expanded Lookup to allow for the usual variety of
      possibilities that we allow in other Lookup methods.
  3. 06 Jan, 2014 1 commit
  4. 03 Jan, 2014 3 commits
    • Mike Hibler's avatar
      Prototype lease-related sitevars and use them in create scripts. · 2faa886d
      Mike Hibler authored
      Currently, these are not yet in the sitevariables table, I just hardwire
      them in Lease.pm til we get the right set.
    • Mike Hibler's avatar
      Minor cleanups. · 879dd913
      Mike Hibler authored
    • Mike Hibler's avatar
      Assorted changes. · 054522cf
      Mike Hibler authored
      Add wait option (-w). Check for lots of things that could have occured
      while waiting and abort if such things happened (since any number of things
      could have happened to the lease while you slept).
      Permit state transtions that alloc/delloc resources if -R is specified.
      Add -U option to forcibly unlock a lease (if it somehow got left locked).
  5. 11 Dec, 2013 3 commits
    • 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
      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.
    • Mike Hibler's avatar
    • Mike Hibler's avatar