{"record":{"id":"b4840cada84013cd","repo":"Netflix/chaosmonkey","slug":"failed-to-populate-schedule-v","errorCode":null,"errorMessage":"failed to populate schedule: %v","messagePattern":"failed to populate schedule: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"command/schedule.go","lineNumber":64,"sourceCode":"\t during terminations. That way, if chaos monkey is disabled during\n\t scheduling time but later in the day becomes enabled, it still\n\t functions correctly.\n\t*/\n\terr = do(d, g, ss, cfg, cons, apps)\n\n\tif err != nil {\n\t\tlog.Fatalf(\"FATAL: %v\", err)\n\t}\n\n}\n\n// do is the actual implementation for the Schedule function\nfunc do(d deploy.Deployment, g chaosmonkey.AppConfigGetter, ss schedstore.SchedStore, cfg *config.Monkey, cons schedule.Constrainer, apps []string) error {\n\n\ts := schedule.New()\n\terr := s.Populate(d, g, cfg, apps)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to populate schedule: %v\", err)\n\t}\n\n\t// Filter out terminations that violate constrains\n\tsched := cons.Filter(*s)\n\n\terr = deploySchedule(&sched, ss, cfg)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to deploy schedule: %v\", err)\n\t}\n\n\treturn nil\n}\n\n// deploySchedule publishes the schedule to chaosmonkey-api\n// and registers the schedule with the local cron\nfunc deploySchedule(s *schedule.Schedule, ss schedstore.SchedStore, cfg *config.Monkey) error {\n\tloc, err := cfg.Location()\n\tif err != nil {","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/Netflix/chaosmonkey/blob/eaa28fb761c0ebe8644d1333e5d164e9cc3071e9/command/schedule.go#L46-L82","documentation":"The schedule command (command/schedule.go do()) builds the termination schedule via schedule.Schedule.Populate, which fetches app configs and allowed/previous terminations from the deployment backend. Any error returned by Populate is wrapped with this message, so the schedule could not be assembled and nothing was deployed. The underlying cause is appended with %v.","triggerScenarios":"Running the schedule command (Schedule -> do) when s.Populate fails: deployment API errors (e.g. appengine fetch failures), AppConfigGetter errors, or errors listing allowed terminations for the requested apps.","commonSituations":"Cloud Datastore / deployment service outages or permission errors, invalid app names passed to the command, missing or misconfigured AppConfigGetter credentials, or network failures in the deployment environment.","solutions":["Read the wrapped cause after the colon to identify the real failure (API error, permission, bad app name).","Verify the deployment backend (e.g. Datastore) is reachable and credentials/permissions are correct.","Check the app names passed on the command line exist in the deployment environment.","Retry the command once transient network/service errors have been ruled out."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before scheduling, sanity-check inputs and backend reachability\nif len(apps) == 0 {\n    return errors.New(\"no apps specified for scheduling\")\n}\nif _, err := g.GetConfig(apps[0]); err != nil {\n    return fmt.Errorf(\"deployment backend unreachable: %v\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := do(dep, appCfgGetter, schedStore, cfg, constrainer, apps); err != nil {\n    if strings.HasPrefix(err.Error(), \"failed to populate schedule:\") {\n        log.Errorf(\"schedule population failed, cause: %v\", errors.Unwrap(err))\n        // inspect wrapped cause; retry only on transient errors\n        return err\n    }\n    return err\n}","preventionTips":["Verify deployment backend credentials and permissions before running the schedule command.","Validate app names against the deployment environment beforehand.","Monitor Datastore/deployment API health; alert on outages.","Retry with backoff for transient network errors when populating the schedule."],"tags":["schedule","config","go"],"backgroundTag":"schedule-population-failed","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"}