{"record":{"id":"3c7d81f03bb8177a","repo":"pentaho/pentaho-kettle","slug":"modify-slave-server-modify-cluster-schema-modify-partition","errorCode":null,"errorMessage":"MODIFY_SLAVE_SERVER/MODIFY_CLUSTER_SCHEMA/MODIFY_PARTITION_SCHEMA : repository is read-only","messagePattern":"MODIFY_SLAVE_SERVER/MODIFY_CLUSTER_SCHEMA/MODIFY_PARTITION_SCHEMA : repository is read-only","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/filerep/KettleFileRepositorySecurityProvider.java","lineNumber":100,"sourceCode":"\n        case MODIFY_DATABASE:\n          if ( capabilities.isReadOnly() ) {\n            throw new KettleException( operation + \" : repository is read-only\" );\n          }\n          break;\n        case DELETE_DATABASE:\n          if ( capabilities.isReadOnly() ) {\n            throw new KettleException( operation + \" : repository is read-only\" );\n          }\n          break;\n        case EXPLORE_DATABASE:\n          break;\n\n        case MODIFY_SLAVE_SERVER:\n        case MODIFY_CLUSTER_SCHEMA:\n        case MODIFY_PARTITION_SCHEMA:\n          if ( capabilities.isReadOnly() ) {\n            throw new KettleException( operation + \" : repository is read-only\" );\n          }\n          break;\n        case DELETE_SLAVE_SERVER:\n        case DELETE_CLUSTER_SCHEMA:\n        case DELETE_PARTITION_SCHEMA:\n          if ( capabilities.isReadOnly() ) {\n            throw new KettleException( operation + \" : repository is read-only\" );\n          }\n          break;\n\n        default:\n          throw new KettleException( \"Operation [\" + operation + \"] is unknown to the security handler.\" );\n\n      }\n    }\n  }\n\n  public boolean isReadOnly() {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/filerep/KettleFileRepositorySecurityProvider.java#L82-L118","documentation":"validateAction groups MODIFY_SLAVE_SERVER, MODIFY_CLUSTER_SCHEMA and MODIFY_PARTITION_SCHEMA into one read-only check; any attempt to save or update these cluster/partition shared objects on a read-only file repository throws this KettleException.","triggerScenarios":"Saving a SlaveServer, ClusterSchema or PartitionSchema via KettleFileRepository.save (which calls validateAction with the corresponding MODIFY_* operation) while capabilities.isReadOnly() is true.","commonSituations":"Deploying cluster or partition definitions into a shared, read-only repository directory; CI jobs connecting read-only; viewers in Spoon attempting to edit shared cluster config.","solutions":["Reconnect with read-only=false so MODIFY_* operations pass validation.","Write the slave/cluster/partition definitions to a writable repository location.","Fix mount/permission issues if the read-only state comes from the OS rather than configuration.","Skip persistence and keep these objects local to the transformation metadata instead of the repository."],"exampleFix":"// before\nrepoMeta.setReadOnly(true);\nrepo.save(clusterSchema, \"update cluster\", null, true);\n// after\nrepoMeta.setReadOnly(false);\nrepo.connect();\nrepo.save(clusterSchema, \"update cluster\", null, true);","handlingStrategy":"try-catch","validationCode":"if (repo.getSecurityProvider().isReadOnly()) {\n  throw new IllegalStateException(\"Repository read-only; cannot save cluster/partition/slave definitions\");\n}","typeGuard":"boolean canSaveSharedObjects = repo != null\n    && !repo.getSecurityProvider().isReadOnly();","tryCatchPattern":"try {\n  repo.save(partitionSchema, comment, null, true);\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"repository is read-only\")) {\n    // switch to writable repository or store locally\n  } else { throw e; }\n}","preventionTips":["Check repository capabilities before persisting slave/cluster/partition objects.","Keep deployment environments' repository mounts writable for CI that saves shared objects.","Validate repository meta read-only flag right after connect()."],"tags":["repository","read-only","cluster-schema"],"backgroundTag":"permission-denied","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}