You've already forked runc
mirror of
https://github.com/opencontainers/runc.git
synced 2025-07-30 17:43:06 +03:00
Fix various state bugs for pause and destroy
There were issues where a process could die before pausing completed leaving the container in an inconsistent state and unable to be destoryed. This makes sure that if the container is paused and the process is dead it will unfreeze the cgroup before removing them. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@ -49,19 +49,13 @@ func TestPausedStateTransition(t *testing.T) {
|
||||
valid := []containerState{
|
||||
&pausedState{},
|
||||
&runningState{},
|
||||
&stoppedState{},
|
||||
}
|
||||
for _, v := range valid {
|
||||
if err := s.transition(v); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
err := s.transition(&stoppedState{})
|
||||
if err == nil {
|
||||
t.Fatal("transition to stopped state should fail")
|
||||
}
|
||||
if !isStateTransitionError(err) {
|
||||
t.Fatal("expected stateTransitionError")
|
||||
}
|
||||
}
|
||||
|
||||
func TestRestoredStateTransition(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user