mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
Remove race of waitForRCPodsRunning Running check and internal pod store
This commit is contained in:
parent
d329a66434
commit
d4602bb909
@ -1533,6 +1533,9 @@ func waitForRCPodsRunning(c *client.Client, ns, rcName string) error {
|
|||||||
waitLoop:
|
waitLoop:
|
||||||
for start := time.Now(); time.Since(start) < 10*time.Minute; time.Sleep(5 * time.Second) {
|
for start := time.Now(); time.Since(start) < 10*time.Minute; time.Sleep(5 * time.Second) {
|
||||||
pods := podStore.List()
|
pods := podStore.List()
|
||||||
|
if len(pods) == 0 {
|
||||||
|
continue waitLoop
|
||||||
|
}
|
||||||
for _, p := range pods {
|
for _, p := range pods {
|
||||||
if p.Status.Phase != api.PodRunning {
|
if p.Status.Phase != api.PodRunning {
|
||||||
continue waitLoop
|
continue waitLoop
|
||||||
|
Loading…
Reference in New Issue
Block a user