Merge pull request #15521 from vrothberg/v4.2-fix-15492

[v4.2] libpod: UpdateContainerStatus: do not wait for container
This commit is contained in:
OpenShift Merge Robot
2022-08-30 09:35:51 -04:00
committed by GitHub
2 changed files with 1 additions and 10 deletions

View File

@ -337,15 +337,6 @@ func (r *ConmonOCIRuntime) UpdateContainerStatus(ctr *Container) error {
ctr.ID(), state.Status, define.ErrInternal)
}
// Only grab exit status if we were not already stopped
// If we were, it should already be in the database
if ctr.state.State == define.ContainerStateStopped && oldState != define.ContainerStateStopped {
if _, err := ctr.Wait(context.Background()); err != nil {
logrus.Errorf("Waiting for container %s to exit: %v", ctr.ID(), err)
}
return nil
}
// Handle ContainerStateStopping - keep it unless the container
// transitioned to no longer running.
if oldState == define.ContainerStateStopping && (ctr.state.State == define.ContainerStatePaused || ctr.state.State == define.ContainerStateRunning) {

View File

@ -203,7 +203,7 @@ t POST "build?dockerfile=containerfile" $CONTAINERFILE_TAR application/json 200
# Libpod: allow building from url: https://github.com/alpinelinux/docker-alpine.git and must ignore any provided tar
t POST "libpod/build?remote=https%3A%2F%2Fgithub.com%2Falpinelinux%2Fdocker-alpine.git" $CONTAINERFILE_TAR 200 \
.stream~"STEP 1/5: FROM alpine:3.14"
.stream~"STEP 1/5: FROM alpine:"
# Build api response header must contain Content-type: application/json
t POST "build?dockerfile=containerfile" $CONTAINERFILE_TAR application/json 200