Skip to content

Commit

Permalink
[rescheduler] Fixed taint format
Browse files Browse the repository at this point in the history
  • Loading branch information
piosz committed Aug 22, 2016
1 parent 312e8ad commit 17f6a25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion rescheduler/rescheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ func prepareNodeForPod(client *kube_client.Client, predicateChecker *ca_simulato
if err != nil {
return fmt.Errorf("Error while copying node: %v", err)
}
addTaint(client, originalNode, podId(criticalPod))
err = addTaint(client, originalNode, podId(criticalPod))
if err != nil {
return fmt.Errorf("Error while adding taint: %v", err)
}

requiredPods, otherPods, err := groupPods(client, node)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion rescheduler/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

func podId(pod *kube_api.Pod) string {
return fmt.Sprintf("%s/%s", pod.Namespace, pod.Name)
return fmt.Sprintf("%s_%s", pod.Namespace, pod.Name)
}

// Thread safe implementation of set of Pods.
Expand Down

0 comments on commit 17f6a25

Please sign in to comment.