Merge pull request #45099 from thaJeztah/23.0_backport_vendor_containerd_1.6.19
[23.0 backport] vendor: github.com/Microsoft/hcsshim v0.9.7, github.com/containerd/containerd v1.6.19
This commit is contained in:
commit
f8b2777872
5 changed files with 44 additions and 12 deletions
|
@ -12,14 +12,14 @@ require (
|
|||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1
|
||||
github.com/Graylog2/go-gelf v0.0.0-20191017102106-1550ee647df0
|
||||
github.com/Microsoft/go-winio v0.5.2
|
||||
github.com/Microsoft/hcsshim v0.9.6
|
||||
github.com/Microsoft/hcsshim v0.9.7
|
||||
github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91
|
||||
github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c
|
||||
github.com/aws/aws-sdk-go v1.37.0
|
||||
github.com/bsphere/le_go v0.0.0-20200109081728-fc06dab2caa8
|
||||
github.com/cloudflare/cfssl v0.0.0-20180323000720-5d63dbd981b5
|
||||
github.com/containerd/cgroups v1.0.4
|
||||
github.com/containerd/containerd v1.6.18
|
||||
github.com/containerd/containerd v1.6.19
|
||||
github.com/containerd/continuity v0.3.0
|
||||
github.com/containerd/fifo v1.1.0
|
||||
github.com/containerd/typeurl v1.0.2
|
||||
|
|
|
@ -100,8 +100,8 @@ github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2
|
|||
github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00=
|
||||
github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600=
|
||||
github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4=
|
||||
github.com/Microsoft/hcsshim v0.9.6 h1:VwnDOgLeoi2du6dAznfmspNqTiwczvjv4K7NxuY9jsY=
|
||||
github.com/Microsoft/hcsshim v0.9.6/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc=
|
||||
github.com/Microsoft/hcsshim v0.9.7 h1:mKNHW/Xvv1aFH87Jb6ERDzXTJTLPlmzfZ28VBFD/bfg=
|
||||
github.com/Microsoft/hcsshim v0.9.7/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc=
|
||||
github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU=
|
||||
github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
|
@ -243,8 +243,8 @@ github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09Zvgq
|
|||
github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s=
|
||||
github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g=
|
||||
github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c=
|
||||
github.com/containerd/containerd v1.6.18 h1:qZbsLvmyu+Vlty0/Ex5xc0z2YtKpIsb5n45mAMI+2Ns=
|
||||
github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw=
|
||||
github.com/containerd/containerd v1.6.19 h1:F0qgQPrG0P2JPgwpxWxYavrVeXAG0ezUIB9Z/4FTUAU=
|
||||
github.com/containerd/containerd v1.6.19/go.mod h1:HZCDMn4v/Xl2579/MvtOC2M206i+JJ6VxFWU/NetrGY=
|
||||
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
|
||||
github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
|
||||
github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
|
||||
|
|
38
vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go
generated
vendored
38
vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go
generated
vendored
|
@ -161,7 +161,39 @@ func (process *Process) Kill(ctx context.Context) (bool, error) {
|
|||
return true, nil
|
||||
}
|
||||
|
||||
resultJSON, err := vmcompute.HcsTerminateProcess(ctx, process.handle)
|
||||
// HCS serializes the signals sent to a target pid per compute system handle.
|
||||
// To avoid SIGKILL being serialized behind other signals, we open a new compute
|
||||
// system handle to deliver the kill signal.
|
||||
// If the calls to opening a new compute system handle fail, we forcefully
|
||||
// terminate the container itself so that no container is left behind
|
||||
hcsSystem, err := OpenComputeSystem(ctx, process.system.id)
|
||||
if err != nil {
|
||||
// log error and force termination of container
|
||||
log.G(ctx).WithField("err", err).Error("OpenComputeSystem() call failed")
|
||||
err = process.system.Terminate(ctx)
|
||||
// if the Terminate() call itself ever failed, log and return error
|
||||
if err != nil {
|
||||
log.G(ctx).WithField("err", err).Error("Terminate() call failed")
|
||||
return false, err
|
||||
}
|
||||
process.system.Close()
|
||||
return true, nil
|
||||
}
|
||||
defer hcsSystem.Close()
|
||||
|
||||
newProcessHandle, err := hcsSystem.OpenProcess(ctx, process.Pid())
|
||||
if err != nil {
|
||||
// Return true only if the target process has either already
|
||||
// exited, or does not exist.
|
||||
if IsAlreadyStopped(err) {
|
||||
return true, nil
|
||||
} else {
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
defer newProcessHandle.Close()
|
||||
|
||||
resultJSON, err := vmcompute.HcsTerminateProcess(ctx, newProcessHandle.handle)
|
||||
if err != nil {
|
||||
// We still need to check these two cases, as processes may still be killed by an
|
||||
// external actor (human operator, OOM, random script etc).
|
||||
|
@ -185,9 +217,9 @@ func (process *Process) Kill(ctx context.Context) (bool, error) {
|
|||
}
|
||||
}
|
||||
events := processHcsResult(ctx, resultJSON)
|
||||
delivered, err := process.processSignalResult(ctx, err)
|
||||
delivered, err := newProcessHandle.processSignalResult(ctx, err)
|
||||
if err != nil {
|
||||
err = makeProcessError(process, operation, err, events)
|
||||
err = makeProcessError(newProcessHandle, operation, err, events)
|
||||
}
|
||||
|
||||
process.killSignalDelivered = delivered
|
||||
|
|
2
vendor/github.com/containerd/containerd/version/version.go
generated
vendored
2
vendor/github.com/containerd/containerd/version/version.go
generated
vendored
|
@ -23,7 +23,7 @@ var (
|
|||
Package = "github.com/containerd/containerd"
|
||||
|
||||
// Version holds the complete version number. Filled in at linking time.
|
||||
Version = "1.6.18+unknown"
|
||||
Version = "1.6.19+unknown"
|
||||
|
||||
// Revision is filled with the VCS (e.g. git) revision being used to build
|
||||
// the program at linking time.
|
||||
|
|
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
|
@ -30,7 +30,7 @@ github.com/Microsoft/go-winio/pkg/fs
|
|||
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.9.6
|
||||
# github.com/Microsoft/hcsshim v0.9.7
|
||||
## explicit; go 1.13
|
||||
github.com/Microsoft/hcsshim
|
||||
github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options
|
||||
|
@ -160,7 +160,7 @@ github.com/containerd/cgroups/v2/stats
|
|||
# github.com/containerd/console v1.0.3
|
||||
## explicit; go 1.13
|
||||
github.com/containerd/console
|
||||
# github.com/containerd/containerd v1.6.18
|
||||
# github.com/containerd/containerd v1.6.19
|
||||
## explicit; go 1.17
|
||||
github.com/containerd/containerd
|
||||
github.com/containerd/containerd/api/events
|
||||
|
|
Loading…
Reference in a new issue