Skip to content

Commit

Permalink
Fix DeletingLoadBalancer event generation.
Browse files Browse the repository at this point in the history
Also patch up a log statement to log the service's namespace and name
rather than potentially just logging `kind:"" apiVersion:""`.
  • Loading branch information
a-robinson committed Apr 27, 2016
1 parent 3b09c64 commit ed15931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/service/servicecontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (s *ServiceController) processDelta(delta *cache.Delta) (error, time.Durati
namespacedName.Name = deltaService.Name
cachedService = s.cache.getOrCreate(namespacedName.String())
}
glog.V(2).Infof("Got new %s delta for service: %+v", delta.Type, deltaService)
glog.V(2).Infof("Got new %s delta for service: %v", delta.Type, namespacedName)

// Ensure that no other goroutine will interfere with our processing of the
// service.
Expand All @@ -249,7 +249,7 @@ func (s *ServiceController) processDelta(delta *cache.Delta) (error, time.Durati
return err, cachedService.nextRetryDelay()
} else if errors.IsNotFound(err) {
glog.V(2).Infof("Service %v not found, ensuring load balancer is deleted", namespacedName)
s.eventRecorder.Event(service, api.EventTypeNormal, "DeletingLoadBalancer", "Deleting load balancer")
s.eventRecorder.Event(deltaService, api.EventTypeNormal, "DeletingLoadBalancer", "Deleting load balancer")
err := s.balancer.EnsureLoadBalancerDeleted(deltaService)
if err != nil {
message := "Error deleting load balancer (will retry): " + err.Error()
Expand Down

0 comments on commit ed15931

Please sign in to comment.