提交 277a331f 编写于 作者: T Thomas Stromberg

Skip if empty, turn inability to poll other clusters into a warning

上级 fba211d1
......@@ -158,6 +158,10 @@ func needsTransfer(imgClient *client.Client, imgName string, cr cruntime.Manager
// CacheAndLoadImages caches and loads images to all profiles
func CacheAndLoadImages(images []string) error {
if len(images) == 0 {
return nil
}
// This is the most important thing
if err := image.SaveToDir(images, constants.ImageCacheDir); err != nil {
return errors.Wrap(err, "save to dir")
......@@ -192,7 +196,7 @@ func CacheAndLoadImages(images []string) error {
status, err := Status(api, m)
if err != nil {
glog.Errorf("error getting status for %s: %v", pName, err)
glog.Warningf("error getting status for %s: %v", pName, err)
failed = append(failed, pName)
continue
}
......@@ -200,7 +204,7 @@ func CacheAndLoadImages(images []string) error {
if status == state.Running.String() { // the not running hosts will load on next start
h, err := api.Load(m)
if err != nil {
glog.Errorf("Failed to load machine %q: %v", m, err)
glog.Warningf("Failed to load machine %q: %v", m, err)
failed = append(failed, pName)
continue
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册