{"record":{"id":"b2328d2546e0530c","repo":"kubernetes/kops","slug":"error-building-context-v","errorCode":null,"errorMessage":"error building context: %v","messagePattern":"error building context: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nodeup/pkg/bootstrap/install.go","lineNumber":59,"sourceCode":"\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 {\n\t\treturn fmt.Errorf(\"error running tasks: %v\", err)\n\t}\n\n\terr = target.Finish(tasks)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error finishing target: %v\", err)\n\t}\n\n\treturn nil\n}\n\nfunc (i *Installation) Build(c *fi.InstallModelBuilderContext) {\n\tc.AddTask(i.buildEnvFile())\n\tc.AddTask(i.buildSystemdJob())","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/nodeup/pkg/bootstrap/install.go#L41-L77","documentation":"nodeup's install-mode Run wraps a failure of fi.NewInstallContext, which validates and prepares the task graph (env file + systemd job) before RunTasks. It fires when the install context cannot be constructed on the node — e.g. inconsistent task dependencies — and aborts nodeup installation before any task executes.","triggerScenarios":"Thrown at nodeup/pkg/bootstrap/install.go:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check nodeup logs for task construction errors","Verify the nodeup config from the state store is complete","Re-run nodeup after fixing reported task issues"],"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-12T12:17:11.808Z"}