{"record":{"id":"6f3c49b90b7f8e40","repo":"kubernetes/kops","slug":"error-reading-s-v-6f3c49","errorCode":null,"errorMessage":"error reading %s: %v","messagePattern":"error reading (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/pkg/vfs/swiftfs.go","lineNumber":527,"sourceCode":"\n// WriteTo implements io.WriterTo\nfunc (p *SwiftPath) WriteTo(out io.Writer) (int64, error) {\n\tctx := context.TODO()\n\n\tklog.V(4).Infof(\"Reading file %q\", p)\n\n\tclient, err := p.getClient(ctx)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\topt := swiftobject.DownloadOpts{}\n\tresult := swiftobject.Download(ctx, client, p.bucket, p.key, opt)\n\tif result.Err != nil {\n\t\tif isSwiftNotFound(result.Err) {\n\t\t\treturn 0, os.ErrNotExist\n\t\t}\n\t\treturn 0, fmt.Errorf(\"error reading %s: %v\", p, result.Err)\n\t}\n\tdefer result.Body.Close()\n\n\treturn io.Copy(out, result.Body)\n}\n\nfunc (p *SwiftPath) readPath(opt swiftobject.ListOpts) ([]Path, error) {\n\tctx := context.TODO()\n\n\tvar ret []Path\n\tdone, err := RetryWithBackoff(swiftReadBackoff, func() (bool, error) {\n\t\tclient, err := p.getClient(ctx)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\n\t\tvar paths []Path\n\t\tpager := swiftobject.List(client, p.bucket, opt)","sourceCodeStart":509,"sourceCodeEnd":545,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/util/pkg/vfs/swiftfs.go#L509-L545","documentation":"Returned by SwiftPath.WriteTo when initiating a Swift object download fails for a reason other than not-found (404 maps to os.ErrNotExist). The Swift GET on the object errored — auth token expired, no read permission, or a proxy failure — so there is no body to stream to the caller.","triggerScenarios":"Thrown at util/pkg/vfs/swiftfs.go:527 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify read access to the object's container","Re-authenticate: expired tokens surface as 401 on the download call","Retry on transient proxy errors; Swift clusters commonly rate-limit GETs"],"exampleFix":null,"handlingStrategy":"retry","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"}