From 35874b7f8b3f807bc3cf4fef05b35baaaa64998a Mon Sep 17 00:00:00 2001 From: Kathryn Baldauf Date: Mon, 12 Jul 2021 17:59:58 -0700 Subject: [PATCH] Add support to dump stacks for ncproxy when requested Signed-off-by: Kathryn Baldauf --- cmd/ncproxy/run.go | 18 +- test/go.mod | 2 +- test/go.sum | 2 + .../options/runhcs.pb.go | 180 +++++++++++------- .../options/runhcs.proto | 27 ++- .../github.com/Microsoft/hcsshim/errors.go | 6 +- .../github.com/Microsoft/hcsshim/go.mod | 2 +- .../github.com/Microsoft/hcsshim/go.sum | 7 +- .../Microsoft/hcsshim/internal/hcs/errors.go | 12 +- .../hcsshim/internal/oci/annotations.go | 108 ++++++++--- .../containerd/containerd/version/version.go | 2 +- test/vendor/modules.txt | 2 +- 12 files changed, 249 insertions(+), 119 deletions(-) diff --git a/cmd/ncproxy/run.go b/cmd/ncproxy/run.go index caf195999a..3328b1f3fd 100644 --- a/cmd/ncproxy/run.go +++ b/cmd/ncproxy/run.go @@ -11,9 +11,12 @@ import ( "syscall" "time" + "github.com/Microsoft/go-winio/pkg/etw" "github.com/Microsoft/go-winio/pkg/etwlogrus" + "github.com/Microsoft/go-winio/pkg/guid" "github.com/Microsoft/hcsshim/cmd/ncproxy/nodenetsvc" "github.com/Microsoft/hcsshim/internal/computeagent" + "github.com/Microsoft/hcsshim/internal/debug" "github.com/Microsoft/hcsshim/internal/log" "github.com/Microsoft/hcsshim/internal/oc" "github.com/pkg/errors" @@ -45,14 +48,25 @@ var ( runSvc = flag.Bool("run-service", false, "Run ncproxy as a Windows service.") ) +func etwCallback(sourceID guid.GUID, state etw.ProviderState, level etw.Level, matchAnyKeyword uint64, matchAllKeyword uint64, filterData uintptr) { + if state == etw.ProviderStateCaptureState { + stacks := debug.DumpStacks() + logrus.WithField("stack", stacks).Info("ncproxy goroutine stack dump") + } +} + // Run ncproxy func run() error { flag.Parse() // Provider ID: cf9f01fe-87b3-568d-ecef-9f54b7c5ff70 // Hook isn't closed explicitly, as it will exist until process exit. - if hook, err := etwlogrus.NewHook("Microsoft.Virtualization.NCProxy"); err == nil { - logrus.AddHook(hook) + if provider, err := etw.NewProvider("Microsoft.Virtualization.NCProxy", etwCallback); err == nil { + if hook, err := etwlogrus.NewHookFromProvider(provider); err == nil { + logrus.AddHook(hook) + } else { + logrus.Error(err) + } } else { logrus.Error(err) } diff --git a/test/go.mod b/test/go.mod index dea2202136..4671525fa8 100644 --- a/test/go.mod +++ b/test/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/Microsoft/go-winio v0.4.17 github.com/Microsoft/hcsshim v0.8.16 - github.com/containerd/containerd v1.5.1 + github.com/containerd/containerd v1.5.2 github.com/containerd/go-runc v1.0.0 github.com/containerd/ttrpc v1.0.2 github.com/containerd/typeurl v1.0.2 diff --git a/test/go.sum b/test/go.sum index da9ee1427b..0b2df6d184 100644 --- a/test/go.sum +++ b/test/go.sum @@ -117,6 +117,8 @@ github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= github.com/containerd/containerd v1.5.1 h1:xWHPAoe6VkUiI9GAvndJM7s/0MTrmwX3AQiYTr3olf0= github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= +github.com/containerd/containerd v1.5.2 h1:MG/Bg1pbmMb61j3wHCFWPxESXHieiKr2xG64px/k8zQ= +github.com/containerd/containerd v1.5.2/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= 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= github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= diff --git a/test/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go b/test/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go index 1be269e296..fe11f8a2bb 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go +++ b/test/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go @@ -5,15 +5,14 @@ package options import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" + _ "github.com/gogo/protobuf/types" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" io "io" math "math" reflect "reflect" strings "strings" time "time" - - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" ) // Reference imports to suppress errors if they are not otherwise used. @@ -83,7 +82,8 @@ func (Options_SandboxIsolation) EnumDescriptor() ([]byte, []int) { // Options are the set of customizations that can be passed at Create time. type Options struct { - // enable debug tracing + // Enable debug tracing (sets the logrus log level to debug). This may be deprecated in the future, prefer + // log_level as this will override debug if both of them are set. Debug bool `protobuf:"varint,1,opt,name=debug,proto3" json:"debug,omitempty"` // debug tracing output type DebugType Options_DebugType `protobuf:"varint,2,opt,name=debug_type,json=debugType,proto3,enum=containerd.runhcs.v1.Options_DebugType" json:"debug_type,omitempty"` @@ -133,9 +133,13 @@ type Options struct { // This currently only affects LCOW. The sandbox containers scratch space is re-used for all // subsequent containers launched in the pod. ShareScratch bool `protobuf:"varint,14,opt,name=share_scratch,json=shareScratch,proto3" json:"share_scratch,omitempty"` - //NCProxyAddr is the address of the network configuration proxy service. If omitted + // NCProxyAddr is the address of the network configuration proxy service. If omitted // the network is setup locally. - NCProxyAddr string `protobuf:"bytes,15,opt,name=NCProxyAddr,proto3" json:"NCProxyAddr,omitempty"` + NCProxyAddr string `protobuf:"bytes,15,opt,name=NCProxyAddr,proto3" json:"NCProxyAddr,omitempty"` + // log_level specifies the logrus log level for the shim. Supported values are a string representation of the + // logrus log levels: "trace", "debug", "info", "warn", "error", "fatal", "panic". This setting will override + // the `debug` field if both are specified, unless the level specified is also "debug", as these are equivalent. + LogLevel string `protobuf:"bytes,16,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -234,64 +238,65 @@ func init() { } var fileDescriptor_b643df6839c75082 = []byte{ - // 899 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x5b, 0x6f, 0xdb, 0x36, - 0x18, 0x86, 0xad, 0x26, 0x71, 0xac, 0x2f, 0x71, 0xe2, 0x70, 0x06, 0x26, 0xa4, 0xab, 0x6d, 0xa4, - 0x03, 0x9a, 0x62, 0x8d, 0x94, 0x74, 0x97, 0x1b, 0x30, 0xd4, 0x87, 0xb4, 0x1e, 0x9a, 0x44, 0x90, - 0xb3, 0x74, 0x87, 0x0b, 0x42, 0x07, 0x5a, 0x16, 0x6a, 0x8a, 0x02, 0x49, 0x7b, 0x71, 0xaf, 0xf6, - 0x13, 0xf6, 0xb3, 0x72, 0xb9, 0xcb, 0x0d, 0x03, 0xb2, 0xd5, 0xbf, 0x64, 0x10, 0x45, 0xb9, 0x5d, - 0x10, 0xec, 0x66, 0x57, 0xa6, 0xde, 0xef, 0xe1, 0xcb, 0x8f, 0x87, 0xd7, 0x70, 0x11, 0x27, 0x72, - 0x32, 0x0b, 0xec, 0x90, 0x51, 0xe7, 0x2c, 0x09, 0x39, 0x13, 0x6c, 0x2c, 0x9d, 0x49, 0x28, 0xc4, - 0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, 0x57, 0xcd, 0x4b, 0xc3, 0xa8, 0x1b, 0xdd, 0xbc, - 0x6f, 0x55, 0x7e, 0x7f, 0xdf, 0xaa, 0xfc, 0xb2, 0x6c, 0x19, 0x37, 0xcb, 0x96, 0xf1, 0xdb, 0xb2, - 0x65, 0xfc, 0xbd, 0x6c, 0x19, 0x3f, 0x7e, 0xfb, 0xff, 0xff, 0xf1, 0xbf, 0xd2, 0xbf, 0xdf, 0x57, - 0x82, 0xaa, 0xba, 0xf7, 0x2f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x0d, 0x33, 0xad, 0x48, - 0x06, 0x00, 0x00, + // 920 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x5b, 0x6f, 0xdb, 0x36, + 0x14, 0xc7, 0xad, 0x26, 0x71, 0xac, 0x93, 0x9b, 0xc3, 0x05, 0x98, 0x90, 0xac, 0xb6, 0x91, 0x0e, + 0x68, 0x8a, 0x35, 0x52, 0xd2, 0x3d, 0x6e, 0xc0, 0xd0, 0xd8, 0x4e, 0xeb, 0x21, 0x17, 0x43, 0xce, + 0xd2, 0x5d, 0x1e, 0x08, 0x5d, 0x18, 0x59, 0xa8, 0x28, 0x0a, 0x24, 0xed, 0xc5, 0x7d, 0xda, 0x47, + 0xd8, 0xc7, 0xca, 0xe3, 0x1e, 0x07, 0x0c, 0xc8, 0x56, 0x7f, 0x88, 0x3d, 0x0f, 0xa4, 0xa8, 0xb4, + 0x0b, 0x82, 0xbd, 0xec, 0xc9, 0xe4, 0xff, 0xfc, 0xf8, 0xe7, 0xe1, 0x21, 0x8f, 0x05, 0xe7, 0x49, + 0x2a, 0xc7, 0x93, 0xd0, 0x8d, 0x18, 0xf5, 0x4e, 0xd3, 0x88, 0x33, 0xc1, 0xae, 0xa4, 0x37, 0x8e, + 0x84, 0x18, 0xa7, 0xd4, 0x8b, 0x68, 0xec,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xf2, 0x54, + 0x9d, 0x68, 0x1f, 0xc1, 0xfc, 0xb6, 0x5d, 0xef, 0x5f, 0x93, 0x68, 0xd0, 0xf3, 0xeb, 0x2a, 0x34, + 0x88, 0x8f, 0xe2, 0x9b, 0xf7, 0xad, 0xda, 0xef, 0xef, 0x5b, 0xb5, 0x5f, 0xe6, 0x2d, 0xeb, 0x66, + 0xde, 0xb2, 0x7e, 0x9b, 0xb7, 0xac, 0xbf, 0xe6, 0x2d, 0xeb, 0xc7, 0x6f, 0xff, 0xff, 0xe7, 0xe0, + 0x2b, 0xf3, 0xfb, 0x7d, 0x2d, 0xac, 0xeb, 0x7b, 0xff, 0xf2, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x84, 0x30, 0x9b, 0x7c, 0x65, 0x06, 0x00, 0x00, } func (m *Options) Marshal() (dAtA []byte, err error) { @@ -405,6 +410,14 @@ func (m *Options) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintRunhcs(dAtA, i, uint64(len(m.NCProxyAddr))) i += copy(dAtA[i:], m.NCProxyAddr) } + if len(m.LogLevel) > 0 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintRunhcs(dAtA, i, uint64(len(m.LogLevel))) + i += copy(dAtA[i:], m.LogLevel) + } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -548,6 +561,10 @@ func (m *Options) Size() (n int) { if l > 0 { n += 1 + l + sovRunhcs(uint64(l)) } + l = len(m.LogLevel) + if l > 0 { + n += 2 + l + sovRunhcs(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -627,6 +644,7 @@ func (this *Options) String() string { `DefaultVmScratchSizeInGb:` + fmt.Sprintf("%v", this.DefaultVmScratchSizeInGb) + `,`, `ShareScratch:` + fmt.Sprintf("%v", this.ShareScratch) + `,`, `NCProxyAddr:` + fmt.Sprintf("%v", this.NCProxyAddr) + `,`, + `LogLevel:` + fmt.Sprintf("%v", this.LogLevel) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -1054,6 +1072,38 @@ func (m *Options) Unmarshal(dAtA []byte) error { } m.NCProxyAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogLevel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRunhcs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRunhcs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRunhcs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogLevel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRunhcs(dAtA[iNdEx:]) diff --git a/test/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto b/test/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto index 85840b33ce..90f3376ffc 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto +++ b/test/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto @@ -9,7 +9,8 @@ option go_package = "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/ // Options are the set of customizations that can be passed at Create time. message Options { - // enable debug tracing + // Enable debug tracing (sets the logrus log level to debug). This may be deprecated in the future, prefer + // log_level as this will override debug if both of them are set. bool debug = 1; enum DebugType { @@ -69,23 +70,29 @@ message Options { // host and UVM. bool scale_cpu_limits_to_sandbox = 11; - // default_container_scratch_size_in_gb is the default scratch size (sandbox.vhdx) + // default_container_scratch_size_in_gb is the default scratch size (sandbox.vhdx) // to be used for containers. Every container will get a sandbox of `size_in_gb` assigned - // instead of the default of 20GB. + // instead of the default of 20GB. int32 default_container_scratch_size_in_gb = 12; - // default_vm_scratch_size_in_gb is the default scratch size (sandbox.vhdx) - // to be used for the UVM. This only applies to WCOW as LCOW doesn't mount a scratch + // default_vm_scratch_size_in_gb is the default scratch size (sandbox.vhdx) + // to be used for the UVM. This only applies to WCOW as LCOW doesn't mount a scratch // specifically for the UVM. int32 default_vm_scratch_size_in_gb = 13; - // share_scratch specifies if we'd like to reuse scratch space between multiple containers. + // share_scratch specifies if we'd like to reuse scratch space between multiple containers. // This currently only affects LCOW. The sandbox containers scratch space is re-used for all - // subsequent containers launched in the pod. + // subsequent containers launched in the pod. bool share_scratch = 14; - //NCProxyAddr is the address of the network configuration proxy service. If omitted - // the network is setup locally. - string NCProxyAddr = 15; + + // NCProxyAddr is the address of the network configuration proxy service. If omitted + // the network is setup locally. + string NCProxyAddr = 15; + + // log_level specifies the logrus log level for the shim. Supported values are a string representation of the + // logrus log levels: "trace", "debug", "info", "warn", "error", "fatal", "panic". This setting will override + // the `debug` field if both are specified, unless the level specified is also "debug", as these are equivalent. + string log_level = 16; } // ProcessDetails contains additional information about a process. This is the additional diff --git a/test/vendor/github.com/Microsoft/hcsshim/errors.go b/test/vendor/github.com/Microsoft/hcsshim/errors.go index 7943086733..f367022e71 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/errors.go +++ b/test/vendor/github.com/Microsoft/hcsshim/errors.go @@ -59,7 +59,7 @@ var ( // ErrVmcomputeOperationInvalidState is an error encountered when the compute system is not in a valid state for the requested operation ErrVmcomputeOperationInvalidState = hcs.ErrVmcomputeOperationInvalidState - // ErrProcNotFound is an error encountered when the the process cannot be found + // ErrProcNotFound is an error encountered when a procedure look up fails. ErrProcNotFound = hcs.ErrProcNotFound // ErrVmcomputeOperationAccessIsDenied is an error which can be encountered when enumerating compute systems in RS1/RS2 @@ -159,7 +159,7 @@ func (e *ProcessError) Error() string { // IsNotExist checks if an error is caused by the Container or Process not existing. // Note: Currently, ErrElementNotFound can mean that a Process has either // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist -// will currently return true when the error is ErrElementNotFound or ErrProcNotFound. +// will currently return true when the error is ErrElementNotFound. func IsNotExist(err error) bool { if _, ok := err.(EndpointNotFoundError); ok { return true @@ -192,7 +192,7 @@ func IsTimeout(err error) bool { // a Container or Process being already stopped. // Note: Currently, ErrElementNotFound can mean that a Process has either // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist -// will currently return true when the error is ErrElementNotFound or ErrProcNotFound. +// will currently return true when the error is ErrElementNotFound. func IsAlreadyStopped(err error) bool { return hcs.IsAlreadyStopped(getInnerError(err)) } diff --git a/test/vendor/github.com/Microsoft/hcsshim/go.mod b/test/vendor/github.com/Microsoft/hcsshim/go.mod index 48db15a4ad..bc7e07603b 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/go.mod +++ b/test/vendor/github.com/Microsoft/hcsshim/go.mod @@ -6,7 +6,7 @@ require ( github.com/Microsoft/go-winio v0.4.17 github.com/containerd/cgroups v1.0.1 github.com/containerd/console v1.0.2 - github.com/containerd/containerd v1.5.1 + github.com/containerd/containerd v1.5.2 github.com/containerd/go-runc v1.0.0 github.com/containerd/ttrpc v1.0.2 github.com/containerd/typeurl v1.0.2 diff --git a/test/vendor/github.com/Microsoft/hcsshim/go.sum b/test/vendor/github.com/Microsoft/hcsshim/go.sum index 1cdb730911..33888eaa57 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/go.sum +++ b/test/vendor/github.com/Microsoft/hcsshim/go.sum @@ -128,8 +128,8 @@ github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7 github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.1 h1:xWHPAoe6VkUiI9GAvndJM7s/0MTrmwX3AQiYTr3olf0= -github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= +github.com/containerd/containerd v1.5.2 h1:MG/Bg1pbmMb61j3wHCFWPxESXHieiKr2xG64px/k8zQ= +github.com/containerd/containerd v1.5.2/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= 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= @@ -404,11 +404,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -879,7 +877,6 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/test/vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go b/test/vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go index 7696e4b481..644f0ab711 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go +++ b/test/vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go @@ -60,7 +60,7 @@ var ( // ErrVmcomputeOperationInvalidState is an error encountered when the compute system is not in a valid state for the requested operation ErrVmcomputeOperationInvalidState = syscall.Errno(0xc0370105) - // ErrProcNotFound is an error encountered when the the process cannot be found + // ErrProcNotFound is an error encountered when a procedure look up fails. ErrProcNotFound = syscall.Errno(0x7f) // ErrVmcomputeOperationAccessIsDenied is an error which can be encountered when enumerating compute systems in RS1/RS2 @@ -242,12 +242,11 @@ func makeProcessError(process *Process, op string, err error, events []ErrorEven // IsNotExist checks if an error is caused by the Container or Process not existing. // Note: Currently, ErrElementNotFound can mean that a Process has either // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist -// will currently return true when the error is ErrElementNotFound or ErrProcNotFound. +// will currently return true when the error is ErrElementNotFound. func IsNotExist(err error) bool { err = getInnerError(err) return err == ErrComputeSystemDoesNotExist || - err == ErrElementNotFound || - err == ErrProcNotFound + err == ErrElementNotFound } // IsAlreadyClosed checks if an error is caused by the Container or Process having been @@ -278,12 +277,11 @@ func IsTimeout(err error) bool { // a Container or Process being already stopped. // Note: Currently, ErrElementNotFound can mean that a Process has either // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist -// will currently return true when the error is ErrElementNotFound or ErrProcNotFound. +// will currently return true when the error is ErrElementNotFound. func IsAlreadyStopped(err error) bool { err = getInnerError(err) return err == ErrVmcomputeAlreadyStopped || - err == ErrElementNotFound || - err == ErrProcNotFound + err == ErrElementNotFound } // IsNotSupported returns a boolean indicating whether the error is caused by diff --git a/test/vendor/github.com/Microsoft/hcsshim/internal/oci/annotations.go b/test/vendor/github.com/Microsoft/hcsshim/internal/oci/annotations.go index ebb5a9f4a4..9ac11dcbcd 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/internal/oci/annotations.go +++ b/test/vendor/github.com/Microsoft/hcsshim/internal/oci/annotations.go @@ -12,6 +12,7 @@ const ( // used via OCI runtimes and rather use // `spec.Windows.Resources.Memory.Limit`. AnnotationContainerMemorySizeInMB = "io.microsoft.container.memory.sizeinmb" + // AnnotationContainerProcessorCount overrides the container processor count // set via the OCI spec. // @@ -22,6 +23,7 @@ const ( // `WindowsPodSandboxConfig` for setting this correctly. It should not be // used via OCI runtimes and rather use `spec.Windows.Resources.CPU.Count`. AnnotationContainerProcessorCount = "io.microsoft.container.processor.count" + // AnnotationContainerProcessorLimit overrides the container processor limit // set via the OCI spec. // @@ -36,6 +38,7 @@ const ( // used via OCI runtimes and rather use // `spec.Windows.Resources.CPU.Maximum`. AnnotationContainerProcessorLimit = "io.microsoft.container.processor.limit" + // AnnotationContainerProcessorWeight overrides the container processor // weight set via the OCI spec. // @@ -48,6 +51,7 @@ const ( // `WindowsPodSandboxConfig` for setting this correctly. It should not be // used via OCI runtimes and rather use `spec.Windows.Resources.CPU.Shares`. AnnotationContainerProcessorWeight = "io.microsoft.container.processor.weight" + // AnnotationContainerStorageQoSBandwidthMaximum overrides the container // storage bandwidth per second set via the OCI spec. // @@ -56,6 +60,7 @@ const ( // used via OCI runtimes and rather use // `spec.Windows.Resources.Storage.Bps`. AnnotationContainerStorageQoSBandwidthMaximum = "io.microsoft.container.storage.qos.bandwidthmaximum" + // AnnotationContainerStorageQoSIopsMaximum overrides the container storage // maximum iops set via the OCI spec. // @@ -64,37 +69,58 @@ const ( // used via OCI runtimes and rather use // `spec.Windows.Resources.Storage.Iops`. AnnotationContainerStorageQoSIopsMaximum = "io.microsoft.container.storage.qos.iopsmaximum" + // AnnotationGPUVHDPath overrides the default path to search for the gpu vhd AnnotationGPUVHDPath = "io.microsoft.lcow.gpuvhdpath" + // AnnotationAssignedDeviceKernelDrivers indicates what drivers to install in the pod during device // assignment. This value should contain a list of comma separated directories containing all // files and information needed to install given driver(s). This may include .sys, // .inf, .cer, and/or other files used during standard installation with pnputil. AnnotationAssignedDeviceKernelDrivers = "io.microsoft.assigneddevice.kerneldrivers" + // AnnotationHostProcessInheritUser indicates whether to ignore the username passed in to run a host process // container as and instead inherit the user token from the executable that is launching the container process. AnnotationHostProcessInheritUser = "microsoft.com/hostprocess-inherit-user" + // AnnotationHostProcessContainer indicates to launch a host process container (job container in this repository). AnnotationHostProcessContainer = "microsoft.com/hostprocess-container" - AnnotationAllowOvercommit = "io.microsoft.virtualmachine.computetopology.memory.allowovercommit" - AnnotationEnableDeferredCommit = "io.microsoft.virtualmachine.computetopology.memory.enabledeferredcommit" + // AnnotationAllowOvercommit indicates if we should allow over commit memory for UVM. + // Defaults to true. For physical backed memory, set to false. + AnnotationAllowOvercommit = "io.microsoft.virtualmachine.computetopology.memory.allowovercommit" + + // AnnotationEnableDeferredCommit indicates if we should allow deferred memory commit for UVM. + // Defaults to false. For virtual memory with deferred commit, set to true. + AnnotationEnableDeferredCommit = "io.microsoft.virtualmachine.computetopology.memory.enabledeferredcommit" + + // AnnotationEnableColdDiscardHint indicates whether to enable cold discard hint, which allows the UVM + // to trim non-zeroed pages from the working set (if supported by the guest operating system). AnnotationEnableColdDiscardHint = "io.microsoft.virtualmachine.computetopology.memory.enablecolddiscardhint" - // annotationMemorySizeInMB overrides the container memory size set via the + + // AnnotationMemorySizeInMB overrides the container memory size set via the // OCI spec. // // Note: This annotation is in MB. OCI is in Bytes. When using this override // the caller MUST use MB or sizing will be wrong. - AnnotationMemorySizeInMB = "io.microsoft.virtualmachine.computetopology.memory.sizeinmb" - AnnotationMemoryLowMMIOGapInMB = "io.microsoft.virtualmachine.computetopology.memory.lowmmiogapinmb" + AnnotationMemorySizeInMB = "io.microsoft.virtualmachine.computetopology.memory.sizeinmb" + + // AnnotationMemoryLowMMIOGapInMB indicates the low MMIO gap in MB + AnnotationMemoryLowMMIOGapInMB = "io.microsoft.virtualmachine.computetopology.memory.lowmmiogapinmb" + + // AnnotationMemoryHighMMIOBaseInMB indicates the high MMIO base in MB AnnotationMemoryHighMMIOBaseInMB = "io.microsoft.virtualmachine.computetopology.memory.highmmiobaseinmb" - AnnotationMemoryHighMMIOGapInMB = "io.microsoft.virtualmachine.computetopology.memory.highmmiogapinmb" + + // AnnotationMemoryHighMMIOBaseInMB indicates the high MMIO gap in MB + AnnotationMemoryHighMMIOGapInMB = "io.microsoft.virtualmachine.computetopology.memory.highmmiogapinmb" + // annotationProcessorCount overrides the hypervisor isolated vCPU count set // via the OCI spec. // // Note: Unlike Windows process isolated container QoS Count/Limt/Weight on // the UVM are not mutually exclusive and can be set together. AnnotationProcessorCount = "io.microsoft.virtualmachine.computetopology.processor.count" + // annotationProcessorLimit overrides the hypervisor isolated vCPU limit set // via the OCI spec. // @@ -104,44 +130,80 @@ const ( // Note: Unlike Windows process isolated container QoS Count/Limt/Weight on // the UVM are not mutually exclusive and can be set together. AnnotationProcessorLimit = "io.microsoft.virtualmachine.computetopology.processor.limit" - // annotationProcessorWeight overrides the hypervisor isolated vCPU weight set + + // AnnotationProcessorWeight overrides the hypervisor isolated vCPU weight set // via the OCI spec. // // Weight allows values 0 - 10,000. (100 is the default if omitted) // // Note: Unlike Windows process isolated container QoS Count/Limt/Weight on // the UVM are not mutually exclusive and can be set together. - AnnotationProcessorWeight = "io.microsoft.virtualmachine.computetopology.processor.weight" - AnnotationVPMemCount = "io.microsoft.virtualmachine.devices.virtualpmem.maximumcount" - AnnotationVPMemSize = "io.microsoft.virtualmachine.devices.virtualpmem.maximumsizebytes" - AnnotationPreferredRootFSType = "io.microsoft.virtualmachine.lcow.preferredrootfstype" - AnnotationBootFilesRootPath = "io.microsoft.virtualmachine.lcow.bootfilesrootpath" - AnnotationKernelDirectBoot = "io.microsoft.virtualmachine.lcow.kerneldirectboot" - AnnotationVPCIEnabled = "io.microsoft.virtualmachine.lcow.vpcienabled" - AnnotationVPMemNoMultiMapping = "io.microsoft.virtualmachine.lcow.vpmem.nomultimapping" - AnnotationStorageQoSBandwidthMaximum = "io.microsoft.virtualmachine.storageqos.bandwidthmaximum" - AnnotationStorageQoSIopsMaximum = "io.microsoft.virtualmachine.storageqos.iopsmaximum" - AnnotationFullyPhysicallyBacked = "io.microsoft.virtualmachine.fullyphysicallybacked" + AnnotationProcessorWeight = "io.microsoft.virtualmachine.computetopology.processor.weight" + + // AnnotationVPMemCount indicates the max number of vpmem devices that can be used on the UVM + AnnotationVPMemCount = "io.microsoft.virtualmachine.devices.virtualpmem.maximumcount" + + // AnnotationVPMemSize indicates the size of the VPMem devices. + AnnotationVPMemSize = "io.microsoft.virtualmachine.devices.virtualpmem.maximumsizebytes" + + // AnnotationPreferredRootFSType indicates what the preferred rootfs type should be for an LCOW UVM. + // valid values are "initrd" or "vhd" + AnnotationPreferredRootFSType = "io.microsoft.virtualmachine.lcow.preferredrootfstype" + + // AnnotationBootFilesRootPath indicates the path to find the LCOW boot files to use when creating the UVM + AnnotationBootFilesRootPath = "io.microsoft.virtualmachine.lcow.bootfilesrootpath" + + // AnnotationKernelDirectBoot indicates that we should skip UEFI and boot directly to `kernel` + AnnotationKernelDirectBoot = "io.microsoft.virtualmachine.lcow.kerneldirectboot" + + // AnnotationVPCIEnabled indicates that pci support should be enabled for the LCOW UVM + AnnotationVPCIEnabled = "io.microsoft.virtualmachine.lcow.vpcienabled" + + // AnnotationVPMemNoMultiMapping indicates that we should disable LCOW vpmem layer multi mapping + AnnotationVPMemNoMultiMapping = "io.microsoft.virtualmachine.lcow.vpmem.nomultimapping" + + // AnnotationStorageQoSBandwidthMaximum indicates the maximum number of bytes per second. If `0` + // will default to the platform default. + AnnotationStorageQoSBandwidthMaximum = "io.microsoft.virtualmachine.storageqos.bandwidthmaximum" + + // AnnotationStorageQoSIopsMaximum indicates the maximum number of Iops. If `0` will + // default to the platform default. + AnnotationStorageQoSIopsMaximum = "io.microsoft.virtualmachine.storageqos.iopsmaximum" + + // AnnotationFullyPhysicallyBacked indicates that the UVM should use physically backed memory only, + // including for additional devices added later. + AnnotationFullyPhysicallyBacked = "io.microsoft.virtualmachine.fullyphysicallybacked" + + // AnnotationDisableCompartmentNamespace sets whether to disable namespacing the network compartment in the UVM + // for WCOW. AnnotationDisableCompartmentNamespace = "io.microsoft.virtualmachine.disablecompartmentnamespace" - AnnotationVSMBNoDirectMap = "io.microsoft.virtualmachine.wcow.virtualSMB.nodirectmap" - // annotation used to specify the cpugroup ID that a UVM should be assigned to + // AnnotationVSMBNoDirectMap specifies that no direct mapping should be used for any VSMBs added to the UVM + AnnotationVSMBNoDirectMap = "io.microsoft.virtualmachine.wcow.virtualSMB.nodirectmap" + + // AnnotationCPUGroupID specifies the cpugroup ID that a UVM should be assigned to if any AnnotationCPUGroupID = "io.microsoft.virtualmachine.cpugroup.id" - // SaveAsTemplate annotation must be used with a pod & container creation request. + // AnnotationSaveAsTemplate annotation must be used with a pod & container creation request. // If this annotation is present in the request then it will save the UVM (pod) // and the container(s) inside it as a template. However, this also means that this // pod and the containers inside this pod will permananetly stay in the // paused/templated state and can not be resumed again. AnnotationSaveAsTemplate = "io.microsoft.virtualmachine.saveastemplate" - // This annotation should be used when creating a pod or a container from a template. + // AnnotationTemplateID should be used when creating a pod or a container from a template. // When creating a pod from a template use the ID of the templated pod as the // TemplateID and when creating a container use the ID of the templated container as // the TemplateID. It is the client's responsibility to make sure that the sandbox // within which a cloned container needs to be created must also be created from the // same template. - AnnotationTemplateID = "io.microsoft.virtualmachine.templateid" + AnnotationTemplateID = "io.microsoft.virtualmachine.templateid" + + // AnnotationNetworkConfigProxy holds the address of the network config proxy service. + // If set, network setup will be attempted via ncproxy. AnnotationNetworkConfigProxy = "io.microsoft.network.ncproxy" + + // AnnotationNcproxyContainerID indicates whether or not to use the hcsshim container ID + // when setting up ncproxy and computeagent AnnotationNcproxyContainerID = "io.microsoft.network.ncproxy.containerid" ) diff --git a/test/vendor/github.com/containerd/containerd/version/version.go b/test/vendor/github.com/containerd/containerd/version/version.go index 7bdabd1c06..aca0c4562d 100644 --- a/test/vendor/github.com/containerd/containerd/version/version.go +++ b/test/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.1+unknown" + Version = "1.5.2+unknown" // Revision is filled with the VCS (e.g. git) revision being used to build // the program at linking time. diff --git a/test/vendor/modules.txt b/test/vendor/modules.txt index 2cd28b7f23..1346ab93cd 100644 --- a/test/vendor/modules.txt +++ b/test/vendor/modules.txt @@ -72,7 +72,7 @@ github.com/blang/semver github.com/containerd/cgroups/stats/v1 # github.com/containerd/console v1.0.2 github.com/containerd/console -# github.com/containerd/containerd v1.5.1 +# github.com/containerd/containerd v1.5.2 ## explicit github.com/containerd/containerd github.com/containerd/containerd/api/events