Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support State.Error field in inspect command #2052

Closed
ningziwen opened this issue Feb 25, 2023 · 2 comments
Closed

Support State.Error field in inspect command #2052

ningziwen opened this issue Feb 25, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request kind/feature

Comments

@ningziwen
Copy link
Contributor

What is the problem you're trying to solve

nerdctl inspect cannot return State.Error field today.

$ nerdctl run -d public.ecr.aws/amazonlinux/amazonlinux:2
2fd4c9d197320279055bfca5a109433935e762fc91bcbe371815a6cf7f39fe03
$ nerdctl inspect --format {{.State.Status}}:{{.State.Error}} 2fd4c9d197320279055bfca5a109433935e762fc91bcbe371815a6cf7f39fe03
WARN[0000] failed to inspect NetNS                       error="failed to Statfs \"/proc/4058/ns/net\": no such file or directory" id=2fd4c9d197320279055bfca5a109433935e762fc91bcbe371815a6cf7f39fe03
FATA[0000] 1 errors: [template parsing error: template: :1:26: executing "" at <.State.Error>: map has no entry for key "Error"]

Describe the solution you'd like

State.Error exists in the inspect response, and it is an existing TODO in comment.

Additional context

runfinch/finch#242

@fahedouch fahedouch added the enhancement New feature or request label Mar 3, 2023
@fahedouch
Copy link
Member

container exit error is rendered when the container process exit :
https://github.com/containerd/containerd/blob/v1.6.19/process.go#L44

we need to store it in container metadata so we can retrieve it later

I will take this ticket :)

@fahedouch
Copy link
Member

Closed by #2073

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kind/feature
Projects
None yet
Development

No branches or pull requests

2 participants