Skip to content

Commit

Permalink
Only check for PodStateExited when pruning pods
Browse files Browse the repository at this point in the history
[NO TESTS NEEDED] This is an attempt to fix a Race condition
since it is a race it is difficult to fix.

Helps fix: containers#7139

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed May 24, 2021
1 parent a6f0ac2 commit 137b6ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libpod/runtime_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (r *Runtime) GetRunningPods() ([]*Pod, error) {
// PrunePods removes unused pods and their containers from local storage.
func (r *Runtime) PrunePods(ctx context.Context) (map[string]error, error) {
response := make(map[string]error)
states := []string{define.PodStateStopped, define.PodStateExited}
states := []string{define.PodStateExited}
filterFunc := func(p *Pod) bool {
state, _ := p.GetPodStatus()
for _, status := range states {
Expand Down

0 comments on commit 137b6ba

Please sign in to comment.