From de1d35a66d19605830353377d1d00378aefba485 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Fri, 3 Jun 2016 11:20:27 +0200 Subject: [PATCH] Improve logging in routecontroller --- pkg/controller/route/routecontroller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/route/routecontroller.go b/pkg/controller/route/routecontroller.go index c9d72eb23b8..96a99101e17 100644 --- a/pkg/controller/route/routecontroller.go +++ b/pkg/controller/route/routecontroller.go @@ -114,7 +114,6 @@ func (rc *RouteController) reconcile(nodes []api.Node, routes []*cloudprovider.R } nameHint := string(node.UID) wg.Add(1) - glog.Infof("Creating route for node %s %s with hint %s", node.Name, route.DestinationCIDR, nameHint) go func(nodeName string, nameHint string, route *cloudprovider.Route) { defer wg.Done() for i := 0; i < maxRetries; i++ { @@ -122,6 +121,7 @@ func (rc *RouteController) reconcile(nodes []api.Node, routes []*cloudprovider.R // Ensure that we don't have more than maxConcurrentRouteCreations // CreateRoute calls in flight. rateLimiter <- struct{}{} + glog.Infof("Creating route for node %s %s with hint %s, throttled %v", nodeName, route.DestinationCIDR, nameHint, time.Now().Sub(startTime)) err := rc.routes.CreateRoute(rc.clusterName, nameHint, route) <-rateLimiter @@ -145,8 +145,8 @@ func (rc *RouteController) reconcile(nodes []api.Node, routes []*cloudprovider.R if nodeCIDRs[route.TargetInstance] != route.DestinationCIDR { wg.Add(1) // Delete the route. - glog.Infof("Deleting route %s %s", route.Name, route.DestinationCIDR) go func(route *cloudprovider.Route, startTime time.Time) { + glog.Infof("Deleting route %s %s", route.Name, route.DestinationCIDR) if err := rc.routes.DeleteRoute(rc.clusterName, route); err != nil { glog.Errorf("Could not delete route %s %s after %v: %v", route.Name, route.DestinationCIDR, time.Now().Sub(startTime), err) } else {