kubernetes/kops · error
error remove %d files: %w
Error message
error remove %d files: %w
What it means
Returned inside SwiftPath.RemoveAll's retry loop when the Swift bulk-delete call fails for a batch (up to 10000 objects) with something other than 404. The container refused the bulk delete — permissions, too-many-requests, or proxy error — and the error reports how many objects were in the failed batch; RetryWithBackoff re-attempts the same batch.
Source
Thrown at util/pkg/vfs/swiftfs.go:353
// BulkDelete can only process 10000 objects per call
if len(objects) > 10000 {
objectsToDelete = objects[:10000]
objects = objects[10000:]
} else {
objectsToDelete = objects
objects = nil
}
done, err := RetryWithBackoff(swiftWriteBackoff, func() (bool, error) {
client, err := p.getClient(ctx)
if err != nil {
return false, err
}
if _, err := swiftobject.BulkDelete(ctx, client, p.bucket, objectsToDelete).Extract(); err != nil {
if isSwiftNotFound(err) {
return true, os.ErrNotExist
}
return false, fmt.Errorf("error remove %d files: %w", len(objectsToDelete), err)
}
return true, nil
})
if err != nil {
return err
} else if done {
continue
} else {
return wait.ErrWaitTimeout
}
}
return nil
}
func (p *SwiftPath) RemoveAllVersions(ctx context.Context) error {
return p.Remove(ctx)View on GitHub (pinned to 4c8573c808)
Solutions
- Check container delete permissions and auth token validity
- Rely on swiftWriteBackoff retries for transient throttling; if persistent, inspect the wrapped Swift error
- If batches consistently fail, reduce concurrency against the Swift proxy
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at util/pkg/vfs/swiftfs.go:353 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/721aba138bb3a013.
Report an issue: GitHub.