phacility/phabricator · error · PhabricatorWorkerPermanentFailureException
Lease "%s" never activated.
Error message
Lease "%s" never activated.
What it means
After acquiring or reloading the working-copy lease, the step first yields 15 seconds while the lease is activating; if on a later pass the lease is neither activating nor active (e.g. it ended up broken, released, or expired), it throws PhabricatorWorkerPermanentFailureException with 'Lease "%s" never activated.' The lease state machine stalled somewhere other than STATUS_ACTIVE.
Source
Thrown at src/applications/harbormaster/step/HarbormasterLeaseWorkingCopyBuildStepImplementation.php:91
array(
'drydockLeasePHID' => $lease->getPHID(),
));
$lease->queueForActivation();
$build_target
->setDetail('exec.leasePHID', $lease->getPHID())
->save();
}
if ($lease->isActivating()) {
// TODO: Smart backoff?
throw new PhabricatorWorkerYieldException(15);
}
if (!$lease->isActive()) {
// TODO: We could just forget about this lease and retry?
throw new PhabricatorWorkerPermanentFailureException(
pht(
'Lease "%s" never activated.',
$lease->getPHID()));
}
}
public function getArtifactOutputs() {
return array(
array(
'name' => pht('Working Copy'),
'key' => $this->getSetting('name'),
'type' => HarbormasterWorkingCopyArtifact::ARTIFACTCONST,
),
);
}
public function getFieldSpecifications() {
return array(View on GitHub (pinned to 5720a38cfe)
Solutions
- Inspect the failed lease in the Drydock UI (lease status and log) to see where activation stopped.
- Ensure at least one Drydock Working Copy blueprint is configured and enabled and that its resources can actually be allocated.
- Fix the underlying blueprint/host errors shown in the Drydock logs, then restart the build.
- If leases expire during activation, increase the lease expiration window in the blueprint.
Defensive patterns
Strategy: retry
Validate before calling
// Before starting builds, confirm a working-copy blueprint is available:
$blueprints = id(new DrydockBlueprintQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withTypes(array('working-copy'))
->execute();
if (!$blueprints) {
// no blueprint can ever activate a lease - configure one first
} Try / catch
try {
// execute lease step
} catch (PhabricatorWorkerPermanentFailureException $ex) {
if (preg_match('/never activated/', $ex->getMessage())) {
// inspect the Drydock lease log, fix the blueprint, then restart the build
}
} Prevention
- Always have at least one enabled working-copy blueprint with healthy resources.
- Watch Drydock lease logs for repeated activation failures before they become build failures.
- Size resource capacity so leases are not stuck in queue past activation.
When it happens
Trigger: The Drydock blueprint failed to allocate/activate the lease (no enabled working-copy blueprint, allocation error, host at capacity) so the lease moved to broken; or the lease was activated but expired/released between the yield and the next check.
Common situations: No Drydock Working Copy blueprint exists or all are disabled; blueprint SSH/host credentials misconfigured so activation fails; all working-copy resources are full; long queue delays so leases expire before the target re-checks.
Related errors
- Lease "%s" could not be loaded.
- Working copy lease is missing required attribute "%s". Attr
- Use "--lease" to specify a lease.
- Unable to load lease with ID "%s"!
- Lease has already been released!
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/eec224767faadc4f.
Report an issue: GitHub.