phacility/phabricator · error · PhutilAggregateException
Unable to allocate any binding as a resource.
Error message
Unable to allocate any binding as a resource.
What it means
The Almanac host blueprint allocates a Drydock resource by iterating candidate Almanac service bindings; each allocation attempt (resource->allocateResource(), guarded by a per-binding slot lock) is wrapped in try/catch and collected into $exceptions. If every binding fails, PhutilAggregateException is thrown wrapping each per-binding cause. The real diagnosis lives in the aggregated exceptions, not this top-level message.
Source
Thrown at src/applications/drydock/blueprint/DrydockAlmanacServiceHostBlueprintImplementation.php:100
$device_name = $device->getName();
$binding_phid = $binding->getPHID();
$resource = $this->newResourceTemplate($blueprint)
->setActivateWhenAllocated(true)
->setAttribute('almanacDeviceName', $device_name)
->setAttribute('almanacServicePHID', $binding->getServicePHID())
->setAttribute('almanacBindingPHID', $binding_phid)
->needSlotLock("almanac.host.binding({$binding_phid})");
try {
return $resource->allocateResource();
} catch (Exception $ex) {
$exceptions[] = $ex;
}
}
throw new PhutilAggregateException(
pht('Unable to allocate any binding as a resource.'),
$exceptions);
}
public function destroyResource(
DrydockBlueprint $blueprint,
DrydockResource $resource) {
// We don't create anything when allocating hosts, so we don't need to do
// any cleanup here.
return;
}
public function getResourceName(
DrydockBlueprint $blueprint,
DrydockResource $resource) {
$device_name = $resource->getAttribute(
'almanacDeviceName',
pht('<Unknown>'));View on GitHub (pinned to 5720a38cfe)
Solutions
- Catch PhutilAggregateException and iterate getExceptions() to see each binding's actual failure
- Check Drydock resource/lease logs (`bin/drydock log`, Drydock console) for the underlying causes
- Add or repair Almanac bindings/devices so at least one healthy host is available
- Verify the blueprint's SSH credential and that devices are reachable and in service
Defensive patterns
Strategy: try-catch
Try / catch
try {
$resource = $blueprint->allocateResource($lease);
} catch (PhutilAggregateException $ex) {
foreach ($ex->getExceptions() as $cause) {
// The real blockers are the per-binding failures.
phlog($cause);
}
throw $ex;
} Prevention
- Always inspect getExceptions() on PhutilAggregateException; the top message says nothing actionable
- Keep more than one healthy Almanac binding per service so single-host failure is tolerated
- Monitor Drydock resource logs for slot-lock exhaustion before allocations start failing wholesale
When it happens
Trigger: Every active binding for the blueprint's Almanac services fails allocateResource(): exhausted host capacity/slot locks, Almanac device or service misconfiguration, denied SSH credentials, or reservation conflicts. A single failing binding is tolerated; only total failure throws.
Common situations: All devices behind the Almanac service are offline or at capacity; the blueprint's credential (Passphrase SSH private key) is invalid so every host setup fails; wrong service type filtering out all bindings; small clusters where one device down means zero candidates.
Related errors
- This blueprint ("%s") does not define any Almanac Service PH
- Some of the Almanac Services defined by this blueprint could
- This server is configured as "%s", but you are using the dom
- This service is configured in cluster mode and the address t
- This request reached a site which requires HTTPS, but the re
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/9f3fee40c3fe52b0.
Report an issue: GitHub.