kubernetes/kops · error
not all assets copied successfully
Error message
not all assets copied successfully
What it means
After all asset copy tasks complete, if any task logged a warning (gotError=true), Copy() discards the individual details and returns this aggregate sentinel error. It tells the caller (RunGetAssets / `kops get assets --copy`) that at least one asset was not copied; the per-asset errors were already printed via klog.Warning.
Source
Thrown at pkg/assets/assetcopy/copy.go:123
err := t.Run()
if err != nil {
err = fmt.Errorf("%s: %v", n, err)
}
ch <- err
}(name, task)
}
for i := 0; i < cap(ch); i++ {
err := <-ch
if err != nil {
klog.Warning(err)
gotError = true
}
}
close(ch)
if gotError {
return fmt.Errorf("not all assets copied successfully")
}
return nil
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Scroll up in the kops output for the klog.Warning lines naming the specific failed asset(s).
- Fix each underlying cause (network, credentials, sha mismatch) and re-run the copy command; already-copied assets are skipped via sha-file checks.
- Verify write permissions on the target file repository/container registry.
- Run with -v=4 or higher to see per-asset diagnostics (e.g. skipped sha matches).
Example fix
// before error: not all assets copied successfully // after: find the detail line above it and fix, e.g. W s3://my-bucket/.../kubelet: unable to transfer ... : AccessDenied # grant s3:PutObject on the bucket, then re-run kops get assets --copy
Defensive patterns
Strategy: try-catch
Validate before calling
// Ensure the target repository is writable before starting a long copy:
p := vfsContext.BuildVfsPath(fileRepository)
probe := fmt.Sprintf("%s/.write-probe", fileRepository)
// write and delete a small object to confirm PutObject/objects.create permission Try / catch
if err := assetcopy.Copy(...); err != nil {
if strings.Contains(err.Error(), "not all assets copied successfully") {
// scan captured klog warnings for the specific failed assets, then retry
return retryCopy(failedAssets)
}
return err
} Prevention
- Grant write IAM permissions (s3:PutObject / storage.objects.create) on the target repository
- Capture klog output so the per-asset detail lines are not lost
- Copy in batches so one bad asset does not obscure others
- Re-run the command; already-copied assets short-circuit via their .sha files
When it happens
Trigger: Any of the cap(ch)==5 worker slots or remaining tasks returns a non-nil error — e.g. CopyFile.Run() failing on a download/sha/upload error, or CopyImage.Run() failing to push an image — so gotError is true at copy.go:122.
Common situations: `kops get assets --copy` exits non-zero after a partial copy into a private S3/GCS repository; a flaky mirror caused 1 of 200 image pushes to fail; credentials allow read but not write to the target bucket.
Related errors
- %s: %v
- unhandled sha length for %q
- unable to transfer %q to %q: %v
- error building path %q: %v
- unable to parse sha: %q, %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/e607a65066bac8ae.
Report an issue: GitHub.