Fix restarting the paused containers
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
This commit is contained in:
parent
689cd12ee6
commit
e0d9b96631
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user