mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 10:01:54 +00:00
interfaces.py: corrections to take into account that lease cancel secrets are no longer honoured.
This commit is contained in:
parent
e8240b0923
commit
5105448421
@ -26,9 +26,10 @@ URIExtensionData = StringConstraint(1000)
|
||||
Number = IntegerConstraint(8) # 2**(8*8) == 16EiB ~= 18e18 ~= 18 exabytes
|
||||
Offset = Number
|
||||
ReadSize = int # the 'int' constraint is 2**31 == 2Gib -- large files are processed in not-so-large increments
|
||||
WriteEnablerSecret = Hash # used to protect mutable bucket modifications
|
||||
LeaseRenewSecret = Hash # used to protect bucket lease renewal requests
|
||||
LeaseCancelSecret = Hash # used to protect bucket lease cancellation requests
|
||||
WriteEnablerSecret = Hash # used to protect mutable share modifications
|
||||
LeaseRenewSecret = Hash # used to protect lease renewal requests
|
||||
LeaseCancelSecret = Hash # was used to protect lease cancellation requests
|
||||
|
||||
|
||||
class RIBucketWriter(RemoteInterface):
|
||||
""" Objects of this kind live on the server side. """
|
||||
@ -107,7 +108,9 @@ class RIStorageServer(RemoteInterface):
|
||||
This secret is generated by the client and
|
||||
stored for later comparison by the server. Each
|
||||
server is given a different secret.
|
||||
@param cancel_secret: Like renew_secret, but protects bucket decref.
|
||||
@param cancel_secret: This no longer allows lease cancellation, but
|
||||
must still be a unique value identifying the
|
||||
lease. XXX stop relying on it to be unique.
|
||||
@param canary: If the canary is lost before close(), the bucket is
|
||||
deleted.
|
||||
@return: tuple of (alreadygot, allocated), where alreadygot is what we
|
||||
@ -138,8 +141,8 @@ class RIStorageServer(RemoteInterface):
|
||||
For mutable shares, if the given renew_secret does not match an
|
||||
existing lease, IndexError will be raised with a note listing the
|
||||
server-nodeids on the existing leases, so leases on migrated shares
|
||||
can be renewed or cancelled. For immutable shares, IndexError
|
||||
(without the note) will be raised.
|
||||
can be renewed. For immutable shares, IndexError (without the note)
|
||||
will be raised.
|
||||
"""
|
||||
return Any()
|
||||
|
||||
@ -188,7 +191,9 @@ class RIStorageServer(RemoteInterface):
|
||||
This secret is generated by the client and
|
||||
stored for later comparison by the server. Each
|
||||
server is given a different secret.
|
||||
@param cancel_secret: Like renew_secret, but protects bucket decref.
|
||||
@param cancel_secret: This no longer allows lease cancellation, but
|
||||
must still be a unique value identifying the
|
||||
lease. XXX stop relying on it to be unique.
|
||||
|
||||
The 'secrets' argument is a tuple of (write_enabler, renew_secret,
|
||||
cancel_secret). The first is required to perform any write. The
|
||||
|
Loading…
x
Reference in New Issue
Block a user