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 #2073

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

fahedouch
Copy link
Member

see

@fahedouch fahedouch marked this pull request as draft March 6, 2023 19:11
@fahedouch fahedouch marked this pull request as ready for review March 13, 2023 21:51
@fahedouch fahedouch force-pushed the support-state-error branch 2 times, most recently from f6ff328 to e419819 Compare March 13, 2023 21:55
pkg/labels/labels.go Outdated Show resolved Hide resolved
@@ -90,6 +89,9 @@ const (
// PIDContainer is the `nerdctl run --pid` for restarting
PIDContainer = Prefix + "pid-container"

// RunError encapsulates a container run error.
RunError = Prefix + "run-error"
Copy link
Member

Choose a reason for hiding this comment

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

Wonder if this should be start-error or just error or errors

Copy link
Member Author

Choose a reason for hiding this comment

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

start-error LGTM. error has a large scope.

Copy link
Member Author

Choose a reason for hiding this comment

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

switch for error to handle stop and remove verb(s)

@fahedouch fahedouch force-pushed the support-state-error branch from 1db3a1b to 3e9ea88 Compare March 15, 2023 22:44
@fahedouch fahedouch requested a review from AkihiroSuda March 16, 2023 08:58
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda
Copy link
Member

@ningziwen PTAL

@AkihiroSuda AkihiroSuda added this to the v1.3.0 milestone Mar 17, 2023
@ningziwen
Copy link
Contributor

Thanks! @fahedouch

I think this change only populates the error from container create and container run.

If we want to make this field Docker compatible, the scope of the ErrorMsg also includes container start, stop or remove, based on the comment.

The line to populate errorMsg in docker start

I didn't find the line explicitly in docker stop/remove but found here is probably used to populate when container exits.

Maybe we can decide if we want to populate errorMsg in the above scenarios. Based on the decision, we can change the commit message to reflect the change scope or extend the PR.

@fahedouch fahedouch marked this pull request as draft March 19, 2023 13:06
@fahedouch
Copy link
Member Author

If we want to make this field Docker compatible, the scope of the ErrorMsg also includes container start, stop or remove

start is supported

stop and remove added.

@ningziwen PTAL

@fahedouch fahedouch force-pushed the support-state-error branch from 7a3cfe3 to 031a6fe Compare March 19, 2023 14:00
@fahedouch fahedouch marked this pull request as ready for review March 19, 2023 14:01
@fahedouch
Copy link
Member Author

@AkihiroSuda PTAL , I added some changes

@fahedouch fahedouch requested a review from AkihiroSuda March 20, 2023 15:48
@fahedouch fahedouch force-pushed the support-state-error branch from bcd4396 to c0da342 Compare March 23, 2023 14:03
Signed-off-by: fahed dorgaa <[email protected]>
@fahedouch fahedouch force-pushed the support-state-error branch from c0da342 to 512bc74 Compare March 23, 2023 14:05
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 5b4dd0d into containerd:main Mar 23, 2023
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