{"record":{"id":"5a8ee733082a2816","repo":"apache/cassandra","slug":"cassandra-system-property-flag-s-is-deprecated-an","errorCode":null,"errorMessage":"Cassandra system property flag %s is deprecated and you should use startup check configuration in cassandra.yaml","messagePattern":"Cassandra system property flag (.+?) is deprecated and you should use startup check configuration in cassandra\\.yaml","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/FileSystemOwnershipCheck.java","lineNumber":298,"sourceCode":"        }\n    }\n\n    private StartupException exception(String message)\n    {\n        return new StartupException(StartupException.ERR_WRONG_DISK_STATE, ERROR_PREFIX + message);\n    }\n\n    public boolean isEnabled(StartupChecksConfiguration options)\n    {\n        boolean enabledFromYaml = options.isEnabled(name());\n        return CassandraRelevantProperties.FILE_SYSTEM_CHECK_ENABLE.getBoolean(enabledFromYaml);\n    }\n\n    public String getFsOwnershipFilename(Map<String, Object> config)\n    {\n        if (CassandraRelevantProperties.FILE_SYSTEM_CHECK_OWNERSHIP_FILENAME.isPresent())\n        {\n            logger.warn(String.format(\"Cassandra system property flag %s is deprecated and you should \" +\n                                      \"use startup check configuration in cassandra.yaml\",\n                                      CassandraRelevantProperties.FILE_SYSTEM_CHECK_OWNERSHIP_FILENAME.getKey()));\n            return CassandraRelevantProperties.FILE_SYSTEM_CHECK_OWNERSHIP_FILENAME.getString();\n        }\n        else\n        {\n            Object fsOwnershipFilename = config.get(\"ownership_filename\");\n            return fsOwnershipFilename == null\n                   ? CassandraRelevantProperties.FILE_SYSTEM_CHECK_OWNERSHIP_FILENAME.getDefaultValue()\n                   : (String) fsOwnershipFilename;\n        }\n    }\n\n    public String getOwnershipToken(Map<String, Object> config)\n    {\n        if (CassandraRelevantProperties.FILE_SYSTEM_CHECK_OWNERSHIP_TOKEN.isPresent())\n        {\n            logger.warn(String.format(\"Cassandra system property flag %s is deprecated and you should \" +","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/FileSystemOwnershipCheck.java#L280-L316","documentation":"FileSystemOwnershipCheck warns that the FILE_SYSTEM_CHECK_OWNERSHIP_FILENAME system property (cassandra.fs_ownership_filename style flag) is deprecated; ownership-check file configuration should live in cassandra.yaml startup-check config instead. The property's value is still honored, so behavior works but emits the warning.","triggerScenarios":"getFsOwnershipFilename() is called (via tokenFilename) while the CassandraRelevantProperties.FILE_SYSTEM_CHECK_OWNERSHIP_FILENAME system property is set on the JVM command line or in jvm-server.options.","commonSituations":"Upgrades from older Cassandra versions where the ownership filename was configured via -D system property; operators copying old jvm-server.options files onto new versions.","solutions":["Move the ownership filename setting into cassandra.yaml (startup check / file_system_ownership config) and remove the -D system property from jvm-server.options","Restart and verify the warning no longer appears and ownership check still finds the token/ownership file","Search deployment tooling (ansible/chef/puppet templates) for the old flag to prevent regression"],"exampleFix":"# before (jvm-server.options)\n-Dcassandra.fs_ownership_filename=/var/lib/cassandra/ownership\n# after (cassandra.yaml)\nfile_system_ownership_check:\n  ownership_filename: /var/lib/cassandra/ownership","handlingStrategy":"validation","validationCode":"// fail fast in deployment tooling if the deprecated flag is present\nif (System.getProperty(\"cassandra.fs_ownership_filename\") != null)\n    throw new IllegalStateException(\"Use cassandra.yaml file_system_ownership config instead of the deprecated -D flag\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure ownership check settings only in cassandra.yaml","Grep jvm-server.options, cassandra-env.sh and CI images for deprecated -Dcassandra.* flags after upgrades","Treat deprecation warnings at startup as migration work items, not noise"],"tags":["deprecated","configuration","system-property"],"backgroundTag":"deprecated-api-usage","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}