{"record":{"id":"d7439c4a674fb916","repo":"kubernetes/kops","slug":"error-creating-symlink-q-q-v","errorCode":null,"errorMessage":"error creating symlink %q -> %q: %v","messagePattern":"error creating symlink %q -> %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/nodetasks/file.go","lineNumber":270,"sourceCode":"\t}\n\n\tif a != nil {\n\t\tif e.IfNotExists {\n\t\t\tklog.V(2).Infof(\"file exists and IfNotExists set; skipping %q\", e.Path)\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tchanged := false\n\tswitch e.Type {\n\tcase FileType_Symlink:\n\t\tif changes.Symlink != nil {\n\t\t\t// This will currently fail if the target already exists.\n\t\t\t// That's probably a good thing for now ... it is hard to know what to do here!\n\t\t\tklog.Infof(\"Creating symlink %q -> %q\", e.Path, *changes.Symlink)\n\t\t\terr := os.Symlink(*changes.Symlink, e.Path)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error creating symlink %q -> %q: %v\", e.Path, *changes.Symlink, err)\n\t\t\t}\n\t\t\tchanged = true\n\t\t}\n\tcase FileType_Directory:\n\t\tif a == nil {\n\t\t\tparent := filepath.Dir(strings.TrimSuffix(e.Path, \"/\"))\n\t\t\terr := os.MkdirAll(parent, dirMode)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error creating parent directories %q: %v\", parent, err)\n\t\t\t}\n\n\t\t\terr = os.MkdirAll(e.Path, fileMode)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error creating directory %q: %v\", e.Path, err)\n\t\t\t}\n\t\t\tchanged = true\n\t\t}\n\tcase FileType_File:","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/nodetasks/file.go#L252-L288","documentation":"Error \"error creating symlink %q -> %q: %v\" thrown in kubernetes/kops.","triggerScenarios":"Thrown at upup/pkg/fi/nodeup/nodetasks/file.go:270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"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"}