Skip to content

archive: add human-readable hint to Lchown error#43635

Merged
thaJeztah merged 1 commit intomoby:masterfrom
AkihiroSuda:improve-userns-lchown-error
May 30, 2022
Merged

archive: add human-readable hint to Lchown error#43635
thaJeztah merged 1 commit intomoby:masterfrom
AkihiroSuda:improve-userns-lchown-error

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

- What I did

Improved the text of Lchown error for rootless.

For #43576

- How I did it
See the code

- How to verify it

Before:

$ docker pull gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0
failed to register layer: ApplyLayer exit status 1 stdout:  stderr: lchown /usr/local/bin/docker-credential-gcr: invalid argument

After:

$ docker pull gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0
failed to register layer: ApplyLayer exit status 1 stdout:  stderr: failed to Lchown "/usr/local/bin/docker-credential-gcr" for UID 205001, GID 5000:
lchown /usr/local/bin/docker-credential-gcr: invalid argument (Hint: try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid)

- Description for the changelog

archive: add human-readable hint to Lchown error

- A picture of a cute animal (not mandatory but encouraged)

🐧

Comment thread pkg/archive/archive.go Outdated
@AkihiroSuda AkihiroSuda marked this pull request as draft May 29, 2022 15:26
@AkihiroSuda AkihiroSuda force-pushed the improve-userns-lchown-error branch from 57b4cfb to 1faef8e Compare May 30, 2022 02:20
@AkihiroSuda AkihiroSuda marked this pull request as ready for review May 30, 2022 02:20
Comment thread pkg/archive/archive.go Outdated
Before:
```
$ docker pull gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0
failed to register layer: ApplyLayer exit status 1 stdout:  stderr: lchown /usr/local/bin/docker-credential-gcr: invalid argument
```

After:
```
$ docker pull gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0
failed to register layer: ApplyLayer exit status 1 stdout:  stderr: failed to Lchown "/usr/local/bin/docker-credential-gcr" for UID 205001, GID 5000:
lchown /usr/local/bin/docker-credential-gcr: invalid argument (try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid)
```

For issue 43576

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda AkihiroSuda force-pushed the improve-userns-lchown-error branch from 1faef8e to 0afc71f Compare May 30, 2022 02:27
@thaJeztah thaJeztah added this to the 22.06.0 milestone May 30, 2022
@thaJeztah thaJeztah added the kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. label May 30, 2022
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/rootless Rootless Mode kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants