fix image manager Start() function return

realImageGCManager's Start()  function will always return nil,we do not need the err return value,drop it.
This commit is contained in:
NickrenREN 2016-12-21 14:58:00 +08:00
parent 64a0e0ee19
commit bb5ccb978e
2 changed files with 3 additions and 6 deletions

View File

@ -44,7 +44,7 @@ type ImageGCManager interface {
GarbageCollect() error
// Start async garbage collection of images.
Start() error
Start()
GetImageList() ([]kubecontainer.Image, error)
@ -152,7 +152,7 @@ func NewImageGCManager(runtime container.Runtime, cadvisorInterface cadvisor.Int
return im, nil
}
func (im *realImageGCManager) Start() error {
func (im *realImageGCManager) Start() {
go wait.Until(func() {
// Initial detection make detected time "unknown" in the past.
var ts time.Time
@ -178,7 +178,6 @@ func (im *realImageGCManager) Start() error {
}
}, 30*time.Second, wait.NeverStop)
return nil
}
// Get a list of images on this node

View File

@ -1177,9 +1177,7 @@ func (kl *Kubelet) initializeModules() error {
}
// Step 4: Start the image manager.
if err := kl.imageManager.Start(); err != nil {
return fmt.Errorf("Failed to start ImageManager, images may not be garbage collected: %v", err)
}
kl.imageManager.Start()
// Step 5: Start container manager.
node, err := kl.getNodeAnyWay()