Opened at 2021-08-18T15:13:18Z
Closed at 2021-09-01T14:44:46Z
#3773 closed task (fixed)
Merge adding lease with renewing lease
Reported by: | itamarst | Owned by: | itamarst |
---|---|---|---|
Priority: | normal | Milestone: | HTTP Storage Protocol |
Component: | unknown | Version: | n/a |
Keywords: | Cc: | ||
Launchpad Bug: |
Description (last modified by itamarst)
- From a client perspective, the goal is just to have a lease, whether it's a new lease or renewing a lease is irrelevant; renewing is essentially an optimization detail on server side.
- Cancelling leases is not actually supported.
- The way lease renewal secrets are generated is likely to change in the switchover from foolscap to HTTP.
- Internally, the server _already_ treats adding a lease as potentially just renewing a lease.
As such, the distinction between adding a lease and renewing a lease is unnecessary (presuming item 4 is actually correct!). We would like to simplify HTTP protocol by removing it, and we need to make sure server can gracefully handle clients switching their renewal secret.
Therefore, we should merge the two into a single operation:
- Validate item 4 above, since it's critical requirement for the rest of this.
- In Foolscap client, switch to only using add lease code path.
- Make sure server creating renews lease in add path.
- On server-side, leave new lease Foolscap endpoint in place for backwards compat.
- In new GBS HTTP protocol spec, switch to a single end point for lease creation/renewal, and remove all references to lease cancellation secret.
- Clients should continue to try to pass in the same renewal secret, the way they do now.
Change History (7)
comment:1 Changed at 2021-08-18T15:14:15Z by itamarst
- Description modified (diff)
comment:2 Changed at 2021-08-18T15:20:51Z by exarkun
comment:3 Changed at 2021-08-18T15:27:15Z by itamarst
- Description modified (diff)
- Summary changed from Merge adding lease with renewing lease (for immutables) to Merge adding lease with renewing lease
comment:4 Changed at 2021-08-18T15:32:20Z by itamarst
- Description modified (diff)
comment:5 Changed at 2021-08-18T15:36:01Z by itamarst
- Description modified (diff)
comment:6 Changed at 2021-08-19T16:57:41Z by itamarst
- Description modified (diff)
comment:7 Changed at 2021-09-01T14:44:46Z by GitHub <noreply@…>
- Resolution set to fixed
- Status changed from new to closed
In 056ee58/trunk:
Note: See
TracTickets for help on using
tickets.
Regarding item 4 from the first list:
Here is the implementation of add_lease from allmydata/storage/server.py:
And here is the implementation of MutableShareFile.add_or_renew_lease from `allmydata/storage/mutable.py:
And here is the implementation of ShareFile.add_or_renew_lease from `allmydata/storage/immutable.py:
(woops nice divergence in safety properties there)