Netflix/chaosmonkey · error
the account name doesn't exist
Error message
the account name doesn't exist
What it means
account() looks up a named account from the Spinnaker accounts list and returns this sentinel error when no account in the response matches the requested name. It means Spinnaker does not know the account name Chaos Monkey asked for.
Source
Thrown at spinnaker/spinnaker.go:548
statusKO := resp.StatusCode != http.StatusOK
// Finally find account
for _, a := range accounts {
if a.Name != name {
continue
}
if statusKO {
if a.Error == "" {
return ac, errors.Errorf("unexpected status code: %d. body: %s", resp.StatusCode, body)
}
return ac, errors.Errorf("unexpected status code: %d. error: %s", resp.StatusCode, a.Error)
}
return a, nil
}
return ac, errors.New("the account name doesn't exist")
}
// GetClusterNames returns a list of cluster names for an app
func (s Spinnaker) GetClusterNames(app string, account D.AccountName) (clusters []D.ClusterName, err error) {
url := s.appURL(app)
resp, err := s.client.Get(url)
if err != nil {
return nil, errors.Wrapf(err, "http get failed at %s", url)
}
defer func() {
if cerr := resp.Body.Close(); cerr != nil && err == nil {
err = errors.Wrapf(err, "body close failed at %s", url)
}
}()
if resp.StatusCode != http.StatusOK {
return nil, errors.Errorf("unexpected response code (%d) from %s", resp.StatusCode, url)View on GitHub (pinned to eaa28fb761)
Solutions
- List accounts from Spinnaker (GET <endpoint>/accounts) and confirm the exact spelling/case of the account name
- Update chaosmonkey's config (enabled accounts) to use names that exist in Spinnaker
- Re-add or rename the account in the Spinnaker/clouddriver configuration if it was deleted or renamed
- Verify chaosmonkey is pointed at the intended Spinnaker endpoint
Example fix
// before (chaosmonkey config) chaosmonkey: accounts: [prod, test, staging] // after (only accounts that exist in Spinnaker) chaosmonkey: accounts: [prod, test]
Defensive patterns
Strategy: validation
Validate before calling
// Pre-validate account names against Spinnaker's account list:
func accountExists(endpoint, clientCert, name string) (bool, error) {
resp, err := http.Get(endpoint + "/accounts")
if err != nil { return false, err }
var accounts []struct{ Name string `json:"name"` }
if err := json.NewDecoder(resp.Body).Decode(&accounts); err != nil { return false, err }
for _, a := range accounts {
if a.Name == name { return true, nil }
}
return false, nil
} Try / catch
provider, err := spin.CloudProvider(app)
if err != nil {
if strings.Contains(err.Error(), "account name doesn't exist") {
log.Printf("account missing in Spinnaker, skipping %s", app)
return nil
}
return err
} Prevention
- Keep chaosmonkey's account list in sync with clouddriver config
- Use exact case-sensitive account names
- Re-validate config after renaming/removing accounts in Spinnaker
- Point chaosmonkey at the correct Spinnaker endpoint
When it happens
Trigger: Calling account(name) (e.g. via CloudProvider -> GetApp) where the HTTP request succeeds and the account list parses fine, but none of the returned accounts' name field equals the requested name.
Common situations: Typo or case mismatch between the account name in chaosmonkey config and the name registered in Spinnaker; account removed/renamed in Spinnaker (clouddriver config) while chaosmonkey still references it; chaosmonkey pointed at the wrong Spinnaker endpoint that lacks the account.
Related errors
- retrieve cloud provider failed
- 'attributes' field missing
- 'attributes.chaosMonkey' field missing
- 'attributes.chaosMonkey.enabled' field missing
- attributes.chaosMonkey.meanTimeBetweenKillsInWorkDays missin
AI-assisted analysis of Netflix/chaosmonkey@eaa28fb761 (2026-09-03).
Data as JSON: /api/errors/a463a10d68b1844a.
Report an issue: GitHub.