From e0e5d9e1390f2aa5a7bc79ebe1963aa6c5f1ddf4 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Sat, 2 Dec 2017 00:08:47 +0000 Subject: [PATCH] Update containerd to try fix rootfs issue. Signed-off-by: Lantao Liu --- hack/versions | 2 +- vendor.conf | 2 +- vendor/github.com/containerd/containerd/README.md | 2 +- vendor/github.com/containerd/containerd/image.go | 2 +- vendor/github.com/containerd/containerd/images/image.go | 8 ++++---- .../containerd/containerd/oci/spec_opts_windows.go | 8 ++++++++ vendor/github.com/containerd/containerd/rootfs/apply.go | 8 ++++---- vendor/github.com/containerd/containerd/vendor.conf | 2 +- 8 files changed, 21 insertions(+), 13 deletions(-) diff --git a/hack/versions b/hack/versions index dd6432051..8e21465de 100644 --- a/hack/versions +++ b/hack/versions @@ -1,5 +1,5 @@ RUNC_VERSION=74a17296470088de3805e138d3d87c62e613dfc4 CNI_VERSION=v0.6.0 -CONTAINERD_VERSION=4bcd272c14255fd625f1cdfbdaa7623b668caa70 +CONTAINERD_VERSION=53c892d796a565127899d397e43bd52edf3148b0 CRITOOL_VERSION=4cd2b047a26a2ef01bbd02ee55f7d70d8825ebb5 KUBERNETES_VERSION=164317879bcd810b97e5ebf1c8df041770f2ff1b diff --git a/vendor.conf b/vendor.conf index d6f9a0939..67b0cb7f3 100644 --- a/vendor.conf +++ b/vendor.conf @@ -2,7 +2,7 @@ github.com/blang/semver v3.1.0 github.com/boltdb/bolt e9cf4fae01b5a8ff89d0ec6b32f0d9c9f79aefdd github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895 github.com/containerd/cgroups 29da22c6171a4316169f9205ab6c49f59b5b852f -github.com/containerd/containerd 4bcd272c14255fd625f1cdfbdaa7623b668caa70 +github.com/containerd/containerd 53c892d796a565127899d397e43bd52edf3148b0 github.com/containerd/continuity cf279e6ac893682272b4479d4c67fd3abf878b4e github.com/containerd/fifo fbfb6a11ec671efbe94ad1c12c2e98773f19e1e6 github.com/containerd/typeurl f6943554a7e7e88b3c14aad190bf05932da84788 diff --git a/vendor/github.com/containerd/containerd/README.md b/vendor/github.com/containerd/containerd/README.md index cd8a28ca3..361679f85 100644 --- a/vendor/github.com/containerd/containerd/README.md +++ b/vendor/github.com/containerd/containerd/README.md @@ -26,7 +26,7 @@ reasonable starting point for Linux is a minimum 4.x kernel version. The overlay filesystem snapshotter, used by default, uses features that were finalized in the 4.x kernel series. If you choose to use btrfs, there may -be more flexibility in kernel version (minimum recommended is 3.13), but will +be more flexibility in kernel version (minimum recommended is 3.18), but will require the btrfs kernel module and btrfs tools to be installed on your Linux distribution. diff --git a/vendor/github.com/containerd/containerd/image.go b/vendor/github.com/containerd/containerd/image.go index 202fc42bd..6e9f4bd19 100644 --- a/vendor/github.com/containerd/containerd/image.go +++ b/vendor/github.com/containerd/containerd/image.go @@ -147,7 +147,7 @@ func (i *image) getLayers(ctx context.Context, platform string) ([]rootfs.Layer, manifest, err := images.Manifest(ctx, cs, i.i.Target, platform) if err != nil { - return nil, errors.Wrap(err, "") + return nil, err } diffIDs, err := i.i.RootFS(ctx, cs, platform) diff --git a/vendor/github.com/containerd/containerd/images/image.go b/vendor/github.com/containerd/containerd/images/image.go index e0d6990c4..7b4215faf 100644 --- a/vendor/github.com/containerd/containerd/images/image.go +++ b/vendor/github.com/containerd/containerd/images/image.go @@ -187,13 +187,13 @@ func Manifest(ctx context.Context, provider content.Provider, image ocispec.Desc return descs, nil } - return nil, errors.Wrap(errdefs.ErrNotFound, "could not resolve manifest") + return nil, errors.Wrapf(errdefs.ErrNotFound, "unexpected media type %v for %v", desc.MediaType, desc.Digest) }), image); err != nil { return ocispec.Manifest{}, err } if m == nil { - return ocispec.Manifest{}, errors.Wrap(errdefs.ErrNotFound, "manifest not found") + return ocispec.Manifest{}, errors.Wrapf(errdefs.ErrNotFound, "manifest %v", image.Digest) } return *m, nil @@ -257,7 +257,7 @@ func Check(ctx context.Context, provider content.Provider, image ocispec.Descrip return false, []ocispec.Descriptor{image}, nil, []ocispec.Descriptor{image}, nil } - return false, nil, nil, nil, errors.Wrap(err, "image check failed") + return false, nil, nil, nil, errors.Wrapf(err, "failed to check image %v", image.Digest) } // TODO(stevvooe): It is possible that referenced conponents could have @@ -272,7 +272,7 @@ func Check(ctx context.Context, provider content.Provider, image ocispec.Descrip missing = append(missing, desc) continue } else { - return false, nil, nil, nil, err + return false, nil, nil, nil, errors.Wrapf(err, "failed to check image %v", desc.Digest) } } ra.Close() diff --git a/vendor/github.com/containerd/containerd/oci/spec_opts_windows.go b/vendor/github.com/containerd/containerd/oci/spec_opts_windows.go index 3605f8e48..796ad5598 100644 --- a/vendor/github.com/containerd/containerd/oci/spec_opts_windows.go +++ b/vendor/github.com/containerd/containerd/oci/spec_opts_windows.go @@ -60,3 +60,11 @@ func WithTTY(width, height int) SpecOpts { return nil } } + +// WithUsername sets the username on the process +func WithUsername(username string) SpecOpts { + return func(ctx context.Context, client Client, c *containers.Container, s *specs.Spec) error { + s.Process.User.Username = username + return nil + } +} diff --git a/vendor/github.com/containerd/containerd/rootfs/apply.go b/vendor/github.com/containerd/containerd/rootfs/apply.go index e6d2be6a7..405129564 100644 --- a/vendor/github.com/containerd/containerd/rootfs/apply.go +++ b/vendor/github.com/containerd/containerd/rootfs/apply.go @@ -55,10 +55,10 @@ func ApplyLayer(ctx context.Context, layer Layer, chain []digest.Digest, sn snap _, err := sn.Stat(ctx, chainID.String()) if err == nil { - log.G(ctx).Debugf("Extraction not needed, layer snapshot exists") + log.G(ctx).Debugf("Extraction not needed, layer snapshot %s exists", chainID) return false, nil } else if !errdefs.IsNotFound(err) { - return false, errors.Wrap(err, "failed to stat snapshot") + return false, errors.Wrapf(err, "failed to stat snapshot %s", chainID) } key := fmt.Sprintf("extract-%s %s", uniquePart(), chainID) @@ -67,7 +67,7 @@ func ApplyLayer(ctx context.Context, layer Layer, chain []digest.Digest, sn snap mounts, err := sn.Prepare(ctx, key, parent.String(), opts...) if err != nil { //TODO: If is snapshot exists error, retry - return false, errors.Wrap(err, "failed to prepare extraction layer") + return false, errors.Wrapf(err, "failed to prepare extraction snapshot %q", key) } defer func() { if err != nil { @@ -89,7 +89,7 @@ func ApplyLayer(ctx context.Context, layer Layer, chain []digest.Digest, sn snap if err = sn.Commit(ctx, chainID.String(), key, opts...); err != nil { if !errdefs.IsAlreadyExists(err) { - return false, errors.Wrapf(err, "failed to commit snapshot %s", parent) + return false, errors.Wrapf(err, "failed to commit snapshot %s", key) } // Destination already exists, cleanup key and return without error diff --git a/vendor/github.com/containerd/containerd/vendor.conf b/vendor/github.com/containerd/containerd/vendor.conf index 382aaa66b..fea47e480 100644 --- a/vendor/github.com/containerd/containerd/vendor.conf +++ b/vendor/github.com/containerd/containerd/vendor.conf @@ -41,4 +41,4 @@ github.com/boltdb/bolt e9cf4fae01b5a8ff89d0ec6b32f0d9c9f79aefdd google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944 golang.org/x/text 19e51611da83d6be54ddafce4a4af510cb3e9ea4 github.com/dmcgowan/go-tar go1.10 -github.com/stevvooe/ttrpc 8c92e22ce0c492875ccaac3ab06143a77d8ed0c1 +github.com/stevvooe/ttrpc 76e68349ad9ab4d03d764c713826d31216715e4f