Logging for service restart e2e clarity

This commit is contained in:
bprashanth
2016-08-31 16:44:30 -07:00
parent 1b05640cf8
commit 5dac1122b4
3 changed files with 13 additions and 2 deletions

View File

@@ -380,6 +380,8 @@ func (e *EndpointController) syncService(key string) {
}
}
readyEps := 0
notReadyEps := 0
for i := range pods {
// TODO: Do we need to copy here?
pod := &(*pods[i])
@@ -432,12 +434,14 @@ func (e *EndpointController) syncService(key string) {
Addresses: []api.EndpointAddress{epa},
Ports: []api.EndpointPort{epp},
})
readyEps++
} else {
glog.V(5).Infof("Pod is out of service: %v/%v", pod.Namespace, pod.Name)
subsets = append(subsets, api.EndpointSubset{
NotReadyAddresses: []api.EndpointAddress{epa},
Ports: []api.EndpointPort{epp},
})
notReadyEps++
}
}
}
@@ -490,6 +494,7 @@ func (e *EndpointController) syncService(key string) {
newEndpoints.Annotations[endpoints.PodHostnamesAnnotation] = serializedPodHostNames
}
glog.V(4).Infof("Update endpoints for %v/%v, ready: %d not ready: %d", service.Namespace, service.Name, readyEps, notReadyEps)
createEndpoints := len(currentEndpoints.ResourceVersion) == 0
if createEndpoints {
// No previous endpoints, create them