mirror of
https://github.com/containers/podman.git
synced 2026-08-07 04:43:04 -04:00
container stop: release lock before calling the runtime
Podman defers stopping the container to the runtime, which can take some time. Keeping the lock while waiting for the runtime to complete the stop procedure, prevents other commands from acquiring the lock as shown in #8501. To improve the user experience, release the lock before invoking the runtime, and re-acquire the lock when the runtime is finished. Also introduce an intermediate "stopping" to properly distinguish from "stopped" containers etc. Fixes: #8501 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
1 parent
d2503ae99b
commit
d54478d8ea
5 files changed
+84
-4
No files matched your search
@@ -28,6 +28,9 @@ const (
|
||||
// ContainerStateRemoving indicates the container is in the process of
|
||||
// being removed.
|
||||
ContainerStateRemoving ContainerStatus = iota
|
||||
// ContainerStateStopping indicates the container is in the process of
|
||||
// being stopped.
|
||||
ContainerStateStopping ContainerStatus = iota
|
||||
)
|
||||
|
||||
// ContainerStatus returns a string representation for users
|
||||
@@ -50,6 +53,8 @@ func (t ContainerStatus) String() string {
|
||||
return "exited"
|
||||
case ContainerStateRemoving:
|
||||
return "removing"
|
||||
case ContainerStateStopping:
|
||||
return "stopping"
|
||||
}
|
||||
return "bad state"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user