Remove race of waitForRCPodsRunning Running check and internal pod store

This commit is contained in:
Dr. Stefan Schimanski 2015-10-17 12:15:00 +02:00
parent d329a66434
commit d4602bb909

View File

@ -1533,6 +1533,9 @@ func waitForRCPodsRunning(c *client.Client, ns, rcName string) error {
waitLoop:
for start := time.Now(); time.Since(start) < 10*time.Minute; time.Sleep(5 * time.Second) {
pods := podStore.List()
if len(pods) == 0 {
continue waitLoop
}
for _, p := range pods {
if p.Status.Phase != api.PodRunning {
continue waitLoop