{"record":{"id":"5e216bd5fb1d9f24","repo":"kubernetes/kops","slug":"unable-to-remap-asset-w","errorCode":null,"errorMessage":"unable to remap asset: %w","messagePattern":"unable to remap asset: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodemodel/wellknownassets/containerd.go","lineNumber":112,"sourceCode":"\nfunc buildFileAsset(assetBuilder *assets.AssetBuilder, canonicalURL string, knownHashString string) (*assets.FileAsset, error) {\n\tu, err := url.Parse(canonicalURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to parse asset URL %q: %w\", canonicalURL, err)\n\t}\n\n\tvar knownHash *hashing.Hash\n\tif knownHashString != \"\" {\n\t\th, err := hashing.FromString(knownHashString)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to parse asset hash %q: %w\", knownHashString, err)\n\t\t}\n\t\tknownHash = h\n\t}\n\n\tasset, err := assetBuilder.RemapFile(u, knownHash)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to remap asset: %w\", err)\n\t}\n\n\treturn asset, nil\n}\n","sourceCodeStart":94,"sourceCodeEnd":117,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodemodel/wellknownassets/containerd.go#L94-L117","documentation":"After URL parsing and optional hash parsing, buildFileAsset calls assetBuilder.RemapFile to resolve the asset to its final location/hash (mirrors, vendored copies). A failure there is wrapped with this message. It means the containerd-family asset could not be resolved into a concrete FileAsset for provisioning.","triggerScenarios":"FindContainerdAsset, FindNerdctlAsset, or FindRuncAsset supply a valid URL but assetBuilder.RemapFile errors — typically mirror unavailability, network failure while hashing the remote asset, or a hash mismatch with the remapped copy.","commonSituations":"Corporate proxy/firewall blocking GitHub release downloads during kops create; asset mirror not synced with the requested containerd/nerdctl/runc release; transient 5xx from the download host during offline-ish CI builds.","solutions":["Read the wrapped cause: network errors → retry after restoring connectivity; hash mismatch → confirm the expected hash matches the mirror's copy","Ensure the configured asset mirror actually hosts the exact containerd/nerdctl/runc release being requested","Remove custom mirror overrides to fall back to upstream GitHub release URLs","Re-run kops once network access to the asset host is confirmed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify the asset host resolves and serves the release before remapping\nif resp, err := http.Head(canonicalURL); err != nil || resp.StatusCode >= 400 {\n    return fmt.Errorf(\"asset host not ready for %s: status=%d err=%v\", canonicalURL, resp.StatusCode, err)\n}","typeGuard":null,"tryCatchPattern":"asset, err := wellknownassets.FindContainerdAsset(ig, assetBuilder, arch)\nvar remapErr *fmt.Errorf\nif err != nil && errors.As(err, &remapErr) && strings.Contains(err.Error(), \"unable to remap asset\") {\n    // transient network/mirror failure: retry with backoff, then surface wrapped cause\n    return retryWithBackoff(3, func() error { _, err = wellknownassets.FindContainerdAsset(ig, assetBuilder, arch); return err })\n}","preventionTips":["Mirror containerd/nerdctl/runc assets internally with matching hashes","Confirm egress to GitHub releases from CI before kops runs","Re-hash mirrored assets after sync so expected hashes stay valid"],"tags":["containerd","asset-remap","mirroring"],"backgroundTag":"asset-remap-failed","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"}