// Check that the replica list remains unchanged, otherwise we have problems.
if!isElementOf(pod.UID,currentPods){
returnfalse,fmt.Errorf("Pod with UID %s is no longer a member of the replica set. Must have been restarted for some reason. Current replica set: %v",pod.UID,currentPods)
Failf("Controller %s: Failed to GET from replica %d: %v",name,i+1,err)
Logf("Controller %s: Failed to GET from replica %d (%s): %v:",r.controllerName,i+1,pod.Name,err)
continue
}
}
// The body should be the pod name.
// The body should be the pod name.
ifstring(body)!=pod.Name{
ifstring(body)!=pod.Name{
Failf("Controller %s: Replica %d expected response %s but got %s",name,i+1,pod.Name,string(body))
Logf("Controller %s: Replica %d expected response %s but got %s",r.controllerName,i+1,pod.Name,string(body))
continue
}
}
Logf("Controller %s: Got expected result from replica %d: %s",name,i+1,string(body))
successes++
Logf("Controller %s: Got expected result from replica %d: %s, %d of %d required successes so far",r.controllerName,i+1,string(body),successes,len(r.pods.Items))