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.
Tags
None
Referenced Files
F13062190: D19761.id47211.diff
Fri, Apr 19, 9:48 PM
Unknown Object (File)
Fri, Apr 19, 2:56 AM
Unknown Object (File)
Thu, Apr 18, 1:20 PM
Unknown Object (File)
Wed, Apr 17, 12:28 AM
Unknown Object (File)
Tue, Apr 16, 3:39 PM
Unknown Object (File)
Sat, Apr 13, 2:07 PM
Unknown Object (File)
Sat, Apr 13, 1:44 PM
Unknown Object (File)
Tue, Apr 2, 1:24 PM
Subscribers
Restricted Owners Package

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
Branch
drydock6
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21056
Build 28612: Run Core Tests
Build 28611: arc lint + arc unit

Event Timeline

Owners added a subscriber: Restricted Owners Package.Oct 25 2018, 12:48 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
  • Use more neutral exception language.
This revision was automatically updated to reflect the committed changes.