{"record":{"id":"a37ac909db774ee7","repo":"Netflix/chaosmonkey","slug":"not-terminating-could-not-determine-leashed-statu","errorCode":null,"errorMessage":"not terminating: could not determine leashed status","messagePattern":"not terminating: could not determine leashed status","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"term/term.go","lineNumber":99,"sourceCode":"\tif !accountEnabled {\n\t\tlog.Printf(\"Not terminating: account=%s is not enabled in Chaos Monkey\", account)\n\t\treturn nil\n\t}\n\n\t// create an instance group from the command-line parameters\n\tgroup := grp.New(app, account, region, stack, cluster)\n\n\t// do the actual termination\n\treturn doTerminate(d, group)\n\n}\n\n// doTerminate does the actual termination\nfunc doTerminate(d deps.Deps, group grp.InstanceGroup) error {\n\tleashed, err := d.MonkeyCfg.Leashed()\n\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"not terminating: could not determine leashed status\")\n\t}\n\n\t/*\n\t\tDo not allow running unleashed in the test environment.\n\n\t\tThe prod deployment of chaos monkey is responsible for killing instances\n\t\tacross environments, including test. We want to ensure that Chaos Monkey\n\t\trunning in test cannot do harm.\n\t*/\n\tif d.Env.InTest() && !leashed {\n\t\treturn UnleashedInTestEnv{}\n\t}\n\n\tvar killer chaosmonkey.Terminator\n\n\tif leashed {\n\t\tkiller = leashedKiller{}\n\t} else {","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/Netflix/chaosmonkey/blob/eaa28fb761c0ebe8644d1333e5d164e9cc3071e9/term/term.go#L81-L117","documentation":"Fires at the start of doTerminate when d.MonkeyCfg.Leashed() fails, so the terminator cannot determine whether it should run leashed (simulated) or unleashed (real termination). Since the leashed status gates which Terminator is used, termination is aborted with the wrapped config error rather than proceeding unsafely.","triggerScenarios":"Thrown at term/term.go:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set a valid boolean 'leashed' value in the config","Fix any config parse errors that make the flag unreadable"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eaa28fb761c0ebe8644d1333e5d164e9cc3071e9","analyzedAt":"2026-09-03T17:04:39.020Z","contentChangedAt":"2026-09-03T17:04:39.020Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}