{"record":{"id":"aefb52f7a976140c","repo":"kubernetes/kops","slug":"trying-to-locate-asset-q-v","errorCode":null,"errorMessage":"trying to locate asset %q: %v","messagePattern":"trying to locate asset %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nodeup/pkg/model/kubelet.go","lineNumber":168,"sourceCode":"\t\tc.AddTask(t)\n\t}\n\n\t{\n\t\tt, err := b.buildSystemdEnvironmentFile(c.Context(), kubeletConfig)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tc.AddTask(t)\n\t}\n\n\t{\n\t\t// @TODO Extract to common function?\n\t\tassetName := \"kubelet\"\n\t\tassetPath := \"\"\n\t\t// @TODO make Find call to an interface, we cannot mock out this function because it finds a file on disk\n\t\tasset, err := b.Assets.Find(assetName, assetPath)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"trying to locate asset %q: %v\", assetName, err)\n\t\t}\n\t\tif asset == nil {\n\t\t\treturn fmt.Errorf(\"unable to locate asset %q\", assetName)\n\t\t}\n\n\t\tc.AddTask(&nodetasks.File{\n\t\t\tPath:     b.kubeletPath(),\n\t\t\tContents: asset,\n\t\t\tType:     nodetasks.FileType_File,\n\t\t\tMode:     s(\"0755\"),\n\t\t})\n\t}\n\t{\n\t\tif kubeletConfig.PodManifestPath != \"\" {\n\t\t\tt, err := b.buildManifestDirectory(kubeletConfig)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/nodeup/pkg/model/kubelet.go#L150-L186","documentation":"In the kubelet model builder, nodeup locates the `kubelet` binary asset with b.Assets.Find. If Find returns an error (I/O failure reading the on-disk asset or mirror, per the TODO noting it finds files on disk and cannot be mocked), the error is wrapped with this message.","triggerScenarios":"b.Assets.Find(\"kubelet\", \"\") returns a non-nil error — e.g. filesystem error scanning the cache/mirror directory, or the HTTP mirror fetch for the kubelet asset fails.","commonSituations":"Unreadable nodeup asset cache directory, broken download of the kubelet binary from KOPS_BASE_URL/mirror, permission problems on the assets path.","solutions":["Read the wrapped %v cause to distinguish filesystem vs download errors.","Verify the kubelet binary is present and readable in the asset mirror/cache.","Fix permissions on the nodeup assets/cache directory.","Re-upload or re-download assets, then retry nodeup."],"exampleFix":"// before\nchmod 700 /var/cache/nodeup/assets\n// after\nchmod 755 /var/cache/nodeup/assets","handlingStrategy":"validation","validationCode":"// check kubelet asset cache readability before nodeup\ninfo, err := os.Stat(filepath.Join(cacheDir, \"kubelet\"))\nif err != nil || !info.Mode().IsRegular() {\n    return fmt.Errorf(\"kubelet asset missing/unreadable in %s\", cacheDir)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the nodeup asset cache directory readable (0755 dirs, 0644 files).","Verify mirror downloads (checksums) before bootstrapping nodes.","Clear and repopulate a corrupt asset cache."],"tags":["nodeup","assets","kubelet"],"backgroundTag":"asset-not-found","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}