Page MenuHomePhabricator

When a lease acquires a resource but the resource fails to activate, throw the lease back in the pool
ClosedPublic

Authored by epriestley on Feb 13 2018, 2:36 PM.
Tags
None
Referenced Files
F13182956: D19076.id.diff
Fri, May 10, 5:26 AM
F13179751: D19076.diff
Wed, May 8, 9:25 PM
F13174734: D19076.diff
Wed, May 8, 12:55 AM
Unknown Object (File)
Sat, May 4, 7:04 PM
Unknown Object (File)
Tue, Apr 30, 11:28 PM
Unknown Object (File)
Sat, Apr 27, 9:11 PM
Unknown Object (File)
Sat, Apr 27, 11:19 AM
Unknown Object (File)
Mon, Apr 22, 10:48 PM
Subscribers
Restricted Owners Package

Details

Summary

Depends on D19075. Ref T13073. If a lease acquires a resource but finds that the resource builds directly into a dead state (which can happen for any number of reasonable reasons), reset the lease and throw it back in the pool.

This isn't the lease's fault and it hasn't caused any side effects or done anything we can't undo, so we can safely reset it and throw it back in the pool.

Test Plan
  • Created a blueprint which throws from allocateResource() so that resources never activate.
  • Tried to lease it with bin/drydock lease ....
  • Before patch: lease was broken and destroyed after a failed activation.
  • After patch: lease was returned to the pool after a failed activation.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a subscriber: Restricted Owners Package.Feb 13 2018, 2:36 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 13 2018, 9:18 PM
This revision was automatically updated to reflect the committed changes.