From e0d9b96631acfdfec6e3e11471fac21d394a16cf Mon Sep 17 00:00:00 2001 From: Iceber Gu Date: Wed, 11 Jan 2023 15:41:00 +0800 Subject: [PATCH] Fix restarting the paused containers Signed-off-by: Iceber Gu --- runtime/restart/monitor/monitor.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime/restart/monitor/monitor.go b/runtime/restart/monitor/monitor.go index 315720d34..aa8314e2a 100644 --- a/runtime/restart/monitor/monitor.go +++ b/runtime/restart/monitor/monitor.go @@ -171,9 +171,15 @@ func (m *monitor) monitor(ctx context.Context) ([]change, error) { // which will result in an `on-failure` restart policy reconcile error. switch desiredStatus { case containerd.Running: + switch status.Status { + case containerd.Paused, containerd.Pausing: + continue + default: + } if !restart.Reconcile(status, labels) { continue } + restartCount, _ := strconv.Atoi(labels[restart.CountLabel]) changes = append(changes, &startChange{ container: c,