Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a problem with for loops, copy semantics and async routines. #1616

Merged
merged 1 commit into from
Oct 7, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions pkg/kubelet/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,9 @@ func (kl *Kubelet) SyncPods(pods []Pod) error {
}

// Check for any containers that need starting
for _, pod := range pods {
podFullName := GetPodFullName(&pod)
for ix := range pods {
pod := &pods[ix]
podFullName := GetPodFullName(pod)
uuid := pod.Manifest.UUID

// Add all containers (including net) to the map.
Expand All @@ -647,7 +648,7 @@ func (kl *Kubelet) SyncPods(pods []Pod) error {

// Run the sync in an async manifest worker.
kl.podWorkers.Run(podFullName, func() {
err := kl.syncPod(&pod, dockerContainers)
err := kl.syncPod(pod, dockerContainers)
if err != nil {
glog.Errorf("Error syncing pod: %v skipping.", err)
}
Expand Down