Netflix/chaosmonkey · error

termination failed

Error message

termination failed

What it means

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.

Solutions

  1. Inspect the wrapped error for the Spinnaker API failure reason
  2. Verify instance ID validity and API permissions
  3. Retry the termination; transient Spinnaker errors are common
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at term/term.go:177 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Netflix/chaosmonkey@eaa28fb761 (2026-09-03). Data as JSON: /api/errors/3eaa085f7236973e. Report an issue: GitHub.

Appendix: source

Thrown at term/term.go:177

		return errors.Wrap(err, "not terminating: check for min time between terminations failed")
	}

	//
	// Record the termination with configured trackers
	//
	for _, tracker := range d.Trackers {
		err = tracker.Track(trm)
		if err != nil {
			return errors.Wrap(err, "not terminating: recording termination event failed")
		}
	}

	//
	// Actual instance termination happens here
	//
	err = killer.Execute(trm)
	if err != nil {
		return errors.Wrap(err, "termination failed")
	}

	return nil
}

// PickRandomInstance randomly selects an eligible instance from a group
func PickRandomInstance(group grp.InstanceGroup, cfg chaosmonkey.AppConfig, dep deploy.Deployment) (chaosmonkey.Instance, bool) {
	instances, err := eligible.Instances(group, cfg.Exceptions, dep)
	if err != nil {
		log.Printf("WARNING: eligible.Instances failed for %s: %v", group, err)
		return nil, false
	}
	if len(instances) == 0 {
		return nil, false
	}

	r := rand.New(rand.NewSource(time.Now().UnixNano()))
	index := r.Intn(len(instances))

View on GitHub (pinned to eaa28fb761)