{"record":{"id":"3eaa085f7236973e","repo":"Netflix/chaosmonkey","slug":"termination-failed","errorCode":null,"errorMessage":"termination failed","messagePattern":"termination failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"term/term.go","lineNumber":177,"sourceCode":"\t\treturn errors.Wrap(err, \"not terminating: check for min time between terminations failed\")\n\t}\n\n\t//\n\t// Record the termination with configured trackers\n\t//\n\tfor _, tracker := range d.Trackers {\n\t\terr = tracker.Track(trm)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"not terminating: recording termination event failed\")\n\t\t}\n\t}\n\n\t//\n\t// Actual instance termination happens here\n\t//\n\terr = killer.Execute(trm)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"termination failed\")\n\t}\n\n\treturn nil\n}\n\n// PickRandomInstance randomly selects an eligible instance from a group\nfunc PickRandomInstance(group grp.InstanceGroup, cfg chaosmonkey.AppConfig, dep deploy.Deployment) (chaosmonkey.Instance, bool) {\n\tinstances, err := eligible.Instances(group, cfg.Exceptions, dep)\n\tif err != nil {\n\t\tlog.Printf(\"WARNING: eligible.Instances failed for %s: %v\", group, err)\n\t\treturn nil, false\n\t}\n\tif len(instances) == 0 {\n\t\treturn nil, false\n\t}\n\n\tr := rand.New(rand.NewSource(time.Now().UnixNano()))\n\tindex := r.Intn(len(instances))","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/Netflix/chaosmonkey/blob/eaa28fb761c0ebe8644d1333e5d164e9cc3071e9/term/term.go#L159-L195","documentation":"Returned by doTerminate when the actual kill call (Terminator.Execute, e.g. the Spinnaker terminate POST or the leashed no-op killer) fails; all prior checks passed but the instance termination itself did not complete.","triggerScenarios":"Thrown at term/term.go:177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the Spinnaker API failure reason","Verify instance ID validity and API permissions","Retry the termination; transient Spinnaker errors are common"],"exampleFix":null,"handlingStrategy":"retry","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"}