kubernetes/kops · error
error deleting %s: %v
Error message
error deleting %s: %v
What it means
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.
Source
Thrown at util/pkg/vfs/swiftfs.go:304
return p.Path()
}
func (p *SwiftPath) getClient(ctx context.Context) (*gophercloud.ServiceClient, error) {
return p.vfsContext.getSwiftClient(ctx)
}
func (p *SwiftPath) Remove(ctx context.Context) error {
done, err := RetryWithBackoff(swiftWriteBackoff, func() (bool, error) {
client, err := p.getClient(ctx)
if err != nil {
return false, err
}
opt := swiftobject.DeleteOpts{}
if _, err := swiftobject.Delete(ctx, client, p.bucket, p.key, opt).Extract(); err != nil {
if isSwiftNotFound(err) {
return true, os.ErrNotExist
}
return false, fmt.Errorf("error deleting %s: %v", p, err)
}
return true, nil
})
if err != nil {
return err
} else if done {
return nil
} else {
return wait.ErrWaitTimeout
}
}
func (p *SwiftPath) RemoveAll(ctx context.Context) error {
tree, err := p.ReadTree(ctx)
if err != nil {
return err
}View on GitHub (pinned to 4c8573c808)
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at util/pkg/vfs/swiftfs.go:304 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/1e5527ab7d195b68.
Report an issue: GitHub.