mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
Shorten the expiry window for the work queue SAS URLs assigned at node registration (#416)
The underlying impact is that nodes must re-register on a more frequent basis. Nodes find out they are out-of-date is during registration and immediately prior to starting a new set of work. Requiring nodes re-register on a shortened cycle provides more opportunities for nodes to get re-imaged. Additionally, this addresses an issue handling the SAS URL expiry in a more clean fashion in the supervisor.
This commit is contained in:
@ -48,11 +48,12 @@ def get_queue_sas(
|
||||
add: bool = False,
|
||||
update: bool = False,
|
||||
process: bool = False,
|
||||
duration: datetime.timedelta = datetime.timedelta(days=30),
|
||||
) -> str:
|
||||
account_id = get_primary_account(storage_type)
|
||||
logging.debug("getting queue sas %s (account_id: %s)", queue, account_id)
|
||||
name, key = get_storage_account_name_key(account_id)
|
||||
expiry = datetime.datetime.utcnow() + datetime.timedelta(days=30)
|
||||
expiry = datetime.datetime.utcnow() + duration
|
||||
|
||||
token = generate_queue_sas(
|
||||
name,
|
||||
|
Reference in New Issue
Block a user