{"record":{"id":"5e7bddcc006f0b81","repo":"theonedev/onedev","slug":"specified-workspace-provisioner-provisioner-i","errorCode":null,"errorMessage":"Specified workspace provisioner '${provisioner}' is disabled","messagePattern":"Specified workspace provisioner '(.+?)' is disabled","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/workspace/DefaultWorkspaceService.java","lineNumber":742,"sourceCode":"\t\tfor (var discoverer : discoverers) {\n\t\t\tWorkspaceProvisioner provisioner = discoverer.discover();\n\t\t\tif (provisioner != null) {\n\t\t\t\tprovisioner.setName(AUTO_DISCOVERED_PROVISIONER_NAME);\n\t\t\t\tif (isApplicable(workspace, spec, provisioner))\n\t\t\t\t\treturn provisioner;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprivate WorkspaceProvisioner getProvisioner(Workspace workspace, WorkspaceSpec spec, TaskLogger logger) {\n\t\tif (spec.getProvisioner() != null) {\n\t\t\tvar provisioner = settingService.getWorkspaceProvisioners().stream()\n\t\t\t\t.filter(it -> it.getName().equals(spec.getProvisioner()))\n\t\t\t\t.findFirst()\n\t\t\t\t.orElseThrow(() -> new ExplicitException(\"Unable to find specified workspace provisioner '\" + spec.getProvisioner() + \"'\"));\n\t\t\tif (!provisioner.isEnabled())\n\t\t\t\tthrow new ExplicitException(\"Specified workspace provisioner '\" + spec.getProvisioner() + \"' is disabled\");\n\t\t\telse if (!isApplicable(workspace, spec, provisioner))\n\t\t\t\tthrow new ExplicitException(\"Specified workspace provisioner '\" + spec.getProvisioner() + \"' is not applicable for current workspace\");\n\t\t\telse\n\t\t\t\treturn provisioner;\n\t\t} else if (!settingService.getWorkspaceProvisioners().isEmpty()) {\n\t\t\treturn settingService.getWorkspaceProvisioners().stream()\n\t\t\t\t.filter(it -> it.isEnabled() && isApplicable(workspace, spec, it))\n\t\t\t\t.findFirst()\n\t\t\t\t.orElseThrow(() -> new ExplicitException(\"No applicable workspace provisioner\"));\n\t\t} else {\n\t\t\tlogger.log(\"No workspace provisioner defined, auto-discovering...\");\n\t\t\tvar provisioner = discoverProvisioner(workspace, spec);\n\t\t\tif (provisioner != null) {\n\t\t\t\tlogger.log(\"Discovered \" + EditableUtils.getDisplayName(provisioner.getClass()).toLowerCase());\n\t\t\t\treturn provisioner;\n\t\t\t}\n\n\t\t\tif (spec.isRunInContainer()) {","sourceCodeStart":724,"sourceCodeEnd":760,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/workspace/DefaultWorkspaceService.java#L724-L760","documentation":"When a workspace spec explicitly names a provisioner (spec.getProvisioner()), DefaultWorkspaceService looks it up among configured workspace provisioners and checks it is enabled. A provisioner found by name but with isEnabled()==false throws ExplicitException — the named provisioner is intentionally disabled in settings.","triggerScenarios":"A job/workspace spec sets provisioner: '<name>' while that provisioner exists in Administration > Workspace Provisioners but is disabled.","commonSituations":"Admin disabled a provisioner temporarily (e.g. k8s outage) while CI configs still reference it; copying job YAML between servers where one has the provisioner disabled; forgetting to re-enable after maintenance.","solutions":["Enable the named provisioner in Administration > Workspace Provisioners.","Or change the job's workspace spec to use an enabled provisioner.","Or remove the explicit provisioner name so auto-discovery picks an applicable enabled one."],"exampleFix":"// before (job YAML)\nprovisioner: k8s-pool   # disabled in admin settings\n// after\nprovisioner: docker-pool  # or omit to auto-discover","handlingStrategy":"validation","validationCode":"// via API: GET workspace provisioners settings; assert named provisioner exists and isEnabled()","typeGuard":null,"tryCatchPattern":"try { provision(...); } catch (ExplicitException e) { if (e.getMessage().contains(\"is disabled\")) { /* re-enable or switch provisioner */ } }","preventionTips":["Keep CI configs and admin provisioner settings in sync.","Audit provisioner enabled state after maintenance windows.","Avoid hardcoding provisioner names when auto-discovery suffices."],"tags":["provisioner","configuration","workspace"],"backgroundTag":"feature-not-enabled","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}