{"record":{"id":"e813f0cba05bc2e8","repo":"kubernetes/kops","slug":"unknown-arch-q","errorCode":null,"errorMessage":"unknown arch: %q","messagePattern":"unknown arch: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodemodel/wellknownassets/containerd.go","lineNumber":89,"sourceCode":"}\n\nfunc findContainerdVersionUrl(arch architectures.Architecture, version string) (*url.URL, error) {\n\tsv, err := semver.ParseTolerant(version)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to parse version string: %q\", version)\n\t}\n\tif sv.LT(semver.MustParse(\"2.1.0\")) {\n\t\treturn nil, fmt.Errorf(\"unsupported legacy containerd version: %q\", version)\n\t}\n\n\tvar u string\n\tswitch arch {\n\tcase architectures.ArchitectureAmd64:\n\t\tu = fmt.Sprintf(containerdReleaseUrlAmd64, version, version)\n\tcase architectures.ArchitectureArm64:\n\t\tu = fmt.Sprintf(containerdReleaseUrlArm64, version, version)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown arch: %q\", arch)\n\t}\n\n\treturn url.Parse(u)\n}\n\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","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodemodel/wellknownassets/containerd.go#L71-L107","documentation":"The release URL template is architecture-specific (amd64 vs arm64). If findContainerdVersionUrl receives any other architecture it cannot construct a download URL and returns this error. It is a defensive default branch that surfaces unsupported architectures early instead of producing a broken URL.","triggerScenarios":"FindContainerdAsset is invoked with an arch value outside architectures.ArchitectureAmd64 / ArchitectureArm64 — e.g. an unsupported/typo'd arch on the instance group or a wrong enum passed by a caller.","commonSituations":"Provisioning for a niche CPU (ppc64le, s390x, riscv64) that kOps containerd assets do not cover; programmatic callers passing an uninitialized or custom arch value; test code passing an invalid architecture.","solutions":["Set the instance group machine type to an amd64 or arm64 instance so the resolved arch is supported","Fix programmatic callers to pass architectures.ArchitectureAmd64 or ArchitectureArm64","If another arch is truly needed, host containerd binaries yourself and use the Packages/canonical URL path instead of version-based resolution"],"exampleFix":"// before\nFindContainerdAsset(ig, b, \"armhf\")\n// after\nFindContainerdAsset(ig, b, architectures.ArchitectureArm64)","handlingStrategy":"validation","validationCode":"switch arch {\ncase architectures.ArchitectureAmd64, architectures.ArchitectureArm64:\n    // ok\ndefault:\n    return fmt.Errorf(\"arch %q not supported for containerd assets; use amd64 or arm64\", arch)\n}","typeGuard":null,"tryCatchPattern":"asset, err := wellknownassets.FindContainerdAsset(ig, assetBuilder, arch)\nif err != nil && strings.Contains(err.Error(), \"unknown arch\") {\n    return fmt.Errorf(\"instance group architecture is not supported for containerd assets: %w\", err)\n}","preventionTips":["Choose instance types that map to amd64/arm64","Derive the arch from the machine type rather than hardcoding","Document supported architectures for any internal tooling calling FindContainerdAsset"],"tags":["containerd","architecture","unsupported-platform"],"backgroundTag":"unsupported-cpu-architecture","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"}