phacility/phabricator · error · PhutilArgumentUsageException

Service "%s" is not bound to any devices.

Error message

Service "%s" is not bound to any devices.

What it means

When thaw demotes a whole Almanac service, it first loads the service's bindings (AlmanacBindingQuery) to find the affected interfaces and devices. A service with no bindings has no devices to act on, so the operation cannot proceed and this PhutilArgumentUsageException is raised.

Source

Thrown at src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php:95

      if (!$service) {
        throw new PhutilArgumentUsageException(
          pht('No device or service named "%s" exists.', $target_name));
      }

      if ($promote) {
        throw new PhutilArgumentUsageException(
          pht(
            'You can not "--promote" an entire service ("%s"). Only a single '.
            'device may be promoted.',
            $target_name));
      }

      $bindings = id(new AlmanacBindingQuery())
        ->setViewer($viewer)
        ->withServicePHIDs(array($service->getPHID()))
        ->execute();
      if (!$bindings) {
        throw new PhutilArgumentUsageException(
          pht(
            'Service "%s" is not bound to any devices.',
            $target_name));
      }

      $interfaces = id(new AlmanacInterfaceQuery())
        ->setViewer($viewer)
        ->withPHIDs(mpull($bindings, 'getInterfacePHID'))
        ->execute();

      $device_phids = mpull($interfaces, 'getDevicePHID');

      $devices = id(new AlmanacDeviceQuery())
        ->setViewer($viewer)
        ->withPHIDs($device_phids)
        ->execute();
    }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Bind the service to at least one device/interface in the Almanac console if it is still meant to be in use.
  2. If the service is intentionally dead configuration, remove the stale service rather than thawing it.
  3. If you meant to act on a single device of a bound service, pass the device name directly.

Example fix

# before
./bin/repository thaw --demote old-repo-service
# Usage exception: Service "old-repo-service" is not bound to any devices.

# after: bind devices in Almanac, or target a real bound service/device
# (Almanac console: add bindings, then retry)
./bin/repository thaw --demote repo-cluster
Defensive patterns

Strategy: validation

Validate before calling

# Before demoting a service, confirm it has bindings
svc='repo-cluster'
bindings=$(mysql -N -B phabricator_almanac -e \
  "SELECT COUNT(*) FROM almanac_binding b
     JOIN almanac_service s ON s.phid = b.servicePHID
   WHERE s.name = '$svc'")
[ "$bindings" -gt 0 ] || { echo "service $svc has no bindings; nothing to demote" >&2; exit 1; }
./bin/repository thaw --demote "$svc"

Prevention

When it happens

Trigger: Running `./bin/repository thaw --demote <service>` where the Almanac service has zero bindings — devices were removed or the service was created but never bound to any network interface.

Common situations: Leftover service objects after decommissioning cluster devices; services created during a re-architecture before bindings were configured; demoting a service whose bindings were already removed as part of teardown.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/59a34a3013901468. Report an issue: GitHub.