{"record":{"id":"1e5527ab7d195b68","repo":"kubernetes/kops","slug":"error-deleting-s-v-1e5527","errorCode":null,"errorMessage":"error deleting %s: %v","messagePattern":"error deleting (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/pkg/vfs/swiftfs.go","lineNumber":304,"sourceCode":"\treturn p.Path()\n}\n\nfunc (p *SwiftPath) getClient(ctx context.Context) (*gophercloud.ServiceClient, error) {\n\treturn p.vfsContext.getSwiftClient(ctx)\n}\n\nfunc (p *SwiftPath) Remove(ctx context.Context) error {\n\tdone, err := RetryWithBackoff(swiftWriteBackoff, 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\t\topt := swiftobject.DeleteOpts{}\n\t\tif _, err := swiftobject.Delete(ctx, client, p.bucket, p.key, opt).Extract(); err != nil {\n\t\t\tif isSwiftNotFound(err) {\n\t\t\t\treturn true, os.ErrNotExist\n\t\t\t}\n\t\t\treturn false, fmt.Errorf(\"error deleting %s: %v\", p, err)\n\t\t}\n\n\t\treturn true, nil\n\t})\n\tif err != nil {\n\t\treturn err\n\t} else if done {\n\t\treturn nil\n\t} else {\n\t\treturn wait.ErrWaitTimeout\n\t}\n}\n\nfunc (p *SwiftPath) RemoveAll(ctx context.Context) error {\n\ttree, err := p.ReadTree(ctx)\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":286,"sourceCodeEnd":322,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/util/pkg/vfs/swiftfs.go#L286-L322","documentation":"Returned inside SwiftPath.Remove's retry loop when a Swift object delete fails for a reason other than 404 (not-found maps to os.ErrNotExist and stops the loop). The Swift API rejected the delete — auth expiry, container permissions, or a transient proxy error — so the wrapped error is retried per swiftWriteBackoff until it succeeds or backoff is exhausted.","triggerScenarios":"Thrown at util/pkg/vfs/swiftfs.go:304 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check Swift credentials and container write permissions","Let the built-in RetryWithBackoff handle transient 5xx proxy errors; if it exhausts, inspect the wrapped error","Verify the object storage endpoint in the OpenStack catalog is reachable"],"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-12T07:17:12.445Z"}