{"record":{"id":"227033641952e9d4","repo":"kubernetes/kops","slug":"error-loading-configuration-q-v","errorCode":null,"errorMessage":"error loading configuration %q: %v","messagePattern":"error loading configuration %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"upup/pkg/fi/nodeup/command.go","lineNumber":92,"sourceCode":"// MaxTaskDuration is the amount of time to keep trying for; we retry for a long time - there is not really any great fallback\nconst MaxTaskDuration = 365 * 24 * time.Hour\n\n// NodeUpCommand is the configuration for nodeup\ntype NodeUpCommand struct {\n\tCacheDir       string\n\tConfigLocation string\n\tTarget         string\n}\n\n// Run is responsible for perform the nodeup process\nfunc (c *NodeUpCommand) Run(out io.Writer) error {\n\tctx := context.Background()\n\n\tvar bootConfig nodeup.BootConfig\n\tif c.ConfigLocation != \"\" {\n\t\tb, err := vfs.Context.ReadFile(c.ConfigLocation)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error loading configuration %q: %v\", c.ConfigLocation, err)\n\t\t}\n\n\t\terr = utils.YamlUnmarshal(b, &bootConfig)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error parsing configuration %q: %v\", c.ConfigLocation, err)\n\t\t}\n\t} else {\n\t\treturn fmt.Errorf(\"ConfigLocation is required\")\n\t}\n\n\tif c.CacheDir == \"\" {\n\t\treturn fmt.Errorf(\"CacheDir is required\")\n\t}\n\n\tregion, err := getRegion(ctx, &bootConfig)\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/command.go#L74-L110","documentation":"nodeup's Run reads its boot configuration file from ConfigLocation via vfs.Context.ReadFile before doing anything else. This error wraps any failure to fetch that file: nonexistent path, unreadable object store, bad credentials, or network failure reaching the VFS location. nodeup cannot proceed without the boot config, so it aborts immediately.","triggerScenarios":"NodeUpCommand.Run with c.ConfigLocation set but the VFS path does not exist, points to a wrong bucket/cluster name, the instance lacks IAM permission to read it, or the S3/object-store endpoint is unreachable.","commonSituations":"Misconfigured nodeup systemd unit or ASG launch template passing a stale --config path; cluster state moved to a different S3 bucket; IAM instance profile missing s3:GetObject on the state bucket; DNS/proxy issues on a private network blocking S3.","solutions":["Verify the file exists at the ConfigLocation path (e.g. aws s3 ls s3://<bucket>/<path>)","Check the node's IAM instance profile grants read access to the state store location","Correct the --config flag / ConfigLocation value in the nodeup invocation or launch template","Confirm network connectivity from the node to the object store endpoint (VPC endpoints, proxy settings)"],"exampleFix":"// before\nConfigLocation: \"s3://old-bucket/cluster.example.com/config/nodeupconfig\"\n// after\nConfigLocation: \"s3://correct-state-bucket/cluster.example.com/config/nodeupconfig\"","handlingStrategy":"validation","validationCode":"// before starting nodeup, confirm the config is readable\nif err := exec.Command(\"aws\", \"s3\", \"cp\", configLocation, \"/dev/null\").Run(); err != nil {\n  return fmt.Errorf(\"config %s unreadable: %w\", configLocation, err)\n}","typeGuard":"func hasConfigLocation(cmd *NodeUpCommand) bool { return cmd.ConfigLocation != \"\" }","tryCatchPattern":"if err := cmd.Run(os.Stdout); err != nil {\n  if strings.HasPrefix(err.Error(), \"error loading configuration\") {\n    klog.Errorf(\"cannot fetch boot config at %s; check path, IAM perms and network: %v\", cmd.ConfigLocation, err)\n    os.Exit(1)\n  }\n  return err\n}","preventionTips":["Verify the --config VFS path exists right after 'kops create/update'","Ensure the node IAM instance profile has s3:GetObject on the state bucket prefix","Test nodeup user-data in a single-node canary cluster before fleet-wide rollout"],"tags":["nodeup","configuration","vfs","file-not-found"],"backgroundTag":"config-file-load-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"}