Skip to content

[release/1.5] archive: add human-readable hint to Lchown error#6986

Merged
estesp merged 1 commit intocontainerd:release/1.5from
AkihiroSuda:cherrypick-6982-1.5
May 25, 2022
Merged

[release/1.5] archive: add human-readable hint to Lchown error#6986
estesp merged 1 commit intocontainerd:release/1.5from
AkihiroSuda:cherrypick-6982-1.5

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda commented May 25, 2022

Cherry-pick #6982

Cherry-pick was not clean:

diff --git a/archive/tar.go b/archive/tar.go
index d54759641..eca6316b0 100644
--- a/archive/tar.go
+++ b/archive/tar.go
@@ -19,6 +19,7 @@ package archive
 import (
        "archive/tar"
        "context"
+       "fmt"
        "io"
        "os"
        "path/filepath"

Before:
```
$ nerdctl pull gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0
FATA[0026] failed to extract layer sha256:f8a604834d388fd3d04c26e4ed832b36b617ea8a4e0b1665b9199bd10cfcb171: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount1818823128:
lchown /var/lib/containerd/tmpmounts/containerd-mount1818823128/usr/local/bin/docker-credential-gcr: invalid argument: unknown
```

After:
```
$ nerdctl pull gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0
FATA[0027] failed to extract layer sha256:f8a604834d388fd3d04c26e4ed832b36b617ea8a4e0b1665b9199bd10cfcb171: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount3521205359:
failed to Lchown "/var/lib/containerd/tmpmounts/containerd-mount3521205359/usr/local/bin/docker-credential-gcr" for UID 205001, GID 5000:
lchown /var/lib/containerd/tmpmounts/containerd-mount3521205359/usr/local/bin/docker-credential-gcr: invalid argument
(Hint: try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid): unknown
```

Related to moby/moby issue 43576 but for containerd

Signed-off-by: Akihiro Suda <[email protected]>
(cherry picked from commit d2f3015)
Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda AkihiroSuda force-pushed the cherrypick-6982-1.5 branch from 6b6abd3 to f67de00 Compare May 25, 2022 10:17
Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@estesp estesp merged commit ae4ec1f into containerd:release/1.5 May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants