summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorShelley-BaoYue <baoyue2@huawei.com>2023-07-20 09:54:05 +0800
committerShelley-BaoYue <baoyue2@huawei.com>2023-07-20 09:54:05 +0800
commit96b96d5838837e256819130d10862fc53a30eb0c (patch)
treedb8d7147fe583e35760dff866f91cc56ec4544f9 /vendor
parentbump containerd to 1.5.18 (diff)
downloadkubeedge-96b96d5838837e256819130d10862fc53a30eb0c.tar.gz
update verdor for containerd 1.5.18
Signed-off-by: Shelley-BaoYue <baoyue2@huawei.com>
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go6
-rw-r--r--vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go12
-rw-r--r--vendor/github.com/containerd/containerd/remotes/docker/pusher.go40
-rw-r--r--vendor/github.com/containerd/containerd/version/version.go2
-rw-r--r--vendor/modules.txt6
5 files changed, 42 insertions, 24 deletions
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go b/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go
index 27a62a723..f46af33bb 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go
@@ -86,6 +86,12 @@ type Container interface {
// container to be terminated by some error condition (including calling
// Close).
Wait() error
+ // WaitChannel returns the wait channel of the container
+ WaitChannel() <-chan struct{}
+ // WaitError returns the container termination error.
+ // This function should only be called after the channel in WaitChannel()
+ // is closed. Otherwise it is not thread safe.
+ WaitError() error
// Modify sends a request to modify container resources
Modify(ctx context.Context, config interface{}) error
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
index 75499c967..b478931c3 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
@@ -275,11 +275,19 @@ func (computeSystem *System) waitBackground() {
oc.SetSpanStatus(span, err)
}
+func (computeSystem *System) WaitChannel() <-chan struct{} {
+ return computeSystem.waitBlock
+}
+
+func (computeSystem *System) WaitError() error {
+ return computeSystem.waitError
+}
+
// Wait synchronously waits for the compute system to shutdown or terminate. If
// the compute system has already exited returns the previous error (if any).
func (computeSystem *System) Wait() error {
- <-computeSystem.waitBlock
- return computeSystem.waitError
+ <-computeSystem.WaitChannel()
+ return computeSystem.WaitError()
}
// ExitError returns an error describing the reason the compute system terminated.
diff --git a/vendor/github.com/containerd/containerd/remotes/docker/pusher.go b/vendor/github.com/containerd/containerd/remotes/docker/pusher.go
index 75be84859..430e555f7 100644
--- a/vendor/github.com/containerd/containerd/remotes/docker/pusher.go
+++ b/vendor/github.com/containerd/containerd/remotes/docker/pusher.go
@@ -377,17 +377,24 @@ func (pw *pushWriter) Write(p []byte) (n int, err error) {
// If content has already been written, the bytes
// cannot be written and the caller must reset
- if status.Offset > 0 {
- status.Offset = 0
- status.UpdatedAt = time.Now()
- pw.tracker.SetStatus(pw.ref, status)
- return 0, content.ErrReset
- }
+ status.Offset = 0
+ status.UpdatedAt = time.Now()
+ pw.tracker.SetStatus(pw.ref, status)
+ return 0, content.ErrReset
default:
}
}
n, err = pw.pipe.Write(p)
+ if errors.Is(err, io.ErrClosedPipe) {
+ // if the pipe is closed, we might have the original error on the error
+ // channel - so we should try and get it
+ select {
+ case err2 := <-pw.errC:
+ err = err2
+ default:
+ }
+ }
status.Offset += int64(n)
status.UpdatedAt = time.Now()
pw.tracker.SetStatus(pw.ref, status)
@@ -428,7 +435,7 @@ func (pw *pushWriter) Digest() digest.Digest {
func (pw *pushWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error {
// Check whether read has already thrown an error
- if _, err := pw.pipe.Write([]byte{}); err != nil && err != io.ErrClosedPipe {
+ if _, err := pw.pipe.Write([]byte{}); err != nil && !errors.Is(err, io.ErrClosedPipe) {
return errors.Wrap(err, "pipe error before commit")
}
@@ -439,9 +446,7 @@ func (pw *pushWriter) Commit(ctx context.Context, size int64, expected digest.Di
var resp *http.Response
select {
case err := <-pw.errC:
- if err != nil {
- return err
- }
+ return err
case resp = <-pw.respC:
defer resp.Body.Close()
case p, ok := <-pw.pipeC:
@@ -453,18 +458,17 @@ func (pw *pushWriter) Commit(ctx context.Context, size int64, expected digest.Di
}
pw.pipe.CloseWithError(content.ErrReset)
pw.pipe = p
+
+ // If content has already been written, the bytes
+ // cannot be written again and the caller must reset
status, err := pw.tracker.GetStatus(pw.ref)
if err != nil {
return err
}
- // If content has already been written, the bytes
- // cannot be written again and the caller must reset
- if status.Offset > 0 {
- status.Offset = 0
- status.UpdatedAt = time.Now()
- pw.tracker.SetStatus(pw.ref, status)
- return content.ErrReset
- }
+ status.Offset = 0
+ status.UpdatedAt = time.Now()
+ pw.tracker.SetStatus(pw.ref, status)
+ return content.ErrReset
}
// 201 is specified return status, some registries return
diff --git a/vendor/github.com/containerd/containerd/version/version.go b/vendor/github.com/containerd/containerd/version/version.go
index d5bacb54d..6aa90d1f4 100644
--- a/vendor/github.com/containerd/containerd/version/version.go
+++ b/vendor/github.com/containerd/containerd/version/version.go
@@ -23,7 +23,7 @@ var (
Package = "github.com/containerd/containerd"
// Version holds the complete version number. Filled in at linking time.
- Version = "1.5.16+unknown"
+ Version = "1.5.18+unknown"
// Revision is filled with the VCS (e.g. git) revision being used to build
// the program at linking time.
diff --git a/vendor/modules.txt b/vendor/modules.txt
index ceed6895c..1d693908c 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -78,7 +78,7 @@ github.com/Microsoft/go-winio
github.com/Microsoft/go-winio/pkg/guid
github.com/Microsoft/go-winio/pkg/security
github.com/Microsoft/go-winio/vhd
-# github.com/Microsoft/hcsshim v0.8.24
+# github.com/Microsoft/hcsshim v0.8.25
## explicit; go 1.13
github.com/Microsoft/hcsshim
github.com/Microsoft/hcsshim/computestorage
@@ -209,7 +209,7 @@ github.com/containerd/cgroups/stats/v1
# github.com/containerd/console v1.0.3
## explicit; go 1.13
github.com/containerd/console
-# github.com/containerd/containerd v1.6.6 => github.com/containerd/containerd v1.5.16
+# github.com/containerd/containerd v1.6.15 => github.com/containerd/containerd v1.5.18
## explicit; go 1.17
github.com/containerd/containerd/api/services/containers/v1
github.com/containerd/containerd/api/services/tasks/v1
@@ -2650,7 +2650,7 @@ sigs.k8s.io/yaml
# github.com/Sirupsen/logrus v1.0.5 => github.com/sirupsen/logrus v1.0.5
# github.com/Sirupsen/logrus v1.3.0 => github.com/Sirupsen/logrus v1.0.6
# github.com/Sirupsen/logrus v1.4.0 => github.com/sirupsen/logrus v1.0.6
-# github.com/containerd/containerd => github.com/containerd/containerd v1.5.16
+# github.com/containerd/containerd => github.com/containerd/containerd v1.5.18
# github.com/gopherjs/gopherjs v0.0.0 => github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e
# github.com/kubeedge/beehive => ./staging/src/github.com/kubeedge/beehive
# github.com/kubeedge/viaduct => ./staging/src/github.com/kubeedge/viaduct