diff --git a/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go b/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go index 1be269e296..fe11f8a2bb 100644 --- a/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go +++ b/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, - 0x24, 0xa1, 0x4e, 0x48, 0x23, 0x27, 0x64, 0xa9, 0xf4, 0x93, 0x94, 0xf0, 0xe8, 0x28, 0xd7, 0x8e, - 0xf8, 0x2c, 0x9d, 0x84, 0xe2, 0x68, 0x7e, 0xe2, 0xb0, 0x4c, 0x26, 0x2c, 0x15, 0x4e, 0xa1, 0xd8, - 0x19, 0x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 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, 0x45, 0x2c, 0x97, 0x41, 0x9a, 0x13, 0x1e, 0xef, 0x2b, + 0x6d, 0x9f, 0x4f, 0xf2, 0x71, 0x24, 0xf6, 0xa7, 0x87, 0x1e, 0x2b, 0x64, 0xca, 0x72, 0xe1, 0x95, + 0x8a, 0x5b, 0x70, 0x26, 0x19, 0xda, 0xfa, 0xc0, 0xb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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/cmd/containerd-shim-runhcs-v1/options/runhcs.proto b/cmd/containerd-shim-runhcs-v1/options/runhcs.proto index 85840b33ce..90f3376ffc 100644 --- a/cmd/containerd-shim-runhcs-v1/options/runhcs.proto +++ b/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/cmd/containerd-shim-runhcs-v1/serve.go b/cmd/containerd-shim-runhcs-v1/serve.go index f94bccd458..65f6a5dcaf 100644 --- a/cmd/containerd-shim-runhcs-v1/serve.go +++ b/cmd/containerd-shim-runhcs-v1/serve.go @@ -82,10 +82,26 @@ var serveCommand = cli.Command{ shimOpts = newShimOpts } + if shimOpts.Debug && shimOpts.LogLevel != "" { + logrus.Warning("Both Debug and LogLevel specified, Debug will be overriden") + } + + // For now keep supporting the debug option, this used to be the only way to specify a different logging + // level for the shim. if shimOpts.Debug { logrus.SetLevel(logrus.DebugLevel) } + // If log level is specified, set the corresponding logrus logging level. This overrides the debug option + // (unless the level being asked for IS debug also, then this doesn't do much). + if shimOpts.LogLevel != "" { + lvl, err := logrus.ParseLevel(shimOpts.LogLevel) + if err != nil { + return errors.Wrapf(err, "failed to parse shim log level %q", shimOpts.LogLevel) + } + logrus.SetLevel(lvl) + } + switch shimOpts.DebugType { case runhcsopts.Options_NPIPE: logrus.SetFormatter(&logrus.TextFormatter{