{"record":{"id":"20474e2945250ae4","repo":"kubernetes/kops","slug":"unknown-arch-q-20474e","errorCode":null,"errorMessage":"unknown arch: %q","messagePattern":"unknown arch: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodemodel/wellknownassets/runc.go","lineNumber":91,"sourceCode":"}\n\nfunc findRuncVersionUrl(arch architectures.Architecture, version string) (string, error) {\n\tsv, err := semver.ParseTolerant(version)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"unable to parse version string: %q\", version)\n\t}\n\tif sv.LT(semver.MustParse(\"1.1.0\")) {\n\t\treturn \"\", fmt.Errorf(\"unsupported runc version: %q\", version)\n\t}\n\n\tvar u string\n\tswitch arch {\n\tcase architectures.ArchitectureAmd64:\n\t\tu = fmt.Sprintf(runcVersionUrlAmd64, version)\n\tcase architectures.ArchitectureArm64:\n\t\tu = fmt.Sprintf(runcVersionUrlArm64, version)\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"unknown arch: %q\", arch)\n\t}\n\n\tif u == \"\" {\n\t\treturn \"\", fmt.Errorf(\"unknown url for runc version: %s - %s\", arch, version)\n\t}\n\n\treturn u, nil\n}\n","sourceCodeStart":73,"sourceCodeEnd":100,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodemodel/wellknownassets/runc.go#L73-L100","documentation":"findRuncVersionUrl maps the CPU architecture to a runc download URL; only amd64 and arm64 have mappings. Any other architecture value falls through to the default case and returns this error instead of guessing a URL.","triggerScenarios":"Calling FindRuncAsset with arch other than architectures.ArchitectureAmd64 or ArchitectureArm64 (e.g. ArchitectureArmhf, ppc64le, or a corrupted/unset architecture string).","commonSituations":"Building images for niche/legacy machine types; a machine architecture field in the instance group or config that is misspelled or from an older kOps enum; porting to a non-x86/arm cloud instance family.","solutions":["Use an amd64 or arm64 instance type / machine image for the node pool.","Fix the architecture value passed in (must exactly match kops/architectures constants).","Vendor/build runc yourself for the architecture and bypass the asset lookup."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"switch arch {\ncase architectures.ArchitectureAmd64, architectures.ArchitectureArm64:\n    // ok\ndefault:\n    return fmt.Errorf(\"arch %q not supported for runc assets\", arch)\n}","typeGuard":null,"tryCatchPattern":"u, err := FindRuncAsset(arch, version)\nif err != nil && strings.Contains(err.Error(), \"unknown arch\") {\n    u, err = FindRuncAsset(architectures.ArchitectureAmd64, version) // or fail fast\n}","preventionTips":["Always derive arch from kops/architectures constants, never free-form strings","Validate instance-group machine types map to amd64/arm64","Normalize arch strings (x86_64 -> amd64) before calling asset helpers"],"tags":["runc","architecture","asset-download"],"backgroundTag":"unsupported-architecture","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"}