diff --git a/cluster-autoscaler/cloudprovider/gce/gce_manager.go b/cluster-autoscaler/cloudprovider/gce/gce_manager.go index e2437def7dcf..ebdb9863c666 100644 --- a/cluster-autoscaler/cloudprovider/gce/gce_manager.go +++ b/cluster-autoscaler/cloudprovider/gce/gce_manager.go @@ -825,29 +825,26 @@ func (m *gceManagerImpl) Refresh() error { } func (m *gceManagerImpl) forceRefresh() error { - nextRefreshAfter := time.Now().Add(refreshInterval) switch m.mode { case ModeGCE: if err := m.fetchAutoMigs(); err != nil { glog.Errorf("Failed to fetch MIGs: %v", err) return err } - glog.V(2).Infof("Refreshed MIG list, next refresh after %v", nextRefreshAfter) case ModeGKENAP: if err := m.fetchResourceLimiter(); err != nil { glog.Errorf("Failed to fetch resource limits: %v", err) return err } - glog.V(2).Infof("Refreshed resource limits, next refresh after %v", nextRefreshAfter) fallthrough case ModeGKE: if err := m.fetchAllNodePools(); err != nil { glog.Errorf("Failed to fetch node pools: %v", err) return err } - glog.V(2).Infof("Refreshed NodePool list, next refresh after %v", nextRefreshAfter) } m.lastRefresh = time.Now() + glog.V(2).Infof("Refreshed GCE resources, next refresh after %v", m.lastRefresh.Add(refreshInterval)) return nil }