{"record":{"id":"ea042081a9e4b317","repo":"phacility/phabricator","slug":"no-device-or-service-named-s-exists","errorCode":null,"errorMessage":"No device or service named \"%s\" exists.","messagePattern":"No device or service named \"(.+?)\" exists\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php","lineNumber":78,"sourceCode":"    if ($promote && $demote) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify either --promote or --demote, but not both.'));\n    }\n\n    $target_name = nonempty($promote, $demote);\n\n    $devices = id(new AlmanacDeviceQuery())\n      ->setViewer($viewer)\n      ->withNames(array($target_name))\n      ->execute();\n    if (!$devices) {\n      $service = id(new AlmanacServiceQuery())\n        ->setViewer($viewer)\n        ->withNames(array($target_name))\n        ->executeOne();\n\n      if (!$service) {\n        throw new PhutilArgumentUsageException(\n          pht('No device or service named \"%s\" exists.', $target_name));\n      }\n\n      if ($promote) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'You can not \"--promote\" an entire service (\"%s\"). Only a single '.\n            'device may be promoted.',\n            $target_name));\n      }\n\n      $bindings = id(new AlmanacBindingQuery())\n        ->setViewer($viewer)\n        ->withServicePHIDs(array($service->getPHID()))\n        ->execute();\n      if (!$bindings) {\n        throw new PhutilArgumentUsageException(\n          pht(","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php#L60-L96","documentation":"thaw resolves the `--promote`/`--demote` target by name: first against Almanac devices (AlmanacDeviceQuery), then against Almanac services (AlmanacServiceQuery). A name matching neither an Almanac device nor a service cannot be promoted or demoted, so the workflow aborts with this PhutilArgumentUsageException.","triggerScenarios":"Passing a hostname, IP, repository callsign, or typo'd name that is not an Almanac device or service object name; referencing a device defined in a different Phabricator/Almanac installation.","commonSituations":"Confusing the physical hostname with the Almanac device name; typos; devices not yet created in the Almanac console; running against the wrong environment's database.","solutions":["Look up the exact name in the Almanac console (Infrastructure > Almanac > Devices / Services) and pass that object's name.","If the device does not exist yet, create/bind it in Almanac before thawing.","Verify you are connected to the cluster environment that actually owns these devices."],"exampleFix":"# before\n./bin/repository thaw --promote web-01.internal   # DNS name, not an Almanac device\n# Usage exception: No device or service named \"web-01.internal\" exists.\n\n# after: use the Almanac device name\n./bin/repository thaw --promote repo-host-01","handlingStrategy":"validation","validationCode":"# Confirm the name exists as an Almanac device or service before thawing\nname='repo-host-01'\nfound=$(mysql -N -B phabricator_almanac -e \\\n  \"SELECT (SELECT COUNT(*) FROM almanac_device WHERE name = '$name')\n        + (SELECT COUNT(*) FROM almanac_service WHERE name = '$name')\")\n[ \"$found\" -ge 1 ] || { echo \"no Almanac device/service named $name\" >&2; exit 1; }\n./bin/repository thaw --promote \"$name\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use Almanac object names, not DNS hostnames or IPs, as thaw targets.","Maintain a mapping of cluster hosts to their Almanac device names in runbooks."],"tags":["php","phabricator","cli","thaw","almanac","clustering","entity-not-found"],"backgroundTag":"device-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}