소스 검색

Fixing nanoserver image load bug.

Fixes an issue that prevents nano server images from loading properly. Also updates logic for custom image loading to avoid preventing daemon start because an image failed to load.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Stefan J. Wernli 9 년 전
부모
커밋
a22092b136
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 1
      daemon/daemon_windows.go
  2. 1 1
      daemon/graphdriver/windows/windows.go

+ 3 - 1
daemon/daemon_windows.go

@@ -402,7 +402,9 @@ func restoreCustomImage(is image.Store, ls layer.Store, rs reference.Store) erro
 
 
 		id, err := is.Create(config)
 		id, err := is.Create(config)
 		if err != nil {
 		if err != nil {
-			return err
+			logrus.Warnf("Failed to restore custom image %s with error: %s.", name, err.Error)
+			logrus.Warnf("Skipping image %s...", name)
+			continue
 		}
 		}
 
 
 		if err := rs.AddTag(ref, id, true); err != nil {
 		if err := rs.AddTag(ref, id, true); err != nil {

+ 1 - 1
daemon/graphdriver/windows/windows.go

@@ -449,7 +449,7 @@ func (d *Driver) GetCustomImageInfos() ([]CustomImageInfo, error) {
 		imageData.ID = id
 		imageData.ID = id
 
 
 		// For now, hard code that all base images except nanoserver depend on win32k support
 		// For now, hard code that all base images except nanoserver depend on win32k support
-		if imageData.Name != "nanoserver" {
+		if imageData.Name != "NanoServer" {
 			imageData.OSFeatures = append(imageData.OSFeatures, "win32k")
 			imageData.OSFeatures = append(imageData.OSFeatures, "win32k")
 		}
 		}