1. 09 Oct, 2015 1 commit
  2. 26 Jun, 2015 1 commit
  3. 23 Mar, 2015 1 commit
  4. 11 Mar, 2015 1 commit
  5. 10 Mar, 2015 1 commit
  6. 28 Jan, 2015 1 commit
    • Mike Hibler's avatar
      Implement "plan 1" for dataset sharing: "ephemeral RO snapshots". · 7aefdaa1
      Mike Hibler authored
      You can now simultaneously RW and RO map a dataset because all the RO
      mappings use copies (clones) of a snapshot. Only a single RW mapping
      of course.
      When the RW mapping swaps out it automatically creates a new snapshot.
      So there is currently no user control over when a version of the dataset
      is "published", it just happens everytime you swapout an experiment with
      a RW mapping.
      A new RW mapping does not affect current RO mappings of course as they
      continue to use whatever snapshot they were created with. New RO mappings
      with get the most recent snapshot, which we currently track in the DB via
      the per-lease attribute "last_snapshot".
      You can also now declare a lease to be "exclusive use" by setting the
      "exclusive_use" lease attribute (via modlease). This means that it follows
      the old semantics of only one mapping at a time, whether it be RO or RW.
      This is an alternative to the "simultaneous_ro_datasets" sitevar which
      enforces the old behavior globally. Primarily, I put this attribute in to
      prevent an unexpected failure in the snapshot/clone path from wreaking
      havoc over time. I don't know if there is any value in exposing this to
      the user.
  7. 27 Jan, 2015 1 commit
  8. 09 Jan, 2015 1 commit
  9. 08 Jan, 2015 1 commit
    • Kirk Webb's avatar
      Backend support for simultaneous read-only dataset access. · 9b6e1a59
      Kirk Webb authored
      Any number of users/experiments can mount a given dataset (given that
      they have permission) in read-only mode.  Attempts to mount RW will
      fail if the dataset is currently in use.  Attempts to mount RO while
      the dataset is in use RW are also prohibited.
      Under the hood, iSCSI lease exports (targets) are now managed per-lease
      instead of per-experiment.  The set of authorized initiators (based
      on network) is manipulated as consumers come and go.  When the last
      consumer goes, the export is torn down. Likewise, if there are no
      current consumers, a new consumer will cause an iSCSI export to be
      created for the lease.
      Also included in this commit is a small tweak to implicit lease permissions.
  10. 29 Dec, 2014 1 commit
  11. 13 Nov, 2014 1 commit
  12. 12 Nov, 2014 3 commits
    • Kirk Webb's avatar
      Add global permissions support for leases. · 00b57bf4
      Kirk Webb authored
      Two types of global permissions are supported:
      * Anonymous read-only (to support users without local accounts).
      * Read-only for users with local accounts.
      Global permissions are added to leases by way of entries of type "global"
      in the lease_permissions table.  The lease mod tool still needs to be
      updated to make use of the updated library support here.
      The new GetAllowedLeases() method in Lease.pm was reworked - it became
      clear that this was needed as I did the global RO permissions stuff.
    • Kirk Webb's avatar
      Add method to list all leases a user or project has access to. · b162d8de
      Kirk Webb authored
      Also adjust some of the existing lease enumeration functions to take
      a lease type selector argument.  Here is the comment above the
      new GetAllowedLeases() method:
       Return a list of leases for which a user OR entire project has access.
       Permissions are determined as follows:
       * The owner of a lease always has full (RW) access
       * Users in a project with group_root or above trust always have full (RW)
         access to leases associated with that project.
       * Explicitly granted per-user and per-project permissions are extracted
         from the lease_permissions tables.
       * upid - User OR Project object to lookup lease access for.
       * type - Optional lease type selector.  Restrict results to this type
                of lease.
       Returns: Array of lease objects the given principal (user or project) has
                access to.  To each of these lease objects, an "allow_modify"
                boolean is set, accessible via $leaseobj->allow_modify().
    • Leigh Stoller's avatar
      Minor bug fix to previous revision. · 7371b368
      Leigh Stoller authored
  13. 11 Nov, 2014 2 commits
    • Leigh Stoller's avatar
      Minor bug fix. · 5e618d1a
      Leigh Stoller authored
    • Leigh Stoller's avatar
      Add gid to project_leases, and allow creation in subgroups. · d859078e
      Leigh 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.
  14. 28 Oct, 2014 1 commit
  15. 27 Oct, 2014 1 commit
  16. 16 Oct, 2014 1 commit
  17. 30 Jan, 2014 1 commit
  18. 29 Jan, 2014 1 commit
  19. 22 Jan, 2014 1 commit
  20. 07 Jan, 2014 1 commit
    • Mike Hibler's avatar
      A couple of minor tweaks. · dac3a614
      Mike Hibler authored
      Add -1 option to run the lease_daemon for exactly one pass and then exit.
      Allow fractional values for some of the sitevars whose values are measured
      in days. Mostly for debugging, in normal use, a granularity of days is fine.
      Tweak the log output.
  21. 06 Jan, 2014 3 commits
  22. 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
      Better handling of locking and new functions. · 8c1f4cd9
      Mike Hibler authored
      Have locking handle the case where lease is destroyed while sleeping.
      Be sure to refresh cached state after a sleep.
      New functions to return an indication if a lease is "in use" (e.g., a
      dataset lease is mapped by an experiment) and to return exptids of any
      experiments using a lease.
      Also, big ole comment about what the lease states mean.
    • 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...
  23. 11 Dec, 2013 9 commits