{"record":{"id":"b8d57b94aa65fba6","repo":"kubernetes/kops","slug":"error-determining-os-distribution-v","errorCode":null,"errorMessage":"error determining OS distribution: %v","messagePattern":"error determining OS distribution: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nodeup/pkg/bootstrap/install.go","lineNumber":45,"sourceCode":"\t\"k8s.io/kops/upup/pkg/fi\"\n\t\"k8s.io/kops/upup/pkg/fi/nodeup/install\"\n\t\"k8s.io/kops/upup/pkg/fi/nodeup/nodetasks\"\n\t\"k8s.io/kops/util/pkg/distributions\"\n\t\"k8s.io/kops/util/pkg/vfs/openstackconfig\"\n)\n\ntype Installation struct {\n\tCacheDir        string\n\tRunTasksOptions fi.RunTasksOptions\n\tCommand         []string\n}\n\nfunc (i *Installation) Run() error {\n\tctx := context.TODO()\n\n\t_, err := distributions.FindDistribution(\"/\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error determining OS distribution: %v\", err)\n\t}\n\n\ttasks := make(map[string]fi.InstallTask)\n\n\tbuildContext := &fi.InstallModelBuilderContext{\n\t\tTasks: tasks,\n\t}\n\ti.Build(buildContext)\n\n\ttarget := &install.InstallTarget{}\n\n\tcontext, err := fi.NewInstallContext(ctx, target, tasks)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error building context: %v\", err)\n\t}\n\n\terr = context.RunTasks(i.RunTasksOptions)\n\tif err != nil {","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/nodeup/pkg/bootstrap/install.go#L27-L63","documentation":"Wraps a failure of distributions.FindDistribution('/') during nodeup bootstrap installation: the Linux distribution of the node could not be identified from the filesystem, so OS-specific install tasks cannot be selected.","triggerScenarios":"Thrown at nodeup/pkg/bootstrap/install.go:45 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify /etc/os-release exists and is readable","Use a kOps-supported distribution","Check that nodeup runs on the target node, not a builder"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}