Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
# the following lines are in sorted order, FYI |
| 2 | 2 |
github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109 |
| 3 |
-github.com/Microsoft/hcsshim v0.8.6 |
|
| 3 |
+github.com/Microsoft/hcsshim ada9cb39f715fb568e1030e7613732bb4f1e4aeb |
|
| 4 | 4 |
github.com/Microsoft/go-winio v0.4.11 |
| 5 | 5 |
github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a |
| 6 | 6 |
github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git |
| 0 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,1033 @@ |
| 0 |
+// Code generated by protoc-gen-gogo. DO NOT EDIT. |
|
| 1 |
+// source: github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto |
|
| 2 |
+ |
|
| 3 |
+/* |
|
| 4 |
+ Package options is a generated protocol buffer package. |
|
| 5 |
+ |
|
| 6 |
+ It is generated from these files: |
|
| 7 |
+ github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto |
|
| 8 |
+ |
|
| 9 |
+ It has these top-level messages: |
|
| 10 |
+ Options |
|
| 11 |
+ ProcessDetails |
|
| 12 |
+*/ |
|
| 13 |
+package options |
|
| 14 |
+ |
|
| 15 |
+import proto "github.com/gogo/protobuf/proto" |
|
| 16 |
+import fmt "fmt" |
|
| 17 |
+import math "math" |
|
| 18 |
+ |
|
| 19 |
+// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" |
|
| 20 |
+import _ "github.com/gogo/protobuf/types" |
|
| 21 |
+ |
|
| 22 |
+import time "time" |
|
| 23 |
+ |
|
| 24 |
+import types "github.com/gogo/protobuf/types" |
|
| 25 |
+ |
|
| 26 |
+import strings "strings" |
|
| 27 |
+import reflect "reflect" |
|
| 28 |
+ |
|
| 29 |
+import io "io" |
|
| 30 |
+ |
|
| 31 |
+// Reference imports to suppress errors if they are not otherwise used. |
|
| 32 |
+var _ = proto.Marshal |
|
| 33 |
+var _ = fmt.Errorf |
|
| 34 |
+var _ = math.Inf |
|
| 35 |
+var _ = time.Kitchen |
|
| 36 |
+ |
|
| 37 |
+// This is a compile-time assertion to ensure that this generated file |
|
| 38 |
+// is compatible with the proto package it is being compiled against. |
|
| 39 |
+// A compilation error at this line likely means your copy of the |
|
| 40 |
+// proto package needs to be updated. |
|
| 41 |
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package |
|
| 42 |
+ |
|
| 43 |
+type Options_DebugType int32 |
|
| 44 |
+ |
|
| 45 |
+const ( |
|
| 46 |
+ Options_NPIPE Options_DebugType = 0 |
|
| 47 |
+ Options_FILE Options_DebugType = 1 |
|
| 48 |
+ Options_ETW Options_DebugType = 2 |
|
| 49 |
+) |
|
| 50 |
+ |
|
| 51 |
+var Options_DebugType_name = map[int32]string{
|
|
| 52 |
+ 0: "NPIPE", |
|
| 53 |
+ 1: "FILE", |
|
| 54 |
+ 2: "ETW", |
|
| 55 |
+} |
|
| 56 |
+var Options_DebugType_value = map[string]int32{
|
|
| 57 |
+ "NPIPE": 0, |
|
| 58 |
+ "FILE": 1, |
|
| 59 |
+ "ETW": 2, |
|
| 60 |
+} |
|
| 61 |
+ |
|
| 62 |
+func (x Options_DebugType) String() string {
|
|
| 63 |
+ return proto.EnumName(Options_DebugType_name, int32(x)) |
|
| 64 |
+} |
|
| 65 |
+func (Options_DebugType) EnumDescriptor() ([]byte, []int) { return fileDescriptorRunhcs, []int{0, 0} }
|
|
| 66 |
+ |
|
| 67 |
+type Options_SandboxIsolation int32 |
|
| 68 |
+ |
|
| 69 |
+const ( |
|
| 70 |
+ Options_PROCESS Options_SandboxIsolation = 0 |
|
| 71 |
+ Options_HYPERVISOR Options_SandboxIsolation = 1 |
|
| 72 |
+) |
|
| 73 |
+ |
|
| 74 |
+var Options_SandboxIsolation_name = map[int32]string{
|
|
| 75 |
+ 0: "PROCESS", |
|
| 76 |
+ 1: "HYPERVISOR", |
|
| 77 |
+} |
|
| 78 |
+var Options_SandboxIsolation_value = map[string]int32{
|
|
| 79 |
+ "PROCESS": 0, |
|
| 80 |
+ "HYPERVISOR": 1, |
|
| 81 |
+} |
|
| 82 |
+ |
|
| 83 |
+func (x Options_SandboxIsolation) String() string {
|
|
| 84 |
+ return proto.EnumName(Options_SandboxIsolation_name, int32(x)) |
|
| 85 |
+} |
|
| 86 |
+func (Options_SandboxIsolation) EnumDescriptor() ([]byte, []int) {
|
|
| 87 |
+ return fileDescriptorRunhcs, []int{0, 1}
|
|
| 88 |
+} |
|
| 89 |
+ |
|
| 90 |
+// Options are the set of customizations that can be passed at Create time. |
|
| 91 |
+type Options struct {
|
|
| 92 |
+ // enable debug tracing |
|
| 93 |
+ Debug bool `protobuf:"varint,1,opt,name=debug,proto3" json:"debug,omitempty"` |
|
| 94 |
+ // debug tracing output type |
|
| 95 |
+ DebugType Options_DebugType `protobuf:"varint,2,opt,name=debug_type,json=debugType,proto3,enum=containerd.runhcs.v1.Options_DebugType" json:"debug_type,omitempty"` |
|
| 96 |
+ // registry key root for storage of the runhcs container state |
|
| 97 |
+ RegistryRoot string `protobuf:"bytes,3,opt,name=registry_root,json=registryRoot,proto3" json:"registry_root,omitempty"` |
|
| 98 |
+ // sandbox_image is the image to use for the sandbox that matches the |
|
| 99 |
+ // sandbox_platform. |
|
| 100 |
+ SandboxImage string `protobuf:"bytes,4,opt,name=sandbox_image,json=sandboxImage,proto3" json:"sandbox_image,omitempty"` |
|
| 101 |
+ // sandbox_platform is a CRI setting that specifies the platform |
|
| 102 |
+ // architecture for all sandbox's in this runtime. Values are |
|
| 103 |
+ // 'windows/amd64' and 'linux/amd64'. |
|
| 104 |
+ SandboxPlatform string `protobuf:"bytes,5,opt,name=sandbox_platform,json=sandboxPlatform,proto3" json:"sandbox_platform,omitempty"` |
|
| 105 |
+ // sandbox_isolation is a CRI setting that specifies the isolation level of |
|
| 106 |
+ // the sandbox. For Windows runtime PROCESS and HYPERVISOR are valid. For |
|
| 107 |
+ // LCOW only HYPERVISOR is valid and default if omitted. |
|
| 108 |
+ SandboxIsolation Options_SandboxIsolation `protobuf:"varint,6,opt,name=sandbox_isolation,json=sandboxIsolation,proto3,enum=containerd.runhcs.v1.Options_SandboxIsolation" json:"sandbox_isolation,omitempty"` |
|
| 109 |
+ // boot_files_root_path is the path to the directory containing the LCOW |
|
| 110 |
+ // kernel and root FS files. |
|
| 111 |
+ BootFilesRootPath string `protobuf:"bytes,7,opt,name=boot_files_root_path,json=bootFilesRootPath,proto3" json:"boot_files_root_path,omitempty"` |
|
| 112 |
+} |
|
| 113 |
+ |
|
| 114 |
+func (m *Options) Reset() { *m = Options{} }
|
|
| 115 |
+func (*Options) ProtoMessage() {}
|
|
| 116 |
+func (*Options) Descriptor() ([]byte, []int) { return fileDescriptorRunhcs, []int{0} }
|
|
| 117 |
+ |
|
| 118 |
+// ProcessDetails contains additional information about a process. This is the additional |
|
| 119 |
+// info returned in the Pids query. |
|
| 120 |
+type ProcessDetails struct {
|
|
| 121 |
+ ImageName string `protobuf:"bytes,1,opt,name=image_name,json=imageName,proto3" json:"image_name,omitempty"` |
|
| 122 |
+ CreatedAt time.Time `protobuf:"bytes,2,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` |
|
| 123 |
+ KernelTime_100Ns uint64 `protobuf:"varint,3,opt,name=kernel_time_100_ns,json=kernelTime100Ns,proto3" json:"kernel_time_100_ns,omitempty"` |
|
| 124 |
+ MemoryCommitBytes uint64 `protobuf:"varint,4,opt,name=memory_commit_bytes,json=memoryCommitBytes,proto3" json:"memory_commit_bytes,omitempty"` |
|
| 125 |
+ MemoryWorkingSetPrivateBytes uint64 `protobuf:"varint,5,opt,name=memory_working_set_private_bytes,json=memoryWorkingSetPrivateBytes,proto3" json:"memory_working_set_private_bytes,omitempty"` |
|
| 126 |
+ MemoryWorkingSetSharedBytes uint64 `protobuf:"varint,6,opt,name=memory_working_set_shared_bytes,json=memoryWorkingSetSharedBytes,proto3" json:"memory_working_set_shared_bytes,omitempty"` |
|
| 127 |
+ ProcessID uint32 `protobuf:"varint,7,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` |
|
| 128 |
+ UserTime_100Ns uint64 `protobuf:"varint,8,opt,name=user_time_100_ns,json=userTime100Ns,proto3" json:"user_time_100_ns,omitempty"` |
|
| 129 |
+ ExecID string `protobuf:"bytes,9,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` |
|
| 130 |
+} |
|
| 131 |
+ |
|
| 132 |
+func (m *ProcessDetails) Reset() { *m = ProcessDetails{} }
|
|
| 133 |
+func (*ProcessDetails) ProtoMessage() {}
|
|
| 134 |
+func (*ProcessDetails) Descriptor() ([]byte, []int) { return fileDescriptorRunhcs, []int{1} }
|
|
| 135 |
+ |
|
| 136 |
+func init() {
|
|
| 137 |
+ proto.RegisterType((*Options)(nil), "containerd.runhcs.v1.Options") |
|
| 138 |
+ proto.RegisterType((*ProcessDetails)(nil), "containerd.runhcs.v1.ProcessDetails") |
|
| 139 |
+ proto.RegisterEnum("containerd.runhcs.v1.Options_DebugType", Options_DebugType_name, Options_DebugType_value)
|
|
| 140 |
+ proto.RegisterEnum("containerd.runhcs.v1.Options_SandboxIsolation", Options_SandboxIsolation_name, Options_SandboxIsolation_value)
|
|
| 141 |
+} |
|
| 142 |
+func (m *Options) Marshal() (dAtA []byte, err error) {
|
|
| 143 |
+ size := m.Size() |
|
| 144 |
+ dAtA = make([]byte, size) |
|
| 145 |
+ n, err := m.MarshalTo(dAtA) |
|
| 146 |
+ if err != nil {
|
|
| 147 |
+ return nil, err |
|
| 148 |
+ } |
|
| 149 |
+ return dAtA[:n], nil |
|
| 150 |
+} |
|
| 151 |
+ |
|
| 152 |
+func (m *Options) MarshalTo(dAtA []byte) (int, error) {
|
|
| 153 |
+ var i int |
|
| 154 |
+ _ = i |
|
| 155 |
+ var l int |
|
| 156 |
+ _ = l |
|
| 157 |
+ if m.Debug {
|
|
| 158 |
+ dAtA[i] = 0x8 |
|
| 159 |
+ i++ |
|
| 160 |
+ if m.Debug {
|
|
| 161 |
+ dAtA[i] = 1 |
|
| 162 |
+ } else {
|
|
| 163 |
+ dAtA[i] = 0 |
|
| 164 |
+ } |
|
| 165 |
+ i++ |
|
| 166 |
+ } |
|
| 167 |
+ if m.DebugType != 0 {
|
|
| 168 |
+ dAtA[i] = 0x10 |
|
| 169 |
+ i++ |
|
| 170 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(m.DebugType)) |
|
| 171 |
+ } |
|
| 172 |
+ if len(m.RegistryRoot) > 0 {
|
|
| 173 |
+ dAtA[i] = 0x1a |
|
| 174 |
+ i++ |
|
| 175 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(len(m.RegistryRoot))) |
|
| 176 |
+ i += copy(dAtA[i:], m.RegistryRoot) |
|
| 177 |
+ } |
|
| 178 |
+ if len(m.SandboxImage) > 0 {
|
|
| 179 |
+ dAtA[i] = 0x22 |
|
| 180 |
+ i++ |
|
| 181 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(len(m.SandboxImage))) |
|
| 182 |
+ i += copy(dAtA[i:], m.SandboxImage) |
|
| 183 |
+ } |
|
| 184 |
+ if len(m.SandboxPlatform) > 0 {
|
|
| 185 |
+ dAtA[i] = 0x2a |
|
| 186 |
+ i++ |
|
| 187 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(len(m.SandboxPlatform))) |
|
| 188 |
+ i += copy(dAtA[i:], m.SandboxPlatform) |
|
| 189 |
+ } |
|
| 190 |
+ if m.SandboxIsolation != 0 {
|
|
| 191 |
+ dAtA[i] = 0x30 |
|
| 192 |
+ i++ |
|
| 193 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(m.SandboxIsolation)) |
|
| 194 |
+ } |
|
| 195 |
+ if len(m.BootFilesRootPath) > 0 {
|
|
| 196 |
+ dAtA[i] = 0x3a |
|
| 197 |
+ i++ |
|
| 198 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(len(m.BootFilesRootPath))) |
|
| 199 |
+ i += copy(dAtA[i:], m.BootFilesRootPath) |
|
| 200 |
+ } |
|
| 201 |
+ return i, nil |
|
| 202 |
+} |
|
| 203 |
+ |
|
| 204 |
+func (m *ProcessDetails) Marshal() (dAtA []byte, err error) {
|
|
| 205 |
+ size := m.Size() |
|
| 206 |
+ dAtA = make([]byte, size) |
|
| 207 |
+ n, err := m.MarshalTo(dAtA) |
|
| 208 |
+ if err != nil {
|
|
| 209 |
+ return nil, err |
|
| 210 |
+ } |
|
| 211 |
+ return dAtA[:n], nil |
|
| 212 |
+} |
|
| 213 |
+ |
|
| 214 |
+func (m *ProcessDetails) MarshalTo(dAtA []byte) (int, error) {
|
|
| 215 |
+ var i int |
|
| 216 |
+ _ = i |
|
| 217 |
+ var l int |
|
| 218 |
+ _ = l |
|
| 219 |
+ if len(m.ImageName) > 0 {
|
|
| 220 |
+ dAtA[i] = 0xa |
|
| 221 |
+ i++ |
|
| 222 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(len(m.ImageName))) |
|
| 223 |
+ i += copy(dAtA[i:], m.ImageName) |
|
| 224 |
+ } |
|
| 225 |
+ dAtA[i] = 0x12 |
|
| 226 |
+ i++ |
|
| 227 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(types.SizeOfStdTime(m.CreatedAt))) |
|
| 228 |
+ n1, err := types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) |
|
| 229 |
+ if err != nil {
|
|
| 230 |
+ return 0, err |
|
| 231 |
+ } |
|
| 232 |
+ i += n1 |
|
| 233 |
+ if m.KernelTime_100Ns != 0 {
|
|
| 234 |
+ dAtA[i] = 0x18 |
|
| 235 |
+ i++ |
|
| 236 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(m.KernelTime_100Ns)) |
|
| 237 |
+ } |
|
| 238 |
+ if m.MemoryCommitBytes != 0 {
|
|
| 239 |
+ dAtA[i] = 0x20 |
|
| 240 |
+ i++ |
|
| 241 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(m.MemoryCommitBytes)) |
|
| 242 |
+ } |
|
| 243 |
+ if m.MemoryWorkingSetPrivateBytes != 0 {
|
|
| 244 |
+ dAtA[i] = 0x28 |
|
| 245 |
+ i++ |
|
| 246 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(m.MemoryWorkingSetPrivateBytes)) |
|
| 247 |
+ } |
|
| 248 |
+ if m.MemoryWorkingSetSharedBytes != 0 {
|
|
| 249 |
+ dAtA[i] = 0x30 |
|
| 250 |
+ i++ |
|
| 251 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(m.MemoryWorkingSetSharedBytes)) |
|
| 252 |
+ } |
|
| 253 |
+ if m.ProcessID != 0 {
|
|
| 254 |
+ dAtA[i] = 0x38 |
|
| 255 |
+ i++ |
|
| 256 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(m.ProcessID)) |
|
| 257 |
+ } |
|
| 258 |
+ if m.UserTime_100Ns != 0 {
|
|
| 259 |
+ dAtA[i] = 0x40 |
|
| 260 |
+ i++ |
|
| 261 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(m.UserTime_100Ns)) |
|
| 262 |
+ } |
|
| 263 |
+ if len(m.ExecID) > 0 {
|
|
| 264 |
+ dAtA[i] = 0x4a |
|
| 265 |
+ i++ |
|
| 266 |
+ i = encodeVarintRunhcs(dAtA, i, uint64(len(m.ExecID))) |
|
| 267 |
+ i += copy(dAtA[i:], m.ExecID) |
|
| 268 |
+ } |
|
| 269 |
+ return i, nil |
|
| 270 |
+} |
|
| 271 |
+ |
|
| 272 |
+func encodeVarintRunhcs(dAtA []byte, offset int, v uint64) int {
|
|
| 273 |
+ for v >= 1<<7 {
|
|
| 274 |
+ dAtA[offset] = uint8(v&0x7f | 0x80) |
|
| 275 |
+ v >>= 7 |
|
| 276 |
+ offset++ |
|
| 277 |
+ } |
|
| 278 |
+ dAtA[offset] = uint8(v) |
|
| 279 |
+ return offset + 1 |
|
| 280 |
+} |
|
| 281 |
+func (m *Options) Size() (n int) {
|
|
| 282 |
+ var l int |
|
| 283 |
+ _ = l |
|
| 284 |
+ if m.Debug {
|
|
| 285 |
+ n += 2 |
|
| 286 |
+ } |
|
| 287 |
+ if m.DebugType != 0 {
|
|
| 288 |
+ n += 1 + sovRunhcs(uint64(m.DebugType)) |
|
| 289 |
+ } |
|
| 290 |
+ l = len(m.RegistryRoot) |
|
| 291 |
+ if l > 0 {
|
|
| 292 |
+ n += 1 + l + sovRunhcs(uint64(l)) |
|
| 293 |
+ } |
|
| 294 |
+ l = len(m.SandboxImage) |
|
| 295 |
+ if l > 0 {
|
|
| 296 |
+ n += 1 + l + sovRunhcs(uint64(l)) |
|
| 297 |
+ } |
|
| 298 |
+ l = len(m.SandboxPlatform) |
|
| 299 |
+ if l > 0 {
|
|
| 300 |
+ n += 1 + l + sovRunhcs(uint64(l)) |
|
| 301 |
+ } |
|
| 302 |
+ if m.SandboxIsolation != 0 {
|
|
| 303 |
+ n += 1 + sovRunhcs(uint64(m.SandboxIsolation)) |
|
| 304 |
+ } |
|
| 305 |
+ l = len(m.BootFilesRootPath) |
|
| 306 |
+ if l > 0 {
|
|
| 307 |
+ n += 1 + l + sovRunhcs(uint64(l)) |
|
| 308 |
+ } |
|
| 309 |
+ return n |
|
| 310 |
+} |
|
| 311 |
+ |
|
| 312 |
+func (m *ProcessDetails) Size() (n int) {
|
|
| 313 |
+ var l int |
|
| 314 |
+ _ = l |
|
| 315 |
+ l = len(m.ImageName) |
|
| 316 |
+ if l > 0 {
|
|
| 317 |
+ n += 1 + l + sovRunhcs(uint64(l)) |
|
| 318 |
+ } |
|
| 319 |
+ l = types.SizeOfStdTime(m.CreatedAt) |
|
| 320 |
+ n += 1 + l + sovRunhcs(uint64(l)) |
|
| 321 |
+ if m.KernelTime_100Ns != 0 {
|
|
| 322 |
+ n += 1 + sovRunhcs(uint64(m.KernelTime_100Ns)) |
|
| 323 |
+ } |
|
| 324 |
+ if m.MemoryCommitBytes != 0 {
|
|
| 325 |
+ n += 1 + sovRunhcs(uint64(m.MemoryCommitBytes)) |
|
| 326 |
+ } |
|
| 327 |
+ if m.MemoryWorkingSetPrivateBytes != 0 {
|
|
| 328 |
+ n += 1 + sovRunhcs(uint64(m.MemoryWorkingSetPrivateBytes)) |
|
| 329 |
+ } |
|
| 330 |
+ if m.MemoryWorkingSetSharedBytes != 0 {
|
|
| 331 |
+ n += 1 + sovRunhcs(uint64(m.MemoryWorkingSetSharedBytes)) |
|
| 332 |
+ } |
|
| 333 |
+ if m.ProcessID != 0 {
|
|
| 334 |
+ n += 1 + sovRunhcs(uint64(m.ProcessID)) |
|
| 335 |
+ } |
|
| 336 |
+ if m.UserTime_100Ns != 0 {
|
|
| 337 |
+ n += 1 + sovRunhcs(uint64(m.UserTime_100Ns)) |
|
| 338 |
+ } |
|
| 339 |
+ l = len(m.ExecID) |
|
| 340 |
+ if l > 0 {
|
|
| 341 |
+ n += 1 + l + sovRunhcs(uint64(l)) |
|
| 342 |
+ } |
|
| 343 |
+ return n |
|
| 344 |
+} |
|
| 345 |
+ |
|
| 346 |
+func sovRunhcs(x uint64) (n int) {
|
|
| 347 |
+ for {
|
|
| 348 |
+ n++ |
|
| 349 |
+ x >>= 7 |
|
| 350 |
+ if x == 0 {
|
|
| 351 |
+ break |
|
| 352 |
+ } |
|
| 353 |
+ } |
|
| 354 |
+ return n |
|
| 355 |
+} |
|
| 356 |
+func sozRunhcs(x uint64) (n int) {
|
|
| 357 |
+ return sovRunhcs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
|
| 358 |
+} |
|
| 359 |
+func (this *Options) String() string {
|
|
| 360 |
+ if this == nil {
|
|
| 361 |
+ return "nil" |
|
| 362 |
+ } |
|
| 363 |
+ s := strings.Join([]string{`&Options{`,
|
|
| 364 |
+ `Debug:` + fmt.Sprintf("%v", this.Debug) + `,`,
|
|
| 365 |
+ `DebugType:` + fmt.Sprintf("%v", this.DebugType) + `,`,
|
|
| 366 |
+ `RegistryRoot:` + fmt.Sprintf("%v", this.RegistryRoot) + `,`,
|
|
| 367 |
+ `SandboxImage:` + fmt.Sprintf("%v", this.SandboxImage) + `,`,
|
|
| 368 |
+ `SandboxPlatform:` + fmt.Sprintf("%v", this.SandboxPlatform) + `,`,
|
|
| 369 |
+ `SandboxIsolation:` + fmt.Sprintf("%v", this.SandboxIsolation) + `,`,
|
|
| 370 |
+ `BootFilesRootPath:` + fmt.Sprintf("%v", this.BootFilesRootPath) + `,`,
|
|
| 371 |
+ `}`, |
|
| 372 |
+ }, "") |
|
| 373 |
+ return s |
|
| 374 |
+} |
|
| 375 |
+func (this *ProcessDetails) String() string {
|
|
| 376 |
+ if this == nil {
|
|
| 377 |
+ return "nil" |
|
| 378 |
+ } |
|
| 379 |
+ s := strings.Join([]string{`&ProcessDetails{`,
|
|
| 380 |
+ `ImageName:` + fmt.Sprintf("%v", this.ImageName) + `,`,
|
|
| 381 |
+ `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`, |
|
| 382 |
+ `KernelTime_100Ns:` + fmt.Sprintf("%v", this.KernelTime_100Ns) + `,`,
|
|
| 383 |
+ `MemoryCommitBytes:` + fmt.Sprintf("%v", this.MemoryCommitBytes) + `,`,
|
|
| 384 |
+ `MemoryWorkingSetPrivateBytes:` + fmt.Sprintf("%v", this.MemoryWorkingSetPrivateBytes) + `,`,
|
|
| 385 |
+ `MemoryWorkingSetSharedBytes:` + fmt.Sprintf("%v", this.MemoryWorkingSetSharedBytes) + `,`,
|
|
| 386 |
+ `ProcessID:` + fmt.Sprintf("%v", this.ProcessID) + `,`,
|
|
| 387 |
+ `UserTime_100Ns:` + fmt.Sprintf("%v", this.UserTime_100Ns) + `,`,
|
|
| 388 |
+ `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
|
|
| 389 |
+ `}`, |
|
| 390 |
+ }, "") |
|
| 391 |
+ return s |
|
| 392 |
+} |
|
| 393 |
+func valueToStringRunhcs(v interface{}) string {
|
|
| 394 |
+ rv := reflect.ValueOf(v) |
|
| 395 |
+ if rv.IsNil() {
|
|
| 396 |
+ return "nil" |
|
| 397 |
+ } |
|
| 398 |
+ pv := reflect.Indirect(rv).Interface() |
|
| 399 |
+ return fmt.Sprintf("*%v", pv)
|
|
| 400 |
+} |
|
| 401 |
+func (m *Options) Unmarshal(dAtA []byte) error {
|
|
| 402 |
+ l := len(dAtA) |
|
| 403 |
+ iNdEx := 0 |
|
| 404 |
+ for iNdEx < l {
|
|
| 405 |
+ preIndex := iNdEx |
|
| 406 |
+ var wire uint64 |
|
| 407 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 408 |
+ if shift >= 64 {
|
|
| 409 |
+ return ErrIntOverflowRunhcs |
|
| 410 |
+ } |
|
| 411 |
+ if iNdEx >= l {
|
|
| 412 |
+ return io.ErrUnexpectedEOF |
|
| 413 |
+ } |
|
| 414 |
+ b := dAtA[iNdEx] |
|
| 415 |
+ iNdEx++ |
|
| 416 |
+ wire |= (uint64(b) & 0x7F) << shift |
|
| 417 |
+ if b < 0x80 {
|
|
| 418 |
+ break |
|
| 419 |
+ } |
|
| 420 |
+ } |
|
| 421 |
+ fieldNum := int32(wire >> 3) |
|
| 422 |
+ wireType := int(wire & 0x7) |
|
| 423 |
+ if wireType == 4 {
|
|
| 424 |
+ return fmt.Errorf("proto: Options: wiretype end group for non-group")
|
|
| 425 |
+ } |
|
| 426 |
+ if fieldNum <= 0 {
|
|
| 427 |
+ return fmt.Errorf("proto: Options: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
| 428 |
+ } |
|
| 429 |
+ switch fieldNum {
|
|
| 430 |
+ case 1: |
|
| 431 |
+ if wireType != 0 {
|
|
| 432 |
+ return fmt.Errorf("proto: wrong wireType = %d for field Debug", wireType)
|
|
| 433 |
+ } |
|
| 434 |
+ var v int |
|
| 435 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 436 |
+ if shift >= 64 {
|
|
| 437 |
+ return ErrIntOverflowRunhcs |
|
| 438 |
+ } |
|
| 439 |
+ if iNdEx >= l {
|
|
| 440 |
+ return io.ErrUnexpectedEOF |
|
| 441 |
+ } |
|
| 442 |
+ b := dAtA[iNdEx] |
|
| 443 |
+ iNdEx++ |
|
| 444 |
+ v |= (int(b) & 0x7F) << shift |
|
| 445 |
+ if b < 0x80 {
|
|
| 446 |
+ break |
|
| 447 |
+ } |
|
| 448 |
+ } |
|
| 449 |
+ m.Debug = bool(v != 0) |
|
| 450 |
+ case 2: |
|
| 451 |
+ if wireType != 0 {
|
|
| 452 |
+ return fmt.Errorf("proto: wrong wireType = %d for field DebugType", wireType)
|
|
| 453 |
+ } |
|
| 454 |
+ m.DebugType = 0 |
|
| 455 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 456 |
+ if shift >= 64 {
|
|
| 457 |
+ return ErrIntOverflowRunhcs |
|
| 458 |
+ } |
|
| 459 |
+ if iNdEx >= l {
|
|
| 460 |
+ return io.ErrUnexpectedEOF |
|
| 461 |
+ } |
|
| 462 |
+ b := dAtA[iNdEx] |
|
| 463 |
+ iNdEx++ |
|
| 464 |
+ m.DebugType |= (Options_DebugType(b) & 0x7F) << shift |
|
| 465 |
+ if b < 0x80 {
|
|
| 466 |
+ break |
|
| 467 |
+ } |
|
| 468 |
+ } |
|
| 469 |
+ case 3: |
|
| 470 |
+ if wireType != 2 {
|
|
| 471 |
+ return fmt.Errorf("proto: wrong wireType = %d for field RegistryRoot", wireType)
|
|
| 472 |
+ } |
|
| 473 |
+ var stringLen uint64 |
|
| 474 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 475 |
+ if shift >= 64 {
|
|
| 476 |
+ return ErrIntOverflowRunhcs |
|
| 477 |
+ } |
|
| 478 |
+ if iNdEx >= l {
|
|
| 479 |
+ return io.ErrUnexpectedEOF |
|
| 480 |
+ } |
|
| 481 |
+ b := dAtA[iNdEx] |
|
| 482 |
+ iNdEx++ |
|
| 483 |
+ stringLen |= (uint64(b) & 0x7F) << shift |
|
| 484 |
+ if b < 0x80 {
|
|
| 485 |
+ break |
|
| 486 |
+ } |
|
| 487 |
+ } |
|
| 488 |
+ intStringLen := int(stringLen) |
|
| 489 |
+ if intStringLen < 0 {
|
|
| 490 |
+ return ErrInvalidLengthRunhcs |
|
| 491 |
+ } |
|
| 492 |
+ postIndex := iNdEx + intStringLen |
|
| 493 |
+ if postIndex > l {
|
|
| 494 |
+ return io.ErrUnexpectedEOF |
|
| 495 |
+ } |
|
| 496 |
+ m.RegistryRoot = string(dAtA[iNdEx:postIndex]) |
|
| 497 |
+ iNdEx = postIndex |
|
| 498 |
+ case 4: |
|
| 499 |
+ if wireType != 2 {
|
|
| 500 |
+ return fmt.Errorf("proto: wrong wireType = %d for field SandboxImage", wireType)
|
|
| 501 |
+ } |
|
| 502 |
+ var stringLen uint64 |
|
| 503 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 504 |
+ if shift >= 64 {
|
|
| 505 |
+ return ErrIntOverflowRunhcs |
|
| 506 |
+ } |
|
| 507 |
+ if iNdEx >= l {
|
|
| 508 |
+ return io.ErrUnexpectedEOF |
|
| 509 |
+ } |
|
| 510 |
+ b := dAtA[iNdEx] |
|
| 511 |
+ iNdEx++ |
|
| 512 |
+ stringLen |= (uint64(b) & 0x7F) << shift |
|
| 513 |
+ if b < 0x80 {
|
|
| 514 |
+ break |
|
| 515 |
+ } |
|
| 516 |
+ } |
|
| 517 |
+ intStringLen := int(stringLen) |
|
| 518 |
+ if intStringLen < 0 {
|
|
| 519 |
+ return ErrInvalidLengthRunhcs |
|
| 520 |
+ } |
|
| 521 |
+ postIndex := iNdEx + intStringLen |
|
| 522 |
+ if postIndex > l {
|
|
| 523 |
+ return io.ErrUnexpectedEOF |
|
| 524 |
+ } |
|
| 525 |
+ m.SandboxImage = string(dAtA[iNdEx:postIndex]) |
|
| 526 |
+ iNdEx = postIndex |
|
| 527 |
+ case 5: |
|
| 528 |
+ if wireType != 2 {
|
|
| 529 |
+ return fmt.Errorf("proto: wrong wireType = %d for field SandboxPlatform", wireType)
|
|
| 530 |
+ } |
|
| 531 |
+ var stringLen uint64 |
|
| 532 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 533 |
+ if shift >= 64 {
|
|
| 534 |
+ return ErrIntOverflowRunhcs |
|
| 535 |
+ } |
|
| 536 |
+ if iNdEx >= l {
|
|
| 537 |
+ return io.ErrUnexpectedEOF |
|
| 538 |
+ } |
|
| 539 |
+ b := dAtA[iNdEx] |
|
| 540 |
+ iNdEx++ |
|
| 541 |
+ stringLen |= (uint64(b) & 0x7F) << shift |
|
| 542 |
+ if b < 0x80 {
|
|
| 543 |
+ break |
|
| 544 |
+ } |
|
| 545 |
+ } |
|
| 546 |
+ intStringLen := int(stringLen) |
|
| 547 |
+ if intStringLen < 0 {
|
|
| 548 |
+ return ErrInvalidLengthRunhcs |
|
| 549 |
+ } |
|
| 550 |
+ postIndex := iNdEx + intStringLen |
|
| 551 |
+ if postIndex > l {
|
|
| 552 |
+ return io.ErrUnexpectedEOF |
|
| 553 |
+ } |
|
| 554 |
+ m.SandboxPlatform = string(dAtA[iNdEx:postIndex]) |
|
| 555 |
+ iNdEx = postIndex |
|
| 556 |
+ case 6: |
|
| 557 |
+ if wireType != 0 {
|
|
| 558 |
+ return fmt.Errorf("proto: wrong wireType = %d for field SandboxIsolation", wireType)
|
|
| 559 |
+ } |
|
| 560 |
+ m.SandboxIsolation = 0 |
|
| 561 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 562 |
+ if shift >= 64 {
|
|
| 563 |
+ return ErrIntOverflowRunhcs |
|
| 564 |
+ } |
|
| 565 |
+ if iNdEx >= l {
|
|
| 566 |
+ return io.ErrUnexpectedEOF |
|
| 567 |
+ } |
|
| 568 |
+ b := dAtA[iNdEx] |
|
| 569 |
+ iNdEx++ |
|
| 570 |
+ m.SandboxIsolation |= (Options_SandboxIsolation(b) & 0x7F) << shift |
|
| 571 |
+ if b < 0x80 {
|
|
| 572 |
+ break |
|
| 573 |
+ } |
|
| 574 |
+ } |
|
| 575 |
+ case 7: |
|
| 576 |
+ if wireType != 2 {
|
|
| 577 |
+ return fmt.Errorf("proto: wrong wireType = %d for field BootFilesRootPath", wireType)
|
|
| 578 |
+ } |
|
| 579 |
+ var stringLen uint64 |
|
| 580 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 581 |
+ if shift >= 64 {
|
|
| 582 |
+ return ErrIntOverflowRunhcs |
|
| 583 |
+ } |
|
| 584 |
+ if iNdEx >= l {
|
|
| 585 |
+ return io.ErrUnexpectedEOF |
|
| 586 |
+ } |
|
| 587 |
+ b := dAtA[iNdEx] |
|
| 588 |
+ iNdEx++ |
|
| 589 |
+ stringLen |= (uint64(b) & 0x7F) << shift |
|
| 590 |
+ if b < 0x80 {
|
|
| 591 |
+ break |
|
| 592 |
+ } |
|
| 593 |
+ } |
|
| 594 |
+ intStringLen := int(stringLen) |
|
| 595 |
+ if intStringLen < 0 {
|
|
| 596 |
+ return ErrInvalidLengthRunhcs |
|
| 597 |
+ } |
|
| 598 |
+ postIndex := iNdEx + intStringLen |
|
| 599 |
+ if postIndex > l {
|
|
| 600 |
+ return io.ErrUnexpectedEOF |
|
| 601 |
+ } |
|
| 602 |
+ m.BootFilesRootPath = string(dAtA[iNdEx:postIndex]) |
|
| 603 |
+ iNdEx = postIndex |
|
| 604 |
+ default: |
|
| 605 |
+ iNdEx = preIndex |
|
| 606 |
+ skippy, err := skipRunhcs(dAtA[iNdEx:]) |
|
| 607 |
+ if err != nil {
|
|
| 608 |
+ return err |
|
| 609 |
+ } |
|
| 610 |
+ if skippy < 0 {
|
|
| 611 |
+ return ErrInvalidLengthRunhcs |
|
| 612 |
+ } |
|
| 613 |
+ if (iNdEx + skippy) > l {
|
|
| 614 |
+ return io.ErrUnexpectedEOF |
|
| 615 |
+ } |
|
| 616 |
+ iNdEx += skippy |
|
| 617 |
+ } |
|
| 618 |
+ } |
|
| 619 |
+ |
|
| 620 |
+ if iNdEx > l {
|
|
| 621 |
+ return io.ErrUnexpectedEOF |
|
| 622 |
+ } |
|
| 623 |
+ return nil |
|
| 624 |
+} |
|
| 625 |
+func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
|
|
| 626 |
+ l := len(dAtA) |
|
| 627 |
+ iNdEx := 0 |
|
| 628 |
+ for iNdEx < l {
|
|
| 629 |
+ preIndex := iNdEx |
|
| 630 |
+ var wire uint64 |
|
| 631 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 632 |
+ if shift >= 64 {
|
|
| 633 |
+ return ErrIntOverflowRunhcs |
|
| 634 |
+ } |
|
| 635 |
+ if iNdEx >= l {
|
|
| 636 |
+ return io.ErrUnexpectedEOF |
|
| 637 |
+ } |
|
| 638 |
+ b := dAtA[iNdEx] |
|
| 639 |
+ iNdEx++ |
|
| 640 |
+ wire |= (uint64(b) & 0x7F) << shift |
|
| 641 |
+ if b < 0x80 {
|
|
| 642 |
+ break |
|
| 643 |
+ } |
|
| 644 |
+ } |
|
| 645 |
+ fieldNum := int32(wire >> 3) |
|
| 646 |
+ wireType := int(wire & 0x7) |
|
| 647 |
+ if wireType == 4 {
|
|
| 648 |
+ return fmt.Errorf("proto: ProcessDetails: wiretype end group for non-group")
|
|
| 649 |
+ } |
|
| 650 |
+ if fieldNum <= 0 {
|
|
| 651 |
+ return fmt.Errorf("proto: ProcessDetails: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
| 652 |
+ } |
|
| 653 |
+ switch fieldNum {
|
|
| 654 |
+ case 1: |
|
| 655 |
+ if wireType != 2 {
|
|
| 656 |
+ return fmt.Errorf("proto: wrong wireType = %d for field ImageName", wireType)
|
|
| 657 |
+ } |
|
| 658 |
+ var stringLen uint64 |
|
| 659 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 660 |
+ if shift >= 64 {
|
|
| 661 |
+ return ErrIntOverflowRunhcs |
|
| 662 |
+ } |
|
| 663 |
+ if iNdEx >= l {
|
|
| 664 |
+ return io.ErrUnexpectedEOF |
|
| 665 |
+ } |
|
| 666 |
+ b := dAtA[iNdEx] |
|
| 667 |
+ iNdEx++ |
|
| 668 |
+ stringLen |= (uint64(b) & 0x7F) << shift |
|
| 669 |
+ if b < 0x80 {
|
|
| 670 |
+ break |
|
| 671 |
+ } |
|
| 672 |
+ } |
|
| 673 |
+ intStringLen := int(stringLen) |
|
| 674 |
+ if intStringLen < 0 {
|
|
| 675 |
+ return ErrInvalidLengthRunhcs |
|
| 676 |
+ } |
|
| 677 |
+ postIndex := iNdEx + intStringLen |
|
| 678 |
+ if postIndex > l {
|
|
| 679 |
+ return io.ErrUnexpectedEOF |
|
| 680 |
+ } |
|
| 681 |
+ m.ImageName = string(dAtA[iNdEx:postIndex]) |
|
| 682 |
+ iNdEx = postIndex |
|
| 683 |
+ case 2: |
|
| 684 |
+ if wireType != 2 {
|
|
| 685 |
+ return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
|
|
| 686 |
+ } |
|
| 687 |
+ var msglen int |
|
| 688 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 689 |
+ if shift >= 64 {
|
|
| 690 |
+ return ErrIntOverflowRunhcs |
|
| 691 |
+ } |
|
| 692 |
+ if iNdEx >= l {
|
|
| 693 |
+ return io.ErrUnexpectedEOF |
|
| 694 |
+ } |
|
| 695 |
+ b := dAtA[iNdEx] |
|
| 696 |
+ iNdEx++ |
|
| 697 |
+ msglen |= (int(b) & 0x7F) << shift |
|
| 698 |
+ if b < 0x80 {
|
|
| 699 |
+ break |
|
| 700 |
+ } |
|
| 701 |
+ } |
|
| 702 |
+ if msglen < 0 {
|
|
| 703 |
+ return ErrInvalidLengthRunhcs |
|
| 704 |
+ } |
|
| 705 |
+ postIndex := iNdEx + msglen |
|
| 706 |
+ if postIndex > l {
|
|
| 707 |
+ return io.ErrUnexpectedEOF |
|
| 708 |
+ } |
|
| 709 |
+ if err := types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
| 710 |
+ return err |
|
| 711 |
+ } |
|
| 712 |
+ iNdEx = postIndex |
|
| 713 |
+ case 3: |
|
| 714 |
+ if wireType != 0 {
|
|
| 715 |
+ return fmt.Errorf("proto: wrong wireType = %d for field KernelTime_100Ns", wireType)
|
|
| 716 |
+ } |
|
| 717 |
+ m.KernelTime_100Ns = 0 |
|
| 718 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 719 |
+ if shift >= 64 {
|
|
| 720 |
+ return ErrIntOverflowRunhcs |
|
| 721 |
+ } |
|
| 722 |
+ if iNdEx >= l {
|
|
| 723 |
+ return io.ErrUnexpectedEOF |
|
| 724 |
+ } |
|
| 725 |
+ b := dAtA[iNdEx] |
|
| 726 |
+ iNdEx++ |
|
| 727 |
+ m.KernelTime_100Ns |= (uint64(b) & 0x7F) << shift |
|
| 728 |
+ if b < 0x80 {
|
|
| 729 |
+ break |
|
| 730 |
+ } |
|
| 731 |
+ } |
|
| 732 |
+ case 4: |
|
| 733 |
+ if wireType != 0 {
|
|
| 734 |
+ return fmt.Errorf("proto: wrong wireType = %d for field MemoryCommitBytes", wireType)
|
|
| 735 |
+ } |
|
| 736 |
+ m.MemoryCommitBytes = 0 |
|
| 737 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 738 |
+ if shift >= 64 {
|
|
| 739 |
+ return ErrIntOverflowRunhcs |
|
| 740 |
+ } |
|
| 741 |
+ if iNdEx >= l {
|
|
| 742 |
+ return io.ErrUnexpectedEOF |
|
| 743 |
+ } |
|
| 744 |
+ b := dAtA[iNdEx] |
|
| 745 |
+ iNdEx++ |
|
| 746 |
+ m.MemoryCommitBytes |= (uint64(b) & 0x7F) << shift |
|
| 747 |
+ if b < 0x80 {
|
|
| 748 |
+ break |
|
| 749 |
+ } |
|
| 750 |
+ } |
|
| 751 |
+ case 5: |
|
| 752 |
+ if wireType != 0 {
|
|
| 753 |
+ return fmt.Errorf("proto: wrong wireType = %d for field MemoryWorkingSetPrivateBytes", wireType)
|
|
| 754 |
+ } |
|
| 755 |
+ m.MemoryWorkingSetPrivateBytes = 0 |
|
| 756 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 757 |
+ if shift >= 64 {
|
|
| 758 |
+ return ErrIntOverflowRunhcs |
|
| 759 |
+ } |
|
| 760 |
+ if iNdEx >= l {
|
|
| 761 |
+ return io.ErrUnexpectedEOF |
|
| 762 |
+ } |
|
| 763 |
+ b := dAtA[iNdEx] |
|
| 764 |
+ iNdEx++ |
|
| 765 |
+ m.MemoryWorkingSetPrivateBytes |= (uint64(b) & 0x7F) << shift |
|
| 766 |
+ if b < 0x80 {
|
|
| 767 |
+ break |
|
| 768 |
+ } |
|
| 769 |
+ } |
|
| 770 |
+ case 6: |
|
| 771 |
+ if wireType != 0 {
|
|
| 772 |
+ return fmt.Errorf("proto: wrong wireType = %d for field MemoryWorkingSetSharedBytes", wireType)
|
|
| 773 |
+ } |
|
| 774 |
+ m.MemoryWorkingSetSharedBytes = 0 |
|
| 775 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 776 |
+ if shift >= 64 {
|
|
| 777 |
+ return ErrIntOverflowRunhcs |
|
| 778 |
+ } |
|
| 779 |
+ if iNdEx >= l {
|
|
| 780 |
+ return io.ErrUnexpectedEOF |
|
| 781 |
+ } |
|
| 782 |
+ b := dAtA[iNdEx] |
|
| 783 |
+ iNdEx++ |
|
| 784 |
+ m.MemoryWorkingSetSharedBytes |= (uint64(b) & 0x7F) << shift |
|
| 785 |
+ if b < 0x80 {
|
|
| 786 |
+ break |
|
| 787 |
+ } |
|
| 788 |
+ } |
|
| 789 |
+ case 7: |
|
| 790 |
+ if wireType != 0 {
|
|
| 791 |
+ return fmt.Errorf("proto: wrong wireType = %d for field ProcessID", wireType)
|
|
| 792 |
+ } |
|
| 793 |
+ m.ProcessID = 0 |
|
| 794 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 795 |
+ if shift >= 64 {
|
|
| 796 |
+ return ErrIntOverflowRunhcs |
|
| 797 |
+ } |
|
| 798 |
+ if iNdEx >= l {
|
|
| 799 |
+ return io.ErrUnexpectedEOF |
|
| 800 |
+ } |
|
| 801 |
+ b := dAtA[iNdEx] |
|
| 802 |
+ iNdEx++ |
|
| 803 |
+ m.ProcessID |= (uint32(b) & 0x7F) << shift |
|
| 804 |
+ if b < 0x80 {
|
|
| 805 |
+ break |
|
| 806 |
+ } |
|
| 807 |
+ } |
|
| 808 |
+ case 8: |
|
| 809 |
+ if wireType != 0 {
|
|
| 810 |
+ return fmt.Errorf("proto: wrong wireType = %d for field UserTime_100Ns", wireType)
|
|
| 811 |
+ } |
|
| 812 |
+ m.UserTime_100Ns = 0 |
|
| 813 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 814 |
+ if shift >= 64 {
|
|
| 815 |
+ return ErrIntOverflowRunhcs |
|
| 816 |
+ } |
|
| 817 |
+ if iNdEx >= l {
|
|
| 818 |
+ return io.ErrUnexpectedEOF |
|
| 819 |
+ } |
|
| 820 |
+ b := dAtA[iNdEx] |
|
| 821 |
+ iNdEx++ |
|
| 822 |
+ m.UserTime_100Ns |= (uint64(b) & 0x7F) << shift |
|
| 823 |
+ if b < 0x80 {
|
|
| 824 |
+ break |
|
| 825 |
+ } |
|
| 826 |
+ } |
|
| 827 |
+ case 9: |
|
| 828 |
+ if wireType != 2 {
|
|
| 829 |
+ return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType)
|
|
| 830 |
+ } |
|
| 831 |
+ var stringLen uint64 |
|
| 832 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 833 |
+ if shift >= 64 {
|
|
| 834 |
+ return ErrIntOverflowRunhcs |
|
| 835 |
+ } |
|
| 836 |
+ if iNdEx >= l {
|
|
| 837 |
+ return io.ErrUnexpectedEOF |
|
| 838 |
+ } |
|
| 839 |
+ b := dAtA[iNdEx] |
|
| 840 |
+ iNdEx++ |
|
| 841 |
+ stringLen |= (uint64(b) & 0x7F) << shift |
|
| 842 |
+ if b < 0x80 {
|
|
| 843 |
+ break |
|
| 844 |
+ } |
|
| 845 |
+ } |
|
| 846 |
+ intStringLen := int(stringLen) |
|
| 847 |
+ if intStringLen < 0 {
|
|
| 848 |
+ return ErrInvalidLengthRunhcs |
|
| 849 |
+ } |
|
| 850 |
+ postIndex := iNdEx + intStringLen |
|
| 851 |
+ if postIndex > l {
|
|
| 852 |
+ return io.ErrUnexpectedEOF |
|
| 853 |
+ } |
|
| 854 |
+ m.ExecID = string(dAtA[iNdEx:postIndex]) |
|
| 855 |
+ iNdEx = postIndex |
|
| 856 |
+ default: |
|
| 857 |
+ iNdEx = preIndex |
|
| 858 |
+ skippy, err := skipRunhcs(dAtA[iNdEx:]) |
|
| 859 |
+ if err != nil {
|
|
| 860 |
+ return err |
|
| 861 |
+ } |
|
| 862 |
+ if skippy < 0 {
|
|
| 863 |
+ return ErrInvalidLengthRunhcs |
|
| 864 |
+ } |
|
| 865 |
+ if (iNdEx + skippy) > l {
|
|
| 866 |
+ return io.ErrUnexpectedEOF |
|
| 867 |
+ } |
|
| 868 |
+ iNdEx += skippy |
|
| 869 |
+ } |
|
| 870 |
+ } |
|
| 871 |
+ |
|
| 872 |
+ if iNdEx > l {
|
|
| 873 |
+ return io.ErrUnexpectedEOF |
|
| 874 |
+ } |
|
| 875 |
+ return nil |
|
| 876 |
+} |
|
| 877 |
+func skipRunhcs(dAtA []byte) (n int, err error) {
|
|
| 878 |
+ l := len(dAtA) |
|
| 879 |
+ iNdEx := 0 |
|
| 880 |
+ for iNdEx < l {
|
|
| 881 |
+ var wire uint64 |
|
| 882 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 883 |
+ if shift >= 64 {
|
|
| 884 |
+ return 0, ErrIntOverflowRunhcs |
|
| 885 |
+ } |
|
| 886 |
+ if iNdEx >= l {
|
|
| 887 |
+ return 0, io.ErrUnexpectedEOF |
|
| 888 |
+ } |
|
| 889 |
+ b := dAtA[iNdEx] |
|
| 890 |
+ iNdEx++ |
|
| 891 |
+ wire |= (uint64(b) & 0x7F) << shift |
|
| 892 |
+ if b < 0x80 {
|
|
| 893 |
+ break |
|
| 894 |
+ } |
|
| 895 |
+ } |
|
| 896 |
+ wireType := int(wire & 0x7) |
|
| 897 |
+ switch wireType {
|
|
| 898 |
+ case 0: |
|
| 899 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 900 |
+ if shift >= 64 {
|
|
| 901 |
+ return 0, ErrIntOverflowRunhcs |
|
| 902 |
+ } |
|
| 903 |
+ if iNdEx >= l {
|
|
| 904 |
+ return 0, io.ErrUnexpectedEOF |
|
| 905 |
+ } |
|
| 906 |
+ iNdEx++ |
|
| 907 |
+ if dAtA[iNdEx-1] < 0x80 {
|
|
| 908 |
+ break |
|
| 909 |
+ } |
|
| 910 |
+ } |
|
| 911 |
+ return iNdEx, nil |
|
| 912 |
+ case 1: |
|
| 913 |
+ iNdEx += 8 |
|
| 914 |
+ return iNdEx, nil |
|
| 915 |
+ case 2: |
|
| 916 |
+ var length int |
|
| 917 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 918 |
+ if shift >= 64 {
|
|
| 919 |
+ return 0, ErrIntOverflowRunhcs |
|
| 920 |
+ } |
|
| 921 |
+ if iNdEx >= l {
|
|
| 922 |
+ return 0, io.ErrUnexpectedEOF |
|
| 923 |
+ } |
|
| 924 |
+ b := dAtA[iNdEx] |
|
| 925 |
+ iNdEx++ |
|
| 926 |
+ length |= (int(b) & 0x7F) << shift |
|
| 927 |
+ if b < 0x80 {
|
|
| 928 |
+ break |
|
| 929 |
+ } |
|
| 930 |
+ } |
|
| 931 |
+ iNdEx += length |
|
| 932 |
+ if length < 0 {
|
|
| 933 |
+ return 0, ErrInvalidLengthRunhcs |
|
| 934 |
+ } |
|
| 935 |
+ return iNdEx, nil |
|
| 936 |
+ case 3: |
|
| 937 |
+ for {
|
|
| 938 |
+ var innerWire uint64 |
|
| 939 |
+ var start int = iNdEx |
|
| 940 |
+ for shift := uint(0); ; shift += 7 {
|
|
| 941 |
+ if shift >= 64 {
|
|
| 942 |
+ return 0, ErrIntOverflowRunhcs |
|
| 943 |
+ } |
|
| 944 |
+ if iNdEx >= l {
|
|
| 945 |
+ return 0, io.ErrUnexpectedEOF |
|
| 946 |
+ } |
|
| 947 |
+ b := dAtA[iNdEx] |
|
| 948 |
+ iNdEx++ |
|
| 949 |
+ innerWire |= (uint64(b) & 0x7F) << shift |
|
| 950 |
+ if b < 0x80 {
|
|
| 951 |
+ break |
|
| 952 |
+ } |
|
| 953 |
+ } |
|
| 954 |
+ innerWireType := int(innerWire & 0x7) |
|
| 955 |
+ if innerWireType == 4 {
|
|
| 956 |
+ break |
|
| 957 |
+ } |
|
| 958 |
+ next, err := skipRunhcs(dAtA[start:]) |
|
| 959 |
+ if err != nil {
|
|
| 960 |
+ return 0, err |
|
| 961 |
+ } |
|
| 962 |
+ iNdEx = start + next |
|
| 963 |
+ } |
|
| 964 |
+ return iNdEx, nil |
|
| 965 |
+ case 4: |
|
| 966 |
+ return iNdEx, nil |
|
| 967 |
+ case 5: |
|
| 968 |
+ iNdEx += 4 |
|
| 969 |
+ return iNdEx, nil |
|
| 970 |
+ default: |
|
| 971 |
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
| 972 |
+ } |
|
| 973 |
+ } |
|
| 974 |
+ panic("unreachable")
|
|
| 975 |
+} |
|
| 976 |
+ |
|
| 977 |
+var ( |
|
| 978 |
+ ErrInvalidLengthRunhcs = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
| 979 |
+ ErrIntOverflowRunhcs = fmt.Errorf("proto: integer overflow")
|
|
| 980 |
+) |
|
| 981 |
+ |
|
| 982 |
+func init() {
|
|
| 983 |
+ proto.RegisterFile("github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto", fileDescriptorRunhcs)
|
|
| 984 |
+} |
|
| 985 |
+ |
|
| 986 |
+var fileDescriptorRunhcs = []byte{
|
|
| 987 |
+ // 704 bytes of a gzipped FileDescriptorProto |
|
| 988 |
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0xda, 0x48, |
|
| 989 |
+ 0x18, 0xc6, 0xe1, 0xd3, 0x6f, 0x96, 0xc4, 0x99, 0xe5, 0x80, 0xb2, 0xbb, 0x80, 0xc8, 0x21, 0x89, |
|
| 990 |
+ 0x76, 0x63, 0x43, 0xf6, 0xd8, 0x53, 0x09, 0xa0, 0xba, 0x6a, 0x83, 0x65, 0xa2, 0xa6, 0x1f, 0x07, |
|
| 991 |
+ 0xcb, 0xd8, 0x83, 0xb1, 0x82, 0x3d, 0xd6, 0xcc, 0x90, 0x86, 0x5b, 0x7f, 0x42, 0x7f, 0x55, 0x95, |
|
| 992 |
+ 0x63, 0x8f, 0x95, 0x2a, 0xa5, 0x0d, 0xbf, 0xa4, 0x9a, 0xb1, 0x49, 0xd4, 0x28, 0xea, 0xa5, 0x27, |
|
| 993 |
+ 0xc6, 0xcf, 0xf3, 0xbc, 0xcf, 0xfb, 0x29, 0x60, 0x14, 0x84, 0x7c, 0xb6, 0x98, 0xe8, 0x1e, 0x89, |
|
| 994 |
+ 0x8c, 0x97, 0xa1, 0x47, 0x09, 0x23, 0x53, 0x6e, 0xcc, 0x3c, 0xc6, 0x66, 0x61, 0x64, 0x78, 0x91, |
|
| 995 |
+ 0x6f, 0x78, 0x24, 0xe6, 0x6e, 0x18, 0x63, 0xea, 0x1f, 0x09, 0xec, 0x88, 0x2e, 0xe2, 0x99, 0xc7, |
|
| 996 |
+ 0x8e, 0x2e, 0xbb, 0x06, 0x49, 0x78, 0x48, 0x62, 0x66, 0xa4, 0x88, 0x9e, 0x50, 0xc2, 0x09, 0xaa, |
|
| 997 |
+ 0xdd, 0xeb, 0xf5, 0x8c, 0xb8, 0xec, 0xee, 0xd6, 0x02, 0x12, 0x10, 0x29, 0x30, 0xc4, 0x2b, 0xd5, |
|
| 998 |
+ 0xee, 0x36, 0x03, 0x42, 0x82, 0x39, 0x36, 0xe4, 0xd7, 0x64, 0x31, 0x35, 0x78, 0x18, 0x61, 0xc6, |
|
| 999 |
+ 0xdd, 0x28, 0x49, 0x05, 0xed, 0x4f, 0x79, 0x28, 0x8f, 0xd2, 0x2c, 0xa8, 0x06, 0x45, 0x1f, 0x4f, |
|
| 1000 |
+ 0x16, 0x41, 0x5d, 0x69, 0x29, 0x07, 0x15, 0x3b, 0xfd, 0x40, 0x43, 0x00, 0xf9, 0x70, 0xf8, 0x32, |
|
| 1001 |
+ 0xc1, 0xf5, 0x8d, 0x96, 0x72, 0xb0, 0x75, 0xbc, 0xaf, 0x3f, 0x56, 0x83, 0x9e, 0x19, 0xe9, 0x7d, |
|
| 1002 |
+ 0xa1, 0x3f, 0x5b, 0x26, 0xd8, 0x56, 0xfd, 0xf5, 0x13, 0xed, 0x41, 0x95, 0xe2, 0x20, 0x64, 0x9c, |
|
| 1003 |
+ 0x2e, 0x1d, 0x4a, 0x08, 0xaf, 0xe7, 0x5b, 0xca, 0x81, 0x6a, 0xff, 0xb1, 0x06, 0x6d, 0x42, 0xb8, |
|
| 1004 |
+ 0x10, 0x31, 0x37, 0xf6, 0x27, 0xe4, 0xca, 0x09, 0x23, 0x37, 0xc0, 0xf5, 0x42, 0x2a, 0xca, 0x40, |
|
| 1005 |
+ 0x53, 0x60, 0xe8, 0x10, 0xb4, 0xb5, 0x28, 0x99, 0xbb, 0x7c, 0x4a, 0x68, 0x54, 0x2f, 0x4a, 0xdd, |
|
| 1006 |
+ 0x76, 0x86, 0x5b, 0x19, 0x8c, 0xde, 0xc1, 0xce, 0x9d, 0x1f, 0x23, 0x73, 0x57, 0xd4, 0x57, 0x2f, |
|
| 1007 |
+ 0xc9, 0x1e, 0xf4, 0x5f, 0xf7, 0x30, 0xce, 0x32, 0xae, 0xa3, 0xec, 0x75, 0xce, 0x3b, 0x04, 0x19, |
|
| 1008 |
+ 0x50, 0x9b, 0x10, 0xc2, 0x9d, 0x69, 0x38, 0xc7, 0x4c, 0xf6, 0xe4, 0x24, 0x2e, 0x9f, 0xd5, 0xcb, |
|
| 1009 |
+ 0xb2, 0x96, 0x1d, 0xc1, 0x0d, 0x05, 0x25, 0x3a, 0xb3, 0x5c, 0x3e, 0x6b, 0x1f, 0x82, 0x7a, 0x37, |
|
| 1010 |
+ 0x1a, 0xa4, 0x42, 0xf1, 0xd4, 0x32, 0xad, 0x81, 0x96, 0x43, 0x15, 0x28, 0x0c, 0xcd, 0x17, 0x03, |
|
| 1011 |
+ 0x4d, 0x41, 0x65, 0xc8, 0x0f, 0xce, 0xce, 0xb5, 0x8d, 0xb6, 0x01, 0xda, 0xc3, 0x0a, 0xd0, 0x26, |
|
| 1012 |
+ 0x94, 0x2d, 0x7b, 0x74, 0x32, 0x18, 0x8f, 0xb5, 0x1c, 0xda, 0x02, 0x78, 0xf6, 0xc6, 0x1a, 0xd8, |
|
| 1013 |
+ 0xaf, 0xcc, 0xf1, 0xc8, 0xd6, 0x94, 0xf6, 0xd7, 0x3c, 0x6c, 0x59, 0x94, 0x78, 0x98, 0xb1, 0x3e, |
|
| 1014 |
+ 0xe6, 0x6e, 0x38, 0x67, 0xe8, 0x1f, 0x00, 0x39, 0x44, 0x27, 0x76, 0x23, 0x2c, 0x97, 0xaa, 0xda, |
|
| 1015 |
+ 0xaa, 0x44, 0x4e, 0xdd, 0x08, 0xa3, 0x13, 0x00, 0x8f, 0x62, 0x97, 0x63, 0xdf, 0x71, 0xb9, 0x5c, |
|
| 1016 |
+ 0xec, 0xe6, 0xf1, 0xae, 0x9e, 0x1e, 0x8c, 0xbe, 0x3e, 0x18, 0xfd, 0x6c, 0x7d, 0x30, 0xbd, 0xca, |
|
| 1017 |
+ 0xf5, 0x4d, 0x33, 0xf7, 0xf1, 0x5b, 0x53, 0xb1, 0xd5, 0x2c, 0xee, 0x29, 0x47, 0xff, 0x02, 0xba, |
|
| 1018 |
+ 0xc0, 0x34, 0xc6, 0x73, 0x47, 0x5c, 0x96, 0xd3, 0xed, 0x74, 0x9c, 0x98, 0xc9, 0xd5, 0x16, 0xec, |
|
| 1019 |
+ 0xed, 0x94, 0x11, 0x0e, 0xdd, 0x4e, 0xe7, 0x94, 0x21, 0x1d, 0xfe, 0x8c, 0x70, 0x44, 0xe8, 0xd2, |
|
| 1020 |
+ 0xf1, 0x48, 0x14, 0x85, 0xdc, 0x99, 0x2c, 0x39, 0x66, 0x72, 0xc7, 0x05, 0x7b, 0x27, 0xa5, 0x4e, |
|
| 1021 |
+ 0x24, 0xd3, 0x13, 0x04, 0x1a, 0x42, 0x2b, 0xd3, 0xbf, 0x27, 0xf4, 0x22, 0x8c, 0x03, 0x87, 0x61, |
|
| 1022 |
+ 0xee, 0x24, 0x34, 0xbc, 0x74, 0x39, 0xce, 0x82, 0x8b, 0x32, 0xf8, 0xef, 0x54, 0x77, 0x9e, 0xca, |
|
| 1023 |
+ 0xc6, 0x98, 0x5b, 0xa9, 0x28, 0xf5, 0xe9, 0x43, 0xf3, 0x11, 0x1f, 0x36, 0x73, 0x29, 0xf6, 0x33, |
|
| 1024 |
+ 0x9b, 0x92, 0xb4, 0xf9, 0xeb, 0xa1, 0xcd, 0x58, 0x6a, 0x52, 0x97, 0xff, 0x00, 0x92, 0x74, 0xc0, |
|
| 1025 |
+ 0x4e, 0xe8, 0xcb, 0x25, 0x57, 0x7b, 0xd5, 0xd5, 0x4d, 0x53, 0xcd, 0xc6, 0x6e, 0xf6, 0x6d, 0x35, |
|
| 1026 |
+ 0x13, 0x98, 0x3e, 0xda, 0x07, 0x6d, 0xc1, 0x30, 0xfd, 0x69, 0x2c, 0x15, 0x99, 0xa4, 0x2a, 0xf0, |
|
| 1027 |
+ 0xfb, 0xa1, 0xec, 0x41, 0x19, 0x5f, 0x61, 0x4f, 0x78, 0xaa, 0x62, 0x45, 0x3d, 0x58, 0xdd, 0x34, |
|
| 1028 |
+ 0x4b, 0x83, 0x2b, 0xec, 0x99, 0x7d, 0xbb, 0x24, 0x28, 0xd3, 0xef, 0xf9, 0xd7, 0xb7, 0x8d, 0xdc, |
|
| 1029 |
+ 0x97, 0xdb, 0x46, 0xee, 0xc3, 0xaa, 0xa1, 0x5c, 0xaf, 0x1a, 0xca, 0xe7, 0x55, 0x43, 0xf9, 0xbe, |
|
| 1030 |
+ 0x6a, 0x28, 0x6f, 0x9f, 0xff, 0xfe, 0xdf, 0xcb, 0x93, 0xec, 0xf7, 0x75, 0x6e, 0x52, 0x92, 0x7b, |
|
| 1031 |
+ 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x9a, 0x54, 0x17, 0xb5, 0x04, 0x00, 0x00, |
|
| 1032 |
+} |
| 0 | 1033 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,63 @@ |
| 0 |
+syntax = "proto3"; |
|
| 1 |
+ |
|
| 2 |
+package containerd.runhcs.v1; |
|
| 3 |
+ |
|
| 4 |
+import weak "gogoproto/gogo.proto"; |
|
| 5 |
+import "google/protobuf/timestamp.proto"; |
|
| 6 |
+ |
|
| 7 |
+option go_package = "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options;options"; |
|
| 8 |
+ |
|
| 9 |
+// Options are the set of customizations that can be passed at Create time. |
|
| 10 |
+message Options {
|
|
| 11 |
+ // enable debug tracing |
|
| 12 |
+ bool debug = 1; |
|
| 13 |
+ |
|
| 14 |
+ enum DebugType {
|
|
| 15 |
+ NPIPE = 0; |
|
| 16 |
+ FILE = 1; |
|
| 17 |
+ ETW = 2; |
|
| 18 |
+ } |
|
| 19 |
+ |
|
| 20 |
+ // debug tracing output type |
|
| 21 |
+ DebugType debug_type = 2; |
|
| 22 |
+ |
|
| 23 |
+ // registry key root for storage of the runhcs container state |
|
| 24 |
+ string registry_root = 3; |
|
| 25 |
+ |
|
| 26 |
+ // sandbox_image is the image to use for the sandbox that matches the |
|
| 27 |
+ // sandbox_platform. |
|
| 28 |
+ string sandbox_image = 4; |
|
| 29 |
+ |
|
| 30 |
+ // sandbox_platform is a CRI setting that specifies the platform |
|
| 31 |
+ // architecture for all sandbox's in this runtime. Values are |
|
| 32 |
+ // 'windows/amd64' and 'linux/amd64'. |
|
| 33 |
+ string sandbox_platform = 5; |
|
| 34 |
+ |
|
| 35 |
+ enum SandboxIsolation {
|
|
| 36 |
+ PROCESS = 0; |
|
| 37 |
+ HYPERVISOR = 1; |
|
| 38 |
+ } |
|
| 39 |
+ |
|
| 40 |
+ // sandbox_isolation is a CRI setting that specifies the isolation level of |
|
| 41 |
+ // the sandbox. For Windows runtime PROCESS and HYPERVISOR are valid. For |
|
| 42 |
+ // LCOW only HYPERVISOR is valid and default if omitted. |
|
| 43 |
+ SandboxIsolation sandbox_isolation = 6; |
|
| 44 |
+ |
|
| 45 |
+ // boot_files_root_path is the path to the directory containing the LCOW |
|
| 46 |
+ // kernel and root FS files. |
|
| 47 |
+ string boot_files_root_path = 7; |
|
| 48 |
+} |
|
| 49 |
+ |
|
| 50 |
+// ProcessDetails contains additional information about a process. This is the additional |
|
| 51 |
+// info returned in the Pids query. |
|
| 52 |
+message ProcessDetails {
|
|
| 53 |
+ string image_name = 1; |
|
| 54 |
+ google.protobuf.Timestamp created_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; |
|
| 55 |
+ uint64 kernel_time_100_ns = 3; |
|
| 56 |
+ uint64 memory_commit_bytes = 4; |
|
| 57 |
+ uint64 memory_working_set_private_bytes = 5; |
|
| 58 |
+ uint64 memory_working_set_shared_bytes = 6; |
|
| 59 |
+ uint32 process_id = 7; |
|
| 60 |
+ uint64 user_time_100_ns = 8; |
|
| 61 |
+ string exec_id = 9; |
|
| 62 |
+} |
| ... | ... |
@@ -276,15 +276,20 @@ func (process *Process) ExitCode() (_ int, err error) {
|
| 276 | 276 |
|
| 277 | 277 |
properties, err := process.Properties() |
| 278 | 278 |
if err != nil {
|
| 279 |
- return 0, makeProcessError(process, operation, err, nil) |
|
| 279 |
+ return -1, makeProcessError(process, operation, err, nil) |
|
| 280 | 280 |
} |
| 281 | 281 |
|
| 282 | 282 |
if properties.Exited == false {
|
| 283 |
- return 0, makeProcessError(process, operation, ErrInvalidProcessState, nil) |
|
| 283 |
+ return -1, makeProcessError(process, operation, ErrInvalidProcessState, nil) |
|
| 284 | 284 |
} |
| 285 | 285 |
|
| 286 | 286 |
if properties.LastWaitResult != 0 {
|
| 287 |
- return 0, makeProcessError(process, operation, syscall.Errno(properties.LastWaitResult), nil) |
|
| 287 |
+ logrus.WithFields(logrus.Fields{
|
|
| 288 |
+ logfields.ContainerID: process.SystemID(), |
|
| 289 |
+ logfields.ProcessID: process.processID, |
|
| 290 |
+ "wait-result": properties.LastWaitResult, |
|
| 291 |
+ }).Warn("hcsshim::Process::ExitCode - Non-zero last wait result")
|
|
| 292 |
+ return -1, nil |
|
| 288 | 293 |
} |
| 289 | 294 |
|
| 290 | 295 |
return int(properties.ExitCode), nil |
| ... | ... |
@@ -450,7 +455,7 @@ func (process *Process) unregisterCallback() error {
|
| 450 | 450 |
closeChannels(context.channels) |
| 451 | 451 |
|
| 452 | 452 |
callbackMapLock.Lock() |
| 453 |
- callbackMap[callbackNumber] = nil |
|
| 453 |
+ delete(callbackMap, callbackNumber) |
|
| 454 | 454 |
callbackMapLock.Unlock() |
| 455 | 455 |
|
| 456 | 456 |
handle = 0 |
| ... | ... |
@@ -280,7 +280,7 @@ func (computeSystem *System) Shutdown() (err error) {
|
| 280 | 280 |
operation := "hcsshim::ComputeSystem::Shutdown" |
| 281 | 281 |
computeSystem.logOperationBegin(operation) |
| 282 | 282 |
defer func() {
|
| 283 |
- if IsAlreadyStopped(err) {
|
|
| 283 |
+ if IsAlreadyStopped(err) || IsPending(err) {
|
|
| 284 | 284 |
computeSystem.logOperationEnd(operation, nil) |
| 285 | 285 |
} else {
|
| 286 | 286 |
computeSystem.logOperationEnd(operation, err) |
| ... | ... |
@@ -640,7 +640,7 @@ func (computeSystem *System) unregisterCallback() error {
|
| 640 | 640 |
closeChannels(context.channels) |
| 641 | 641 |
|
| 642 | 642 |
callbackMapLock.Lock() |
| 643 |
- callbackMap[callbackNumber] = nil |
|
| 643 |
+ delete(callbackMap, callbackNumber) |
|
| 644 | 644 |
callbackMapLock.Unlock() |
| 645 | 645 |
|
| 646 | 646 |
handle = 0 |
| ... | ... |
@@ -17,6 +17,11 @@ func processAsyncHcsResult(err error, resultp *uint16, callbackNumber uintptr, e |
| 17 | 17 |
|
| 18 | 18 |
func waitForNotification(callbackNumber uintptr, expectedNotification hcsNotification, timeout *time.Duration) error {
|
| 19 | 19 |
callbackMapLock.RLock() |
| 20 |
+ if _, ok := callbackMap[callbackNumber]; !ok {
|
|
| 21 |
+ callbackMapLock.RUnlock() |
|
| 22 |
+ logrus.Errorf("failed to waitForNotification: callbackNumber %d does not exist in callbackMap", callbackNumber)
|
|
| 23 |
+ return ErrHandleClose |
|
| 24 |
+ } |
|
| 20 | 25 |
channels := callbackMap[callbackNumber].channels |
| 21 | 26 |
callbackMapLock.RUnlock() |
| 22 | 27 |
|
| ... | ... |
@@ -2,9 +2,9 @@ package hns |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"encoding/json" |
| 5 |
- "net" |
|
| 6 |
- |
|
| 5 |
+ "errors" |
|
| 7 | 6 |
"github.com/sirupsen/logrus" |
| 7 |
+ "net" |
|
| 8 | 8 |
) |
| 9 | 9 |
|
| 10 | 10 |
// Subnet is assoicated with a network and represents a list |
| ... | ... |
@@ -98,6 +98,12 @@ func (network *HNSNetwork) Create() (*HNSNetwork, error) {
|
| 98 | 98 |
title := "hcsshim::HNSNetwork::" + operation |
| 99 | 99 |
logrus.Debugf(title+" id=%s", network.Id) |
| 100 | 100 |
|
| 101 |
+ for _, subnet := range network.Subnets {
|
|
| 102 |
+ if (subnet.AddressPrefix != "") && (subnet.GatewayAddress == "") {
|
|
| 103 |
+ return nil, errors.New("network create error, subnet has address prefix but no gateway specified")
|
|
| 104 |
+ } |
|
| 105 |
+ } |
|
| 106 |
+ |
|
| 101 | 107 |
jsonString, err := json.Marshal(network) |
| 102 | 108 |
if err != nil {
|
| 103 | 109 |
return nil, err |
| ... | ... |
@@ -10,7 +10,6 @@ |
| 10 | 10 |
package hcsschema |
| 11 | 11 |
|
| 12 | 12 |
type Plan9Share struct {
|
| 13 |
- |
|
| 14 | 13 |
Name string `json:"Name,omitempty"` |
| 15 | 14 |
|
| 16 | 15 |
// The name by which the guest operation system can access this share, via the aname parameter in the Plan9 protocol. |
| ... | ... |
@@ -30,4 +29,6 @@ type Plan9Share struct {
|
| 30 | 30 |
ReadOnly bool `json:"ReadOnly,omitempty"` |
| 31 | 31 |
|
| 32 | 32 |
UseShareRootIdentity bool `json:"UseShareRootIdentity,omitempty"` |
| 33 |
+ |
|
| 34 |
+ AllowedFiles []string `json:"AllowedFiles,omitempty"` |
|
| 33 | 35 |
} |
| ... | ... |
@@ -1,13 +1,20 @@ |
| 1 | 1 |
github.com/blang/semver v3.1.0 |
| 2 | 2 |
github.com/containerd/console c12b1e7919c14469339a5d38f2f8ed9b64a9de23 |
| 3 |
+github.com/containerd/containerd faec567304bbdf6864b1663d4f813641b5880a4a |
|
| 3 | 4 |
github.com/containerd/go-runc 5a6d9f37cfa36b15efba46dc7ea349fa9b7143c3 |
| 5 |
+github.com/containerd/ttrpc 2a805f71863501300ae1976d29f0454ae003e85a |
|
| 6 |
+github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40 |
|
| 7 |
+github.com/gogo/protobuf v1.0.0 |
|
| 8 |
+github.com/golang/protobuf v1.1.0 |
|
| 4 | 9 |
github.com/hashicorp/errwrap 7554cd9344cec97297fa6649b055a8c98c2a1e55 |
| 5 | 10 |
github.com/hashicorp/go-multierror ed905158d87462226a13fe39ddf685ea65f1c11f |
| 6 | 11 |
github.com/konsorten/go-windows-terminal-sequences v1.0.1 |
| 7 | 12 |
github.com/linuxkit/virtsock 8e79449dea0735c1c056d814934dd035734cc97c |
| 8 | 13 |
github.com/Microsoft/go-winio 16cfc975803886a5e47c4257a24c8d8c52e178b2 |
| 9 | 14 |
github.com/Microsoft/opengcs v0.3.9 |
| 10 |
-github.com/opencontainers/runtime-spec eba862dc2470385a233c7507392675cbeadf7353 |
|
| 15 |
+github.com/opencontainers/go-digest c9281466c8b2f606084ac71339773efd177436e7 |
|
| 16 |
+github.com/opencontainers/runc 12f6a991201fdb8f82579582d5e00e28fba06d0a |
|
| 17 |
+github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 |
|
| 11 | 18 |
github.com/opencontainers/runtime-tools 1d69bd0f9c39677d0630e50664fbc3154ae61b88 |
| 12 | 19 |
github.com/pkg/errors v0.8.1 |
| 13 | 20 |
github.com/sirupsen/logrus v1.3.0 |
| ... | ... |
@@ -17,5 +24,10 @@ github.com/xeipuuv/gojsonpointer 4e3ac2762d5f479393488629ee9370b50873b3a6 |
| 17 | 17 |
github.com/xeipuuv/gojsonreference bd5ef7bd5415a7ac448318e64f11a24cd21e594b |
| 18 | 18 |
github.com/xeipuuv/gojsonschema 1d523034197ff1f222f6429836dd36a2457a1874 |
| 19 | 19 |
golang.org/x/crypto ff983b9c42bc9fbf91556e191cc8efb585c16908 |
| 20 |
+golang.org/x/net ed066c81e75eba56dd9bd2139ade88125b855585 |
|
| 20 | 21 |
golang.org/x/sync 37e7f081c4d4c64e13b10787722085407fe5d15f |
| 21 |
-golang.org/x/sys e5ecc2a6747ce8d4af18ed98b3de5ae30eb3a5bb |
|
| 22 | 22 |
\ No newline at end of file |
| 23 |
+golang.org/x/sys e5ecc2a6747ce8d4af18ed98b3de5ae30eb3a5bb |
|
| 24 |
+golang.org/x/text d14c52b222ee852cdba8b07206ca0c614b389876 |
|
| 25 |
+google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944 |
|
| 26 |
+google.golang.org/grpc v1.12.0 |
|
| 27 |
+k8s.io/kubernetes v1.13.0 |