From 431366980de3f7ca270474b3b584deaeeacbd99a Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Thu, 7 Apr 2016 15:58:57 -0700 Subject: [PATCH] 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 Upstream-commit: a22092b13695c44790bb443ac8b536965b1cdba3 Component: engine --- components/engine/daemon/daemon_windows.go | 4 +++- components/engine/daemon/graphdriver/windows/windows.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/engine/daemon/daemon_windows.go b/components/engine/daemon/daemon_windows.go index b1ad26c11b..1e71fb3376 100644 --- a/components/engine/daemon/daemon_windows.go +++ b/components/engine/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) 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 { diff --git a/components/engine/daemon/graphdriver/windows/windows.go b/components/engine/daemon/graphdriver/windows/windows.go index 0d51d43f74..18a64dda65 100644 --- a/components/engine/daemon/graphdriver/windows/windows.go +++ b/components/engine/daemon/graphdriver/windows/windows.go @@ -449,7 +449,7 @@ func (d *Driver) GetCustomImageInfos() ([]CustomImageInfo, error) { imageData.ID = id // 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") }