Skip to content

Commit

Permalink
Merge pull request #1055 from giuseppe/fix-error-message
Browse files Browse the repository at this point in the history
pkg/chunked, pkg/idtools: adjust error message
  • Loading branch information
rhatdan committed Nov 8, 2021
2 parents d81acd8 + da2733a commit ee6db31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/chunked/storage_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ func (d whiteoutHandler) Mknod(path string, mode uint32, dev int) error {

func checkChownErr(err error, name string, uid, gid int) error {
if errors.Is(err, syscall.EINVAL) {
return errors.Wrapf(err, "potentially insufficient UIDs or GIDs available in user namespace (requested %d:%d for %s): Check /etc/subuid and /etc/subgid", uid, gid, name)
return errors.Wrapf(err, "potentially insufficient UIDs or GIDs available in user namespace (requested %d:%d for %s): Check /etc/subuid and /etc/subgid if configured locally", uid, gid, name)
}
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/idtools/idtools.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func parseSubidFile(path, username string) (ranges, error) {

func checkChownErr(err error, name string, uid, gid int) error {
if e, ok := err.(*os.PathError); ok && e.Err == syscall.EINVAL {
return errors.Wrapf(err, "potentially insufficient UIDs or GIDs available in user namespace (requested %d:%d for %s): Check /etc/subuid and /etc/subgid", uid, gid, name)
return errors.Wrapf(err, "potentially insufficient UIDs or GIDs available in user namespace (requested %d:%d for %s): Check /etc/subuid and /etc/subgid if configured locally", uid, gid, name)
}
return err
}
Expand Down

0 comments on commit ee6db31

Please sign in to comment.