diff --git a/pkg/server/container_create_windows.go b/pkg/server/container_create_windows.go index d781f9818..7e71cc676 100644 --- a/pkg/server/container_create_windows.go +++ b/pkg/server/container_create_windows.go @@ -20,7 +20,6 @@ package server import ( "fmt" - "github.com/sirupsen/logrus" "net/url" "path/filepath" "regexp" @@ -28,6 +27,8 @@ import ( "strings" "time" + "github.com/sirupsen/logrus" + runhcsoptions "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options" "github.com/containerd/containerd" "github.com/containerd/containerd/containers" @@ -171,9 +172,9 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta } log.G(ctx).WithFields(logrus.Fields{ - "id": id, + "id": id, "runtimeHandler": sandbox.RuntimeHandler, - "spec": spew.NewFormatter(spec), + "spec": spew.NewFormatter(spec), }).Debug("Container creation") // If the config field is specified, set the snapshotter label to reuse the pods @@ -514,6 +515,12 @@ func (c *criService) addOCIMounts(ctx context.Context, g *generator, platform im return errors.Errorf(`sandbox://%s' mounts are only supported for LCOW`, src) } mountType = "bind" + } else if strings.HasPrefix(src, "hugepages://") { + // mount source prefix hugepages:// is only supported with lcow + if platform.OS != "linux" || platform.Architecture != "amd64" { + return errors.Errorf(`hugepages://%s mounts are only supported for LCOW`, src) + } + mountType = "bind" } else if strings.Contains(src, "kubernetes.io~empty-dir") && platform.OS == "linux" && platform.Architecture == "amd64" { // kubernetes.io~empty-dir in the mount path indicates it comes from the kubernetes // empty-dir plugin, which creates an empty scratch directory to be shared between