mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-24 07:42:40 +01:00
4dd32dca3e
Summary: Ref T13073. When a Blueprint says it will be able to allocate a resource but then throws an exception while attempting that allocation, we currently fail the lease permanently. This is excessively harsh. This blueprint may have the best of intentions and have encountered a legitimately unforseeable failure (like a `vm.new` call to build a VM failed) and be able to succeed in the future. Even if this blueprint is a dirty liar, other blueprints (or existing resources) may be able to satisfy the lease in the future. Even if every blueprint is implemented incorrectly, leaving the lease alive lets it converge to success after the blueprints are fixed. Instead of failing, log the issue and yield. (In the future, it might make sense to distinguish more narrowly between "actually, all the resources are used up" and all other failure types, since the former is likely more routine and less concerning.) Test Plan: - Wrote a broken `Hoax` blueprint which always claims it can allocate but never actually allocates (just `throw` in `allocateResource()`). - Used `bin/phd drydock lease` to acquire a Hoax lease. - Before patch: lease abruptly failed permanently. - After patch: lease yields after allocation fails. {F5427747} Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13073 Differential Revision: https://secure.phabricator.com/D19070 |
||
---|---|---|
.. | ||
application | ||
blueprint | ||
capability | ||
conduit | ||
constants | ||
controller | ||
customfield | ||
editor | ||
exception | ||
garbagecollector | ||
interface | ||
logtype | ||
management | ||
operation | ||
phid | ||
query | ||
storage | ||
typeahead | ||
view | ||
worker | ||
xaction |