mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Fix framework.WaitForDaemonSets:
* when daemonsets are not ready, wait for really them * swap parameters in Logf so that they are more readable.
This commit is contained in:
parent
de1656abbb
commit
ac7ee5da9f
@ -752,14 +752,15 @@ func WaitForDaemonSets(c clientset.Interface, ns string, allowedNotReadyNodes in
|
|||||||
}
|
}
|
||||||
var notReadyDaemonSets []string
|
var notReadyDaemonSets []string
|
||||||
for _, ds := range dsList.Items {
|
for _, ds := range dsList.Items {
|
||||||
Logf("%d / %d pods ready in namespace '%s' in daemonset '%s' (%d seconds elapsed)", ds.Status.DesiredNumberScheduled, ds.Status.NumberReady, ns, ds.ObjectMeta.Name, int(time.Since(start).Seconds()))
|
Logf("%d / %d pods ready in namespace '%s' in daemonset '%s' (%d seconds elapsed)", ds.Status.NumberReady, ds.Status.DesiredNumberScheduled, ns, ds.ObjectMeta.Name, int(time.Since(start).Seconds()))
|
||||||
if ds.Status.DesiredNumberScheduled-ds.Status.NumberReady > allowedNotReadyNodes {
|
if ds.Status.DesiredNumberScheduled-ds.Status.NumberReady > allowedNotReadyNodes {
|
||||||
notReadyDaemonSets = append(notReadyDaemonSets, ds.ObjectMeta.Name)
|
notReadyDaemonSets = append(notReadyDaemonSets, ds.ObjectMeta.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(notReadyDaemonSets) > 0 {
|
if len(notReadyDaemonSets) > 0 {
|
||||||
return false, fmt.Errorf("there are not ready daemonsets: %v", notReadyDaemonSets)
|
Logf("there are not ready daemonsets: %v", notReadyDaemonSets)
|
||||||
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return true, nil
|
return true, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user