{"record":{"id":"1569a71422cd6d8f","repo":"kubernetes/kops","slug":"error-determining-os-architecture-v","errorCode":null,"errorMessage":"error determining OS architecture: %v","messagePattern":"error determining OS architecture: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/command.go","lineNumber":174,"sourceCode":"\t\tnodeupConfigHash = sha256.Sum256(b)\n\tdefault:\n\t\treturn fmt.Errorf(\"no instance group defined in nodeup config\")\n\t}\n\n\tif bootConfig.NodeupConfigHash != \"\" {\n\t\tif want, got := bootConfig.NodeupConfigHash, base64.StdEncoding.EncodeToString(nodeupConfigHash[:]); got != want {\n\t\t\treturn fmt.Errorf(\"nodeup config hash mismatch (was %q, expected %q)\", got, want)\n\t\t}\n\t}\n\n\terr = evaluateSpec(&nodeupConfig, bootConfig.CloudProvider, region)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tarchitecture, err := architectures.FindArchitecture()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error determining OS architecture: %v\", err)\n\t}\n\n\tdistribution, err := distributions.FindDistribution(\"/\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error determining OS distribution: %v\", err)\n\t}\n\n\tconfigAssets := nodeupConfig.Assets[architecture]\n\tassetStore := fi.NewAssetStore(c.CacheDir)\n\tfor _, asset := range configAssets {\n\t\terr := assetStore.Add(ctx, asset)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error adding asset %q: %v\", asset, err)\n\t\t}\n\t}\n\n\t// cloud holds the AWS clients, on AWS only.\n\tvar cloud *awsup.Cloud","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/command.go#L156-L192","documentation":"After parsing the config, nodeup detects the host's CPU architecture (e.g. amd64/arm64) via architectures.FindArchitecture(), which inspects the running OS (uname/machine info). This error means that detection failed, so nodeup cannot select the right set of assets (binaries, images) for the node. Run aborts before any models are built.","triggerScenarios":"Calling NodeUpCommand.Run() on a machine where architectures.FindArchitecture() cannot determine the machine architecture — unexpected/unrecognized architecture output, unusual kernel (e.g. exotic ARM variant or constrained container), or a failing runtime query on an unsupported platform.","commonSituations":"Booting nodeup on an OS/architecture not supported by this kOps version (e.g. riscv64, s390x); running inside minimal containers where /proc or uname behaves unexpectedly; new hardware before kOps added support.","solutions":["Run nodeup on a supported architecture (amd64 or arm64) — check the machine with 'uname -m' and, if wrong, fix the instance type / image of the instance group.","Upgrade to a kOps version that supports the machine's architecture if it is a newly supported variant.","If running in a container or VM emulation layer, verify uname reports the emulated architecture correctly (e.g. qemu/binfmt misconfiguration) and fix the emulation setup.","Inspect architectures.FindArchitecture() in the kOps source for the exact probe that failed on this OS and address that environment issue (e.g. missing /proc/sys/kernel files)."],"exampleFix":"// before: instance group uses an unsupported CPU architecture\nmachineType: m6g.xlarge // arm64 host with amd64-only assumptions\n// after: match machine type to a supported arch and kOps version\nmachineType: m5.xlarge","handlingStrategy":"validation","validationCode":"// Check the machine architecture is one nodeup supports before invoking\nout, err := exec.Command(\"uname\", \"-m\").Output()\nif err != nil || (strings.TrimSpace(string(out)) != \"x86_64\" && strings.TrimSpace(string(out)) != \"aarch64\") {\n    return fmt.Errorf(\"unsupported machine architecture: %s\", out)\n}","typeGuard":null,"tryCatchPattern":"err := cmd.Run(out)\nif err != nil && strings.Contains(err.Error(), \"error determining OS architecture\") {\n    // fail fast and surface the unsupported-arch condition\n}","preventionTips":["Use supported instance types/images (amd64 or arm64) in instance groups","Test nodeup on new hardware/VM classes before rolling them into production","Keep kOps up to date so newly supported architectures are detected correctly"],"tags":["nodeup","architecture","os-detection","bootstrap"],"backgroundTag":"os-architecture-detection-failed","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"}