{"record":{"id":"98031c52566c57f0","repo":"apache/cassandra","slug":"nodetool-bootstrap-resume-is-disabled","errorCode":null,"errorMessage":"'nodetool bootstrap resume' is disabled.","messagePattern":"'nodetool bootstrap resume' is disabled\\.","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/tools/nodetool/BootstrapResume.java","lineNumber":46,"sourceCode":"import static org.apache.cassandra.config.CassandraRelevantProperties.RESET_BOOTSTRAP_PROGRESS;\n\n@Command(name = \"resume\", description = \"Resume bootstrap streaming\")\npublic class BootstrapResume extends AbstractCommand\n{\n    @Option(paramLabel = \"force\",\n            names = { \"-f\", \"--force\" },\n            description = { \"Use --force to resume bootstrap regardless of \",\n                            \"cassandra.reset_bootstrap_progress environment variable. WARNING:\",\n                            \"This is potentially dangerous, see CASSANDRA-17679\" })\n    private boolean force = false;\n\n    @Override\n    protected void execute(NodeProbe probe)\n    {\n        try\n        {\n            if ((!RESET_BOOTSTRAP_PROGRESS.isPresent() || RESET_BOOTSTRAP_PROGRESS.getBoolean()) && !force)\n                throw new RuntimeException(\"'nodetool bootstrap resume' is disabled.\");\n            probe.resumeBootstrap(probe.output().out);\n        }\n        catch (IOException e)\n        {\n            throw new IOError(e);\n        }\n    }\n}\n","sourceCodeStart":28,"sourceCodeEnd":55,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/nodetool/BootstrapResume.java#L28-L55","documentation":"'nodetool bootstrap resume' is disabled unless the user explicitly forces it. execute() throws RuntimeException when the resume flag indicates the action was not chosen (RESET_BOOTSTRAP_PROGRESS absent or false) and --force was not passed, because resuming bootstrap resets progress and is destructive by default.","triggerScenarios":"Running 'nodetool bootstrap resume' without --force; running with RESET_BOOTSTRAP_PROGRESS option unset/false; scripts invoking resume non-interactively without the force flag.","commonSituations":"Operators trying to restart a stuck bootstrap; automation resuming bootstrap without human confirmation; misunderstanding that resume wipes existing bootstrap progress.","solutions":["Re-run with --force: nodetool bootstrap resume --force","Confirm you want to discard the interrupted bootstrap state before forcing","If the intent is merely to retry streaming, consider letting the node retry bootstrap normally instead of resuming"],"exampleFix":"// before\nnodetool bootstrap resume\n// after\nnodetool bootstrap resume --force","handlingStrategy":"try-catch","validationCode":"// confirm intent before invoking\nboolean sure = prompt(\"Resume bootstrap and discard progress? (y/N)\").equalsIgnoreCase(\"y\");\nString[] cmd = sure ? new String[]{\"bootstrap\",\"resume\",\"--force\"} : null;","typeGuard":null,"tryCatchPattern":"try {\n    runNodetool(\"bootstrap\", \"resume\", \"--force\");\n} catch (RuntimeException e) {\n    if (e.getMessage().contains(\"disabled\")) {\n        // retry with --force after operator confirmation\n    }\n}","preventionTips":["Remember resume discards bootstrap progress — always use --force deliberately","Never put resume in unattended scripts without confirmation","Check reset-bootstrap progress semantics before running"],"tags":["nodetool","cli","bootstrap","destructive-operation"],"backgroundTag":"missing-required-flag","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}