Add container error message to ContainerState#16806
Add container error message to ContainerState#16806openshift-merge-robot merged 1 commit intocontainers:mainfrom
Conversation
|
I still need to figure out the best way to test all of the different ways an error could be saved to the I also need to verify that everywhere I have |
9920290 to
80887fc
Compare
vrothberg
left a comment
There was a problem hiding this comment.
It's probably easier to return a named error and use a defer to save the error. For instance
defer func() {
if finalErr != nil {
saveContainerError(...)
}
}()Any chance we move saving the error further up the call stack? The higher we are, the less locations we have to update (and will probably miss in the future).
@mheon PTAL
|
I definitely agree the named error would be easier. The issue I was having with the location of the error being saved came down to the container API. To the best of my knowledge, I don't actually get access to the container state until this point in the call stack, unless I was to modify the container API (which I tried to avoid). I accept the fact there's a good chance I'm wrong, though. |
|
I'm OK with leaving the error where it is... Moving out of Libpod is just going to start introducing substantial complexity (having the ability to update the DB outside of libpod is problematic). |
775fc9c to
c5a5d09
Compare
d195045 to
e9209c9
Compare
|
All kinds of red unhappy tests |
e9209c9 to
03bc0c8
Compare
|
Is it possible to restart the tests? Looks like some unrelated failure with a missing catatonit executable |
libpod/container_api.go
Outdated
There was a problem hiding this comment.
Can you logrus.Debug this error if not nil?
libpod/container_api.go
Outdated
There was a problem hiding this comment.
Can you logrus.Debug this error if not nil?
libpod/container_api.go
Outdated
There was a problem hiding this comment.
Can you logrus.Debug this error if not nil?
This change aims to store an error message to the ContainerState struct with the last known error from the Start, StartAndAttach, and Stop OCI Runtime functions. The goal was to act in accordance with Docker's behavior. Fixes: containers#13729 Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
03bc0c8 to
df02cb5
Compare
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jakecorrenti, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
This change aims to store an error message to the
ContainerStatestruct with the last known error from theStart,StartAndAttach, andStopOCI Runtime functions.The goal was to act in accordance with Docker's behavior.
Example:
Fixes: #13729
Signed-off-by: Jake Correnti jakecorrenti+github@proton.me
Does this PR introduce a user-facing change?