Commit 85e6076f authored by NickrenREN's avatar NickrenREN

remove eviction-manager start return err

Start() function will never return err,we do not need the return value
parent 84df0679
...@@ -125,10 +125,9 @@ func (m *managerImpl) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAd ...@@ -125,10 +125,9 @@ func (m *managerImpl) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAd
} }
// Start starts the control loop to observe and response to low compute resources. // Start starts the control loop to observe and response to low compute resources.
func (m *managerImpl) Start(diskInfoProvider DiskInfoProvider, podFunc ActivePodsFunc, monitoringInterval time.Duration) error { func (m *managerImpl) Start(diskInfoProvider DiskInfoProvider, podFunc ActivePodsFunc, monitoringInterval time.Duration) {
// start the eviction manager monitoring // start the eviction manager monitoring
go wait.Until(func() { m.synchronize(diskInfoProvider, podFunc) }, monitoringInterval, wait.NeverStop) go wait.Until(func() { m.synchronize(diskInfoProvider, podFunc) }, monitoringInterval, wait.NeverStop)
return nil
} }
// IsUnderMemoryPressure returns true if the node is under memory pressure. // IsUnderMemoryPressure returns true if the node is under memory pressure.
......
...@@ -100,7 +100,7 @@ type Threshold struct { ...@@ -100,7 +100,7 @@ type Threshold struct {
// Manager evaluates when an eviction threshold for node stability has been met on the node. // Manager evaluates when an eviction threshold for node stability has been met on the node.
type Manager interface { type Manager interface {
// Start starts the control loop to monitor eviction thresholds at specified interval. // Start starts the control loop to monitor eviction thresholds at specified interval.
Start(diskInfoProvider DiskInfoProvider, podFunc ActivePodsFunc, monitoringInterval time.Duration) error Start(diskInfoProvider DiskInfoProvider, podFunc ActivePodsFunc, monitoringInterval time.Duration)
// IsUnderMemoryPressure returns true if the node is under memory pressure. // IsUnderMemoryPressure returns true if the node is under memory pressure.
IsUnderMemoryPressure() bool IsUnderMemoryPressure() bool
......
...@@ -1206,9 +1206,7 @@ func (kl *Kubelet) initializeRuntimeDependentModules() { ...@@ -1206,9 +1206,7 @@ func (kl *Kubelet) initializeRuntimeDependentModules() {
glog.Fatalf("Failed to start cAdvisor %v", err) glog.Fatalf("Failed to start cAdvisor %v", err)
} }
// eviction manager must start after cadvisor because it needs to know if the container runtime has a dedicated imagefs // eviction manager must start after cadvisor because it needs to know if the container runtime has a dedicated imagefs
if err := kl.evictionManager.Start(kl, kl.getActivePods, evictionMonitoringPeriod); err != nil { kl.evictionManager.Start(kl, kl.getActivePods, evictionMonitoringPeriod)
kl.runtimeState.setInternalError(fmt.Errorf("failed to start eviction manager %v", err))
}
} }
// Run starts the kubelet reacting to config updates // Run starts the kubelet reacting to config updates
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment