HomePhorge

Don't reclaim resources that have a destroyed lease less than 3 minutes old

Description

Don't reclaim resources that have a destroyed lease less than 3 minutes old

Summary:
Ref T13676. The 3-minute grace period when a resource can not be reclaimed after its leases are released currently doesn't work reliably because the Resource object usually isn't actually updated when a lease is released.

Add an additional check for recently-destroyed leases, and extend the grace period if we find any.

Test Plan:

  • See T13676. Ran reproduction sequence there, observed immediate resource reclamation.
  • Applied patch.
  • Ran sequence again, observed repository B wait 3 minutes to reclaim a repository A resource.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13676

Differential Revision: https://secure.phabricator.com/D21803

Details

Provenance
epriestley <git@epriestley.com>Authored on May 3 2022, 22:30
aviveyPushed on Tue, Jul 26, 15:02
aviveyPushed on Tue, Jul 26, 15:01
Differential Revision
D25040: merge phab/master -> phorge/master
Parents
rPdfdbe7a6be04: Allow "bin/drydock lease ..." to select particular blueprints with "--blueprint"
Branches
Unknown
Tags
Unknown
Tasks
T15094: Catch up the master branch to upstream