{"record":{"id":"8ed5c9157459353f","repo":"kubernetes/kops","slug":"no-sources-specified","errorCode":null,"errorMessage":"no sources specified","messagePattern":"no sources specified","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/nodetasks/load_image.go","lineNumber":109,"sourceCode":"func (e *LoadImageTask) Run(c *fi.NodeupContext) error {\n\treturn fi.NodeupDefaultDeltaRunMethod(e, c)\n}\n\nfunc (_ *LoadImageTask) CheckChanges(a, e, changes *LoadImageTask) error {\n\treturn nil\n}\n\nfunc (_ *LoadImageTask) RenderLocal(t *local.LocalTarget, a, e, changes *LoadImageTask) error {\n\t// Not adding ctx to signature as RenderLocal seems to be part of a common interface\n\tctx := context.TODO()\n\thash, err := hashing.FromString(e.Hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\turls := e.Sources\n\tif len(urls) == 0 {\n\t\treturn fmt.Errorf(\"no sources specified\")\n\t}\n\n\tif !isContainerdReady() {\n\t\treturn fi.NewTryAgainLaterError(\"waiting for containerd to be ready\")\n\t}\n\n\tfor _, url := range urls {\n\t\terr = importContainerImage(ctx, url, hash, t.CacheDir)\n\t\tif err == nil {\n\t\t\treturn nil\n\t\t}\n\t\tklog.Warningf(\"error importing image from url %q: %v\", url, err)\n\t\tif errors.Is(err, errCtrImport) {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// All sources failed at download. Throttle to avoid runaway bandwidth costs.","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/nodetasks/load_image.go#L91-L127","documentation":"The load_image nodeup task (ctr images pull/import for containerd) requires at least one entry in Sources; rendering it with an empty list is a programming/config error, so RenderLocal fails fast with this message before touching containerd.","triggerScenarios":"A LoadImage task is created with no Sources entries — e.g. the image source list is built conditionally and all conditions were false, or the task was constructed manually without Sources.","commonSituations":"A kOps version/feature flag where the CNI or addon image URL was not populated for the channel/arch; custom nodeup tasks building LoadImage with an empty slice; misconfigured image mirror list.","solutions":["Ensure at least one source URL is set on the LoadImage task for the node's arch","Check the code/spec path that populates Sources (CNI asset, addon assets) for empty results","Verify the cluster spec's asset URLs are non-empty for your kubernetes version","If building LoadImage conditionally, skip creating the task entirely when no sources exist"],"exampleFix":"// before\ne.Sources = []string{} // task created anyway\n// after\nif len(sources) == 0 { return nil } // don't create LoadImage task\ne.Sources = sources","handlingStrategy":"validation","validationCode":"if len(e.Sources) == 0 {\n  return fmt.Errorf(\"LoadImage %s has no sources; check asset configuration\", e.Name)\n}","typeGuard":null,"tryCatchPattern":"if err := t.RenderLocal(ctx, a, b); err != nil {\n  if err.Error() == \"no sources specified\" {\n    return fmt.Errorf(\"image sources not configured for this arch/channel: %w\", err)\n  }\n  return err\n}","preventionTips":["Only create LoadImage tasks when a source URL resolves","Verify CNI/addon assets exist for the target arch","Log the resolved source list during task construction"],"tags":["nodeup","loadimage","containerd"],"backgroundTag":"no-sources-specified","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}