Skip to content

Commit

Permalink
Merge pull request #10254 from rmohr/deploymentinprogress
Browse files Browse the repository at this point in the history
[virt-operator] cope with misscheduled virt-handler pods
  • Loading branch information
kubevirt-bot committed Aug 10, 2023
2 parents c0ce9cc + 12bdb2e commit c8a8a44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/virt-operator/util/readycheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ func DaemonsetIsReady(kv *v1.KubeVirt, daemonset *appsv1.DaemonSet, stores Store
}

if podsReady == 0 {
log.Log.Infof("DaemonSet %v not ready yet. Waiting on at least one ready pod", daemonset.Name)
log.Log.Infof("DaemonSet %v not ready yet. Waiting for all pods to be ready", daemonset.Name)
return false
}

return podsReady == daemonset.Status.DesiredNumberScheduled
// Misscheduled but up to date daemonset pods will not be evicted unless manually deleted or the daemonset gets updated.
// Don't force the Available condition to false or block the upgrade on up-to-date misscheduled pods.
return podsReady >= daemonset.Status.DesiredNumberScheduled
}

func DeploymentIsReady(kv *v1.KubeVirt, deployment *appsv1.Deployment, stores Stores) bool {
Expand Down

0 comments on commit c8a8a44

Please sign in to comment.