mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #1616 from brendandburns/kubelet
Fix a problem with for loops, copy semantics and async routines.
This commit is contained in:
		@@ -635,8 +635,9 @@ func (kl *Kubelet) SyncPods(pods []Pod) error {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Check for any containers that need starting
 | 
						// Check for any containers that need starting
 | 
				
			||||||
	for _, pod := range pods {
 | 
						for ix := range pods {
 | 
				
			||||||
		podFullName := GetPodFullName(&pod)
 | 
							pod := &pods[ix]
 | 
				
			||||||
 | 
							podFullName := GetPodFullName(pod)
 | 
				
			||||||
		uuid := pod.Manifest.UUID
 | 
							uuid := pod.Manifest.UUID
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Add all containers (including net) to the map.
 | 
							// Add all containers (including net) to the map.
 | 
				
			||||||
@@ -647,7 +648,7 @@ func (kl *Kubelet) SyncPods(pods []Pod) error {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		// Run the sync in an async manifest worker.
 | 
							// Run the sync in an async manifest worker.
 | 
				
			||||||
		kl.podWorkers.Run(podFullName, func() {
 | 
							kl.podWorkers.Run(podFullName, func() {
 | 
				
			||||||
			err := kl.syncPod(&pod, dockerContainers)
 | 
								err := kl.syncPod(pod, dockerContainers)
 | 
				
			||||||
			if err != nil {
 | 
								if err != nil {
 | 
				
			||||||
				glog.Errorf("Error syncing pod: %v skipping.", err)
 | 
									glog.Errorf("Error syncing pod: %v skipping.", err)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user