Netflix/chaosmonkey · error

not terminating: could not determine leashed status

Error message

not terminating: could not determine leashed status

What it means

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.

Source

Thrown at term/term.go:99

	if !accountEnabled {
		log.Printf("Not terminating: account=%s is not enabled in Chaos Monkey", account)
		return nil
	}

	// create an instance group from the command-line parameters
	group := grp.New(app, account, region, stack, cluster)

	// do the actual termination
	return doTerminate(d, group)

}

// doTerminate does the actual termination
func doTerminate(d deps.Deps, group grp.InstanceGroup) error {
	leashed, err := d.MonkeyCfg.Leashed()

	if err != nil {
		return errors.Wrap(err, "not terminating: could not determine leashed status")
	}

	/*
		Do not allow running unleashed in the test environment.

		The prod deployment of chaos monkey is responsible for killing instances
		across environments, including test. We want to ensure that Chaos Monkey
		running in test cannot do harm.
	*/
	if d.Env.InTest() && !leashed {
		return UnleashedInTestEnv{}
	}

	var killer chaosmonkey.Terminator

	if leashed {
		killer = leashedKiller{}
	} else {

View on GitHub (pinned to eaa28fb761)

Solutions

  1. Set a valid boolean 'leashed' value in the config
  2. Fix any config parse errors that make the flag unreadable
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at term/term.go:99 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/a37ac909db774ee7. Report an issue: GitHub.