Page MenuHomePhabricator

When a Drydock host based on an Almanac blueprint has its binding disabled, stop handing out leases
ClosedPublic

Authored by epriestley on Oct 25 2018, 12:48 PM.

Details

Summary

Ref T13210. Ref T12145. The "Almanac Host" blueprint currently hands out new leases on a given host even if the binding has been disabled.

Although there are some more complicated cases here (e.g., involving cleanup of the existing resource and existing leases), this one seems clear cut: if the binding has been disabled, we should stop handing out new leases on it.

Test Plan
  • Created a service with two hosts.
  • Requested a lease, got host A.
  • Requested more leases, always got host A (we never build a new host when we don't have to, and we currently never have to).
  • Disabled the binding to host A.
  • Requested a lease.
    • Before patch: got host A.
    • After patch: got host B.
  • Also disabled the other binding to host B, requested a lease, got an indefinite wait for resources (which is expected and reasonable).

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Oct 25 2018, 12:48 PM
Owners added a subscriber: Restricted Owners Package.Oct 25 2018, 12:48 PM
epriestley requested review of this revision.Oct 25 2018, 12:49 PM
amckinley accepted this revision.Oct 26 2018, 9:30 PM
amckinley added inline comments.
src/applications/drydock/blueprint/DrydockAlmanacServiceHostBlueprintImplementation.php
309

This message doesn't make sense now that it's been decoupled from the DrydockCommandInterface::INTERFACE_TYPE case statement in getInterface().

This revision is now accepted and ready to land.Oct 26 2018, 9:30 PM
epriestley updated this revision to Diff 47211.Oct 27 2018, 2:14 PM
  • Use more neutral exception language.
This revision was automatically updated to reflect the committed changes.