From 783763f84c129835e740de13d9c01bc2d30262d3 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 4 May 2016 13:09:53 -0700 Subject: [PATCH 1/3] Update runc and containerd deps containerd: 57b7c3da915ebe943bd304c00890959b191e5264 runc: d49ece5a83da3dcb820121d6850e2b61bd0a5fbe Signed-off-by: Michael Crosby Upstream-commit: cfb976438677b15ec023b2ad4822bf1b2f63cc8f Component: engine --- components/engine/Dockerfile | 4 +- components/engine/Dockerfile.aarch64 | 4 +- components/engine/Dockerfile.armhf | 4 +- components/engine/Dockerfile.gccgo | 4 +- components/engine/Dockerfile.ppc64le | 4 +- components/engine/Dockerfile.s390x | 4 +- components/engine/Dockerfile.simple | 4 +- components/engine/hack/vendor.sh | 4 +- .../containerd/api/grpc/types/api.pb.go | 493 ++++++++++-------- .../containerd/api/grpc/types/api.proto | 11 + .../runc/libcontainer/apparmor/apparmor.go | 3 +- .../runc/libcontainer/cgroups/stats.go | 1 + .../runc/libcontainer/cgroups/utils.go | 35 +- .../runc/libcontainer/configs/config.go | 27 +- .../runc/libcontainer/configs/config_unix.go | 4 +- .../libcontainer/configs/device_defaults.go | 2 +- .../runc/libcontainer/label/label.go | 4 + .../runc/libcontainer/label/label_selinux.go | 9 +- .../runc/libcontainer/selinux/selinux.go | 46 +- .../runc/libcontainer/system/linux.go | 11 +- .../runc/libcontainer/system/sysconfig.go | 4 + 21 files changed, 403 insertions(+), 279 deletions(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 351dd54011..a1384b4fcf 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -250,7 +250,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT baf6536d6259209c3edfa2b22237af82942d3dfa +ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ @@ -261,7 +261,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install containerd -ENV CONTAINERD_COMMIT v0.2.1 +ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ diff --git a/components/engine/Dockerfile.aarch64 b/components/engine/Dockerfile.aarch64 index 76b540c9e7..ab42630a18 100644 --- a/components/engine/Dockerfile.aarch64 +++ b/components/engine/Dockerfile.aarch64 @@ -181,7 +181,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT baf6536d6259209c3edfa2b22237af82942d3dfa +ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ @@ -192,7 +192,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install containerd -ENV CONTAINERD_COMMIT v0.2.1 +ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ diff --git a/components/engine/Dockerfile.armhf b/components/engine/Dockerfile.armhf index 1ddfbb9870..7c2139a6e3 100644 --- a/components/engine/Dockerfile.armhf +++ b/components/engine/Dockerfile.armhf @@ -192,7 +192,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT baf6536d6259209c3edfa2b22237af82942d3dfa +ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ @@ -203,7 +203,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install containerd -ENV CONTAINERD_COMMIT v0.2.1 +ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ diff --git a/components/engine/Dockerfile.gccgo b/components/engine/Dockerfile.gccgo index 9b40dd405f..928f932544 100644 --- a/components/engine/Dockerfile.gccgo +++ b/components/engine/Dockerfile.gccgo @@ -74,7 +74,7 @@ WORKDIR /go/src/github.com/docker/docker ENV DOCKER_BUILDTAGS apparmor seccomp selinux # Install runc -ENV RUNC_COMMIT baf6536d6259209c3edfa2b22237af82942d3dfa +ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ @@ -85,7 +85,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install containerd -ENV CONTAINERD_COMMIT v0.2.1 +ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ diff --git a/components/engine/Dockerfile.ppc64le b/components/engine/Dockerfile.ppc64le index cc8959f909..8fcb467153 100644 --- a/components/engine/Dockerfile.ppc64le +++ b/components/engine/Dockerfile.ppc64le @@ -204,7 +204,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT baf6536d6259209c3edfa2b22237af82942d3dfa +ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ @@ -215,7 +215,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install containerd -ENV CONTAINERD_COMMIT v0.2.1 +ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ diff --git a/components/engine/Dockerfile.s390x b/components/engine/Dockerfile.s390x index 715f1c9248..82df75a462 100644 --- a/components/engine/Dockerfile.s390x +++ b/components/engine/Dockerfile.s390x @@ -194,7 +194,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install runc -ENV RUNC_COMMIT baf6536d6259209c3edfa2b22237af82942d3dfa +ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ @@ -205,7 +205,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install containerd -ENV CONTAINERD_COMMIT v0.2.1 +ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ diff --git a/components/engine/Dockerfile.simple b/components/engine/Dockerfile.simple index e2827fedcd..fece5532fd 100644 --- a/components/engine/Dockerfile.simple +++ b/components/engine/Dockerfile.simple @@ -57,7 +57,7 @@ ENV GOPATH /go:/go/src/github.com/docker/docker/vendor ENV CGO_LDFLAGS -L/lib # Install runc -ENV RUNC_COMMIT baf6536d6259209c3edfa2b22237af82942d3dfa +ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ @@ -68,7 +68,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install containerd -ENV CONTAINERD_COMMIT v0.2.1 +ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ diff --git a/components/engine/hack/vendor.sh b/components/engine/hack/vendor.sh index c943183498..ecce8812f1 100755 --- a/components/engine/hack/vendor.sh +++ b/components/engine/hack/vendor.sh @@ -60,7 +60,7 @@ clone git github.com/miekg/pkcs11 df8ae6ca730422dba20c768ff38ef7d79077a59f clone git github.com/docker/go v1.5.1-1-1-gbaf439e clone git github.com/agl/ed25519 d2b94fd789ea21d12fac1a4443dd3a3f79cda72c -clone git github.com/opencontainers/runc 2441732d6fcc0fb0a542671a4372e0c7bc99c19e # libcontainer +clone git github.com/opencontainers/runc d49ece5a83da3dcb820121d6850e2b61bd0a5fbe # libcontainer clone git github.com/opencontainers/specs f955d90e70a98ddfb886bd930ffd076da9b67998 # specs clone git github.com/seccomp/libseccomp-golang 1b506fc7c24eec5a3693cdcbed40d9c226cfc6a1 # libcontainer deps (see src/github.com/opencontainers/runc/Godeps/Godeps.json) @@ -90,5 +90,5 @@ clone git google.golang.org/api dc6d2353af16e2a2b0ff6986af051d473a4ed468 https:/ clone git google.golang.org/cloud dae7e3d993bc3812a2185af60552bb6b847e52a0 https://code.googlesource.com/gocloud # containerd -clone git github.com/docker/containerd v0.2.1 +clone git github.com/docker/containerd 57b7c3da915ebe943bd304c00890959b191e5264 clean diff --git a/components/engine/vendor/src/github.com/docker/containerd/api/grpc/types/api.pb.go b/components/engine/vendor/src/github.com/docker/containerd/api/grpc/types/api.pb.go index ea82960490..3ce61dbba6 100644 --- a/components/engine/vendor/src/github.com/docker/containerd/api/grpc/types/api.pb.go +++ b/components/engine/vendor/src/github.com/docker/containerd/api/grpc/types/api.pb.go @@ -9,6 +9,8 @@ It is generated from these files: api.proto It has these top-level messages: + GetServerVersionRequest + GetServerVersionResponse UpdateProcessRequest UpdateProcessResponse CreateContainerRequest @@ -67,6 +69,30 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.ProtoPackageIsVersion1 + +type GetServerVersionRequest struct { +} + +func (m *GetServerVersionRequest) Reset() { *m = GetServerVersionRequest{} } +func (m *GetServerVersionRequest) String() string { return proto.CompactTextString(m) } +func (*GetServerVersionRequest) ProtoMessage() {} +func (*GetServerVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type GetServerVersionResponse struct { + Major uint32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"` + Minor uint32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"` + Patch uint32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"` + Revision string `protobuf:"bytes,4,opt,name=revision" json:"revision,omitempty"` +} + +func (m *GetServerVersionResponse) Reset() { *m = GetServerVersionResponse{} } +func (m *GetServerVersionResponse) String() string { return proto.CompactTextString(m) } +func (*GetServerVersionResponse) ProtoMessage() {} +func (*GetServerVersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + type UpdateProcessRequest struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Pid string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"` @@ -78,7 +104,7 @@ type UpdateProcessRequest struct { func (m *UpdateProcessRequest) Reset() { *m = UpdateProcessRequest{} } func (m *UpdateProcessRequest) String() string { return proto.CompactTextString(m) } func (*UpdateProcessRequest) ProtoMessage() {} -func (*UpdateProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*UpdateProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } type UpdateProcessResponse struct { } @@ -86,7 +112,7 @@ type UpdateProcessResponse struct { func (m *UpdateProcessResponse) Reset() { *m = UpdateProcessResponse{} } func (m *UpdateProcessResponse) String() string { return proto.CompactTextString(m) } func (*UpdateProcessResponse) ProtoMessage() {} -func (*UpdateProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (*UpdateProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } type CreateContainerRequest struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` @@ -102,7 +128,7 @@ type CreateContainerRequest struct { func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} } func (m *CreateContainerRequest) String() string { return proto.CompactTextString(m) } func (*CreateContainerRequest) ProtoMessage() {} -func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } type CreateContainerResponse struct { Container *Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` @@ -111,7 +137,7 @@ type CreateContainerResponse struct { func (m *CreateContainerResponse) Reset() { *m = CreateContainerResponse{} } func (m *CreateContainerResponse) String() string { return proto.CompactTextString(m) } func (*CreateContainerResponse) ProtoMessage() {} -func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } func (m *CreateContainerResponse) GetContainer() *Container { if m != nil { @@ -129,7 +155,7 @@ type SignalRequest struct { func (m *SignalRequest) Reset() { *m = SignalRequest{} } func (m *SignalRequest) String() string { return proto.CompactTextString(m) } func (*SignalRequest) ProtoMessage() {} -func (*SignalRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (*SignalRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } type SignalResponse struct { } @@ -137,7 +163,7 @@ type SignalResponse struct { func (m *SignalResponse) Reset() { *m = SignalResponse{} } func (m *SignalResponse) String() string { return proto.CompactTextString(m) } func (*SignalResponse) ProtoMessage() {} -func (*SignalResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (*SignalResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } type AddProcessRequest struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` @@ -160,7 +186,7 @@ type AddProcessRequest struct { func (m *AddProcessRequest) Reset() { *m = AddProcessRequest{} } func (m *AddProcessRequest) String() string { return proto.CompactTextString(m) } func (*AddProcessRequest) ProtoMessage() {} -func (*AddProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*AddProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } func (m *AddProcessRequest) GetUser() *User { if m != nil { @@ -185,7 +211,7 @@ type Rlimit struct { func (m *Rlimit) Reset() { *m = Rlimit{} } func (m *Rlimit) String() string { return proto.CompactTextString(m) } func (*Rlimit) ProtoMessage() {} -func (*Rlimit) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*Rlimit) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } type User struct { Uid uint32 `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"` @@ -196,7 +222,7 @@ type User struct { func (m *User) Reset() { *m = User{} } func (m *User) String() string { return proto.CompactTextString(m) } func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } type AddProcessResponse struct { } @@ -204,7 +230,7 @@ type AddProcessResponse struct { func (m *AddProcessResponse) Reset() { *m = AddProcessResponse{} } func (m *AddProcessResponse) String() string { return proto.CompactTextString(m) } func (*AddProcessResponse) ProtoMessage() {} -func (*AddProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*AddProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } type CreateCheckpointRequest struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` @@ -214,7 +240,7 @@ type CreateCheckpointRequest struct { func (m *CreateCheckpointRequest) Reset() { *m = CreateCheckpointRequest{} } func (m *CreateCheckpointRequest) String() string { return proto.CompactTextString(m) } func (*CreateCheckpointRequest) ProtoMessage() {} -func (*CreateCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*CreateCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } func (m *CreateCheckpointRequest) GetCheckpoint() *Checkpoint { if m != nil { @@ -229,7 +255,7 @@ type CreateCheckpointResponse struct { func (m *CreateCheckpointResponse) Reset() { *m = CreateCheckpointResponse{} } func (m *CreateCheckpointResponse) String() string { return proto.CompactTextString(m) } func (*CreateCheckpointResponse) ProtoMessage() {} -func (*CreateCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*CreateCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } type DeleteCheckpointRequest struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` @@ -239,7 +265,7 @@ type DeleteCheckpointRequest struct { func (m *DeleteCheckpointRequest) Reset() { *m = DeleteCheckpointRequest{} } func (m *DeleteCheckpointRequest) String() string { return proto.CompactTextString(m) } func (*DeleteCheckpointRequest) ProtoMessage() {} -func (*DeleteCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (*DeleteCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } type DeleteCheckpointResponse struct { } @@ -247,7 +273,7 @@ type DeleteCheckpointResponse struct { func (m *DeleteCheckpointResponse) Reset() { *m = DeleteCheckpointResponse{} } func (m *DeleteCheckpointResponse) String() string { return proto.CompactTextString(m) } func (*DeleteCheckpointResponse) ProtoMessage() {} -func (*DeleteCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (*DeleteCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } type ListCheckpointRequest struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` @@ -256,7 +282,7 @@ type ListCheckpointRequest struct { func (m *ListCheckpointRequest) Reset() { *m = ListCheckpointRequest{} } func (m *ListCheckpointRequest) String() string { return proto.CompactTextString(m) } func (*ListCheckpointRequest) ProtoMessage() {} -func (*ListCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (*ListCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } type Checkpoint struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` @@ -269,7 +295,7 @@ type Checkpoint struct { func (m *Checkpoint) Reset() { *m = Checkpoint{} } func (m *Checkpoint) String() string { return proto.CompactTextString(m) } func (*Checkpoint) ProtoMessage() {} -func (*Checkpoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (*Checkpoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } type ListCheckpointResponse struct { Checkpoints []*Checkpoint `protobuf:"bytes,1,rep,name=checkpoints" json:"checkpoints,omitempty"` @@ -278,7 +304,7 @@ type ListCheckpointResponse struct { func (m *ListCheckpointResponse) Reset() { *m = ListCheckpointResponse{} } func (m *ListCheckpointResponse) String() string { return proto.CompactTextString(m) } func (*ListCheckpointResponse) ProtoMessage() {} -func (*ListCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (*ListCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } func (m *ListCheckpointResponse) GetCheckpoints() []*Checkpoint { if m != nil { @@ -294,7 +320,7 @@ type StateRequest struct { func (m *StateRequest) Reset() { *m = StateRequest{} } func (m *StateRequest) String() string { return proto.CompactTextString(m) } func (*StateRequest) ProtoMessage() {} -func (*StateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (*StateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } type ContainerState struct { Status string `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` @@ -303,7 +329,7 @@ type ContainerState struct { func (m *ContainerState) Reset() { *m = ContainerState{} } func (m *ContainerState) String() string { return proto.CompactTextString(m) } func (*ContainerState) ProtoMessage() {} -func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } type Process struct { Pid string `protobuf:"bytes,1,opt,name=pid" json:"pid,omitempty"` @@ -326,7 +352,7 @@ type Process struct { func (m *Process) Reset() { *m = Process{} } func (m *Process) String() string { return proto.CompactTextString(m) } func (*Process) ProtoMessage() {} -func (*Process) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +func (*Process) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } func (m *Process) GetUser() *User { if m != nil { @@ -355,7 +381,7 @@ type Container struct { func (m *Container) Reset() { *m = Container{} } func (m *Container) String() string { return proto.CompactTextString(m) } func (*Container) ProtoMessage() {} -func (*Container) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } +func (*Container) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } func (m *Container) GetProcesses() []*Process { if m != nil { @@ -373,7 +399,7 @@ type Machine struct { func (m *Machine) Reset() { *m = Machine{} } func (m *Machine) String() string { return proto.CompactTextString(m) } func (*Machine) ProtoMessage() {} -func (*Machine) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +func (*Machine) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } // StateResponse is information about containerd daemon type StateResponse struct { @@ -384,7 +410,7 @@ type StateResponse struct { func (m *StateResponse) Reset() { *m = StateResponse{} } func (m *StateResponse) String() string { return proto.CompactTextString(m) } func (*StateResponse) ProtoMessage() {} -func (*StateResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (*StateResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } func (m *StateResponse) GetContainers() []*Container { if m != nil { @@ -410,7 +436,7 @@ type UpdateContainerRequest struct { func (m *UpdateContainerRequest) Reset() { *m = UpdateContainerRequest{} } func (m *UpdateContainerRequest) String() string { return proto.CompactTextString(m) } func (*UpdateContainerRequest) ProtoMessage() {} -func (*UpdateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } +func (*UpdateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } func (m *UpdateContainerRequest) GetResources() *UpdateResource { if m != nil { @@ -435,7 +461,7 @@ type UpdateResource struct { func (m *UpdateResource) Reset() { *m = UpdateResource{} } func (m *UpdateResource) String() string { return proto.CompactTextString(m) } func (*UpdateResource) ProtoMessage() {} -func (*UpdateResource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } +func (*UpdateResource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } type UpdateContainerResponse struct { } @@ -443,7 +469,7 @@ type UpdateContainerResponse struct { func (m *UpdateContainerResponse) Reset() { *m = UpdateContainerResponse{} } func (m *UpdateContainerResponse) String() string { return proto.CompactTextString(m) } func (*UpdateContainerResponse) ProtoMessage() {} -func (*UpdateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } +func (*UpdateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } type EventsRequest struct { Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"` @@ -452,7 +478,7 @@ type EventsRequest struct { func (m *EventsRequest) Reset() { *m = EventsRequest{} } func (m *EventsRequest) String() string { return proto.CompactTextString(m) } func (*EventsRequest) ProtoMessage() {} -func (*EventsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } +func (*EventsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } type Event struct { Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` @@ -465,58 +491,58 @@ type Event struct { func (m *Event) Reset() { *m = Event{} } func (m *Event) String() string { return proto.CompactTextString(m) } func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } +func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } type NetworkStats struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - RxBytes uint64 `protobuf:"varint,2,opt,name=rx_bytes,json=rxBytes" json:"rx_bytes,omitempty"` - Rx_Packets uint64 `protobuf:"varint,3,opt,name=rx_Packets,json=rxPackets" json:"rx_Packets,omitempty"` - RxErrors uint64 `protobuf:"varint,4,opt,name=Rx_errors,json=rxErrors" json:"Rx_errors,omitempty"` - RxDropped uint64 `protobuf:"varint,5,opt,name=Rx_dropped,json=rxDropped" json:"Rx_dropped,omitempty"` - TxBytes uint64 `protobuf:"varint,6,opt,name=Tx_bytes,json=txBytes" json:"Tx_bytes,omitempty"` - TxPackets uint64 `protobuf:"varint,7,opt,name=Tx_packets,json=txPackets" json:"Tx_packets,omitempty"` - TxErrors uint64 `protobuf:"varint,8,opt,name=Tx_errors,json=txErrors" json:"Tx_errors,omitempty"` - TxDropped uint64 `protobuf:"varint,9,opt,name=Tx_dropped,json=txDropped" json:"Tx_dropped,omitempty"` + RxBytes uint64 `protobuf:"varint,2,opt,name=rx_bytes" json:"rx_bytes,omitempty"` + Rx_Packets uint64 `protobuf:"varint,3,opt,name=rx_Packets" json:"rx_Packets,omitempty"` + RxErrors uint64 `protobuf:"varint,4,opt,name=Rx_errors" json:"Rx_errors,omitempty"` + RxDropped uint64 `protobuf:"varint,5,opt,name=Rx_dropped" json:"Rx_dropped,omitempty"` + TxBytes uint64 `protobuf:"varint,6,opt,name=Tx_bytes" json:"Tx_bytes,omitempty"` + TxPackets uint64 `protobuf:"varint,7,opt,name=Tx_packets" json:"Tx_packets,omitempty"` + TxErrors uint64 `protobuf:"varint,8,opt,name=Tx_errors" json:"Tx_errors,omitempty"` + TxDropped uint64 `protobuf:"varint,9,opt,name=Tx_dropped" json:"Tx_dropped,omitempty"` } func (m *NetworkStats) Reset() { *m = NetworkStats{} } func (m *NetworkStats) String() string { return proto.CompactTextString(m) } func (*NetworkStats) ProtoMessage() {} -func (*NetworkStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } +func (*NetworkStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } type CpuUsage struct { - TotalUsage uint64 `protobuf:"varint,1,opt,name=total_usage,json=totalUsage" json:"total_usage,omitempty"` - PercpuUsage []uint64 `protobuf:"varint,2,rep,name=percpu_usage,json=percpuUsage" json:"percpu_usage,omitempty"` - UsageInKernelmode uint64 `protobuf:"varint,3,opt,name=usage_in_kernelmode,json=usageInKernelmode" json:"usage_in_kernelmode,omitempty"` - UsageInUsermode uint64 `protobuf:"varint,4,opt,name=usage_in_usermode,json=usageInUsermode" json:"usage_in_usermode,omitempty"` + TotalUsage uint64 `protobuf:"varint,1,opt,name=total_usage" json:"total_usage,omitempty"` + PercpuUsage []uint64 `protobuf:"varint,2,rep,name=percpu_usage" json:"percpu_usage,omitempty"` + UsageInKernelmode uint64 `protobuf:"varint,3,opt,name=usage_in_kernelmode" json:"usage_in_kernelmode,omitempty"` + UsageInUsermode uint64 `protobuf:"varint,4,opt,name=usage_in_usermode" json:"usage_in_usermode,omitempty"` } func (m *CpuUsage) Reset() { *m = CpuUsage{} } func (m *CpuUsage) String() string { return proto.CompactTextString(m) } func (*CpuUsage) ProtoMessage() {} -func (*CpuUsage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } +func (*CpuUsage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } type ThrottlingData struct { Periods uint64 `protobuf:"varint,1,opt,name=periods" json:"periods,omitempty"` - ThrottledPeriods uint64 `protobuf:"varint,2,opt,name=throttled_periods,json=throttledPeriods" json:"throttled_periods,omitempty"` - ThrottledTime uint64 `protobuf:"varint,3,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"` + ThrottledPeriods uint64 `protobuf:"varint,2,opt,name=throttled_periods" json:"throttled_periods,omitempty"` + ThrottledTime uint64 `protobuf:"varint,3,opt,name=throttled_time" json:"throttled_time,omitempty"` } func (m *ThrottlingData) Reset() { *m = ThrottlingData{} } func (m *ThrottlingData) String() string { return proto.CompactTextString(m) } func (*ThrottlingData) ProtoMessage() {} -func (*ThrottlingData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +func (*ThrottlingData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } type CpuStats struct { - CpuUsage *CpuUsage `protobuf:"bytes,1,opt,name=cpu_usage,json=cpuUsage" json:"cpu_usage,omitempty"` - ThrottlingData *ThrottlingData `protobuf:"bytes,2,opt,name=throttling_data,json=throttlingData" json:"throttling_data,omitempty"` - SystemUsage uint64 `protobuf:"varint,3,opt,name=system_usage,json=systemUsage" json:"system_usage,omitempty"` + CpuUsage *CpuUsage `protobuf:"bytes,1,opt,name=cpu_usage" json:"cpu_usage,omitempty"` + ThrottlingData *ThrottlingData `protobuf:"bytes,2,opt,name=throttling_data" json:"throttling_data,omitempty"` + SystemUsage uint64 `protobuf:"varint,3,opt,name=system_usage" json:"system_usage,omitempty"` } func (m *CpuStats) Reset() { *m = CpuStats{} } func (m *CpuStats) String() string { return proto.CompactTextString(m) } func (*CpuStats) ProtoMessage() {} -func (*CpuStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } +func (*CpuStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } func (m *CpuStats) GetCpuUsage() *CpuUsage { if m != nil { @@ -540,11 +566,11 @@ type PidsStats struct { func (m *PidsStats) Reset() { *m = PidsStats{} } func (m *PidsStats) String() string { return proto.CompactTextString(m) } func (*PidsStats) ProtoMessage() {} -func (*PidsStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } +func (*PidsStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } type MemoryData struct { Usage uint64 `protobuf:"varint,1,opt,name=usage" json:"usage,omitempty"` - MaxUsage uint64 `protobuf:"varint,2,opt,name=max_usage,json=maxUsage" json:"max_usage,omitempty"` + MaxUsage uint64 `protobuf:"varint,2,opt,name=max_usage" json:"max_usage,omitempty"` Failcnt uint64 `protobuf:"varint,3,opt,name=failcnt" json:"failcnt,omitempty"` Limit uint64 `protobuf:"varint,4,opt,name=limit" json:"limit,omitempty"` } @@ -552,20 +578,20 @@ type MemoryData struct { func (m *MemoryData) Reset() { *m = MemoryData{} } func (m *MemoryData) String() string { return proto.CompactTextString(m) } func (*MemoryData) ProtoMessage() {} -func (*MemoryData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } +func (*MemoryData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } type MemoryStats struct { Cache uint64 `protobuf:"varint,1,opt,name=cache" json:"cache,omitempty"` Usage *MemoryData `protobuf:"bytes,2,opt,name=usage" json:"usage,omitempty"` - SwapUsage *MemoryData `protobuf:"bytes,3,opt,name=swap_usage,json=swapUsage" json:"swap_usage,omitempty"` - KernelUsage *MemoryData `protobuf:"bytes,4,opt,name=kernel_usage,json=kernelUsage" json:"kernel_usage,omitempty"` + SwapUsage *MemoryData `protobuf:"bytes,3,opt,name=swap_usage" json:"swap_usage,omitempty"` + KernelUsage *MemoryData `protobuf:"bytes,4,opt,name=kernel_usage" json:"kernel_usage,omitempty"` Stats map[string]uint64 `protobuf:"bytes,5,rep,name=stats" json:"stats,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` } func (m *MemoryStats) Reset() { *m = MemoryStats{} } func (m *MemoryStats) String() string { return proto.CompactTextString(m) } func (*MemoryStats) ProtoMessage() {} -func (*MemoryStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } +func (*MemoryStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } func (m *MemoryStats) GetUsage() *MemoryData { if m != nil { @@ -605,23 +631,23 @@ type BlkioStatsEntry struct { func (m *BlkioStatsEntry) Reset() { *m = BlkioStatsEntry{} } func (m *BlkioStatsEntry) String() string { return proto.CompactTextString(m) } func (*BlkioStatsEntry) ProtoMessage() {} -func (*BlkioStatsEntry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } +func (*BlkioStatsEntry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } type BlkioStats struct { - IoServiceBytesRecursive []*BlkioStatsEntry `protobuf:"bytes,1,rep,name=io_service_bytes_recursive,json=ioServiceBytesRecursive" json:"io_service_bytes_recursive,omitempty"` - IoServicedRecursive []*BlkioStatsEntry `protobuf:"bytes,2,rep,name=io_serviced_recursive,json=ioServicedRecursive" json:"io_serviced_recursive,omitempty"` - IoQueuedRecursive []*BlkioStatsEntry `protobuf:"bytes,3,rep,name=io_queued_recursive,json=ioQueuedRecursive" json:"io_queued_recursive,omitempty"` - IoServiceTimeRecursive []*BlkioStatsEntry `protobuf:"bytes,4,rep,name=io_service_time_recursive,json=ioServiceTimeRecursive" json:"io_service_time_recursive,omitempty"` - IoWaitTimeRecursive []*BlkioStatsEntry `protobuf:"bytes,5,rep,name=io_wait_time_recursive,json=ioWaitTimeRecursive" json:"io_wait_time_recursive,omitempty"` - IoMergedRecursive []*BlkioStatsEntry `protobuf:"bytes,6,rep,name=io_merged_recursive,json=ioMergedRecursive" json:"io_merged_recursive,omitempty"` - IoTimeRecursive []*BlkioStatsEntry `protobuf:"bytes,7,rep,name=io_time_recursive,json=ioTimeRecursive" json:"io_time_recursive,omitempty"` - SectorsRecursive []*BlkioStatsEntry `protobuf:"bytes,8,rep,name=sectors_recursive,json=sectorsRecursive" json:"sectors_recursive,omitempty"` + IoServiceBytesRecursive []*BlkioStatsEntry `protobuf:"bytes,1,rep,name=io_service_bytes_recursive" json:"io_service_bytes_recursive,omitempty"` + IoServicedRecursive []*BlkioStatsEntry `protobuf:"bytes,2,rep,name=io_serviced_recursive" json:"io_serviced_recursive,omitempty"` + IoQueuedRecursive []*BlkioStatsEntry `protobuf:"bytes,3,rep,name=io_queued_recursive" json:"io_queued_recursive,omitempty"` + IoServiceTimeRecursive []*BlkioStatsEntry `protobuf:"bytes,4,rep,name=io_service_time_recursive" json:"io_service_time_recursive,omitempty"` + IoWaitTimeRecursive []*BlkioStatsEntry `protobuf:"bytes,5,rep,name=io_wait_time_recursive" json:"io_wait_time_recursive,omitempty"` + IoMergedRecursive []*BlkioStatsEntry `protobuf:"bytes,6,rep,name=io_merged_recursive" json:"io_merged_recursive,omitempty"` + IoTimeRecursive []*BlkioStatsEntry `protobuf:"bytes,7,rep,name=io_time_recursive" json:"io_time_recursive,omitempty"` + SectorsRecursive []*BlkioStatsEntry `protobuf:"bytes,8,rep,name=sectors_recursive" json:"sectors_recursive,omitempty"` } func (m *BlkioStats) Reset() { *m = BlkioStats{} } func (m *BlkioStats) String() string { return proto.CompactTextString(m) } func (*BlkioStats) ProtoMessage() {} -func (*BlkioStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } +func (*BlkioStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } func (m *BlkioStats) GetIoServiceBytesRecursive() []*BlkioStatsEntry { if m != nil { @@ -681,7 +707,7 @@ func (m *BlkioStats) GetSectorsRecursive() []*BlkioStatsEntry { type HugetlbStats struct { Usage uint64 `protobuf:"varint,1,opt,name=usage" json:"usage,omitempty"` - MaxUsage uint64 `protobuf:"varint,2,opt,name=max_usage,json=maxUsage" json:"max_usage,omitempty"` + MaxUsage uint64 `protobuf:"varint,2,opt,name=max_usage" json:"max_usage,omitempty"` Failcnt uint64 `protobuf:"varint,3,opt,name=failcnt" json:"failcnt,omitempty"` Limit uint64 `protobuf:"varint,4,opt,name=limit" json:"limit,omitempty"` } @@ -689,20 +715,20 @@ type HugetlbStats struct { func (m *HugetlbStats) Reset() { *m = HugetlbStats{} } func (m *HugetlbStats) String() string { return proto.CompactTextString(m) } func (*HugetlbStats) ProtoMessage() {} -func (*HugetlbStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } +func (*HugetlbStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } type CgroupStats struct { - CpuStats *CpuStats `protobuf:"bytes,1,opt,name=cpu_stats,json=cpuStats" json:"cpu_stats,omitempty"` - MemoryStats *MemoryStats `protobuf:"bytes,2,opt,name=memory_stats,json=memoryStats" json:"memory_stats,omitempty"` - BlkioStats *BlkioStats `protobuf:"bytes,3,opt,name=blkio_stats,json=blkioStats" json:"blkio_stats,omitempty"` - HugetlbStats map[string]*HugetlbStats `protobuf:"bytes,4,rep,name=hugetlb_stats,json=hugetlbStats" json:"hugetlb_stats,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - PidsStats *PidsStats `protobuf:"bytes,5,opt,name=pids_stats,json=pidsStats" json:"pids_stats,omitempty"` + CpuStats *CpuStats `protobuf:"bytes,1,opt,name=cpu_stats" json:"cpu_stats,omitempty"` + MemoryStats *MemoryStats `protobuf:"bytes,2,opt,name=memory_stats" json:"memory_stats,omitempty"` + BlkioStats *BlkioStats `protobuf:"bytes,3,opt,name=blkio_stats" json:"blkio_stats,omitempty"` + HugetlbStats map[string]*HugetlbStats `protobuf:"bytes,4,rep,name=hugetlb_stats" json:"hugetlb_stats,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + PidsStats *PidsStats `protobuf:"bytes,5,opt,name=pids_stats" json:"pids_stats,omitempty"` } func (m *CgroupStats) Reset() { *m = CgroupStats{} } func (m *CgroupStats) String() string { return proto.CompactTextString(m) } func (*CgroupStats) ProtoMessage() {} -func (*CgroupStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } +func (*CgroupStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } func (m *CgroupStats) GetCpuStats() *CpuStats { if m != nil { @@ -740,15 +766,15 @@ func (m *CgroupStats) GetPidsStats() *PidsStats { } type StatsResponse struct { - NetworkStats []*NetworkStats `protobuf:"bytes,1,rep,name=network_stats,json=networkStats" json:"network_stats,omitempty"` - CgroupStats *CgroupStats `protobuf:"bytes,2,opt,name=cgroup_stats,json=cgroupStats" json:"cgroup_stats,omitempty"` + NetworkStats []*NetworkStats `protobuf:"bytes,1,rep,name=network_stats" json:"network_stats,omitempty"` + CgroupStats *CgroupStats `protobuf:"bytes,2,opt,name=cgroup_stats" json:"cgroup_stats,omitempty"` Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp" json:"timestamp,omitempty"` } func (m *StatsResponse) Reset() { *m = StatsResponse{} } func (m *StatsResponse) String() string { return proto.CompactTextString(m) } func (*StatsResponse) ProtoMessage() {} -func (*StatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } +func (*StatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } func (m *StatsResponse) GetNetworkStats() []*NetworkStats { if m != nil { @@ -771,9 +797,11 @@ type StatsRequest struct { func (m *StatsRequest) Reset() { *m = StatsRequest{} } func (m *StatsRequest) String() string { return proto.CompactTextString(m) } func (*StatsRequest) ProtoMessage() {} -func (*StatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } +func (*StatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } func init() { + proto.RegisterType((*GetServerVersionRequest)(nil), "types.GetServerVersionRequest") + proto.RegisterType((*GetServerVersionResponse)(nil), "types.GetServerVersionResponse") proto.RegisterType((*UpdateProcessRequest)(nil), "types.UpdateProcessRequest") proto.RegisterType((*UpdateProcessResponse)(nil), "types.UpdateProcessResponse") proto.RegisterType((*CreateContainerRequest)(nil), "types.CreateContainerRequest") @@ -824,6 +852,7 @@ var _ grpc.ClientConn // Client API for API service type APIClient interface { + GetServerVersion(ctx context.Context, in *GetServerVersionRequest, opts ...grpc.CallOption) (*GetServerVersionResponse, error) CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) UpdateContainer(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error) Signal(ctx context.Context, in *SignalRequest, opts ...grpc.CallOption) (*SignalResponse, error) @@ -845,6 +874,15 @@ func NewAPIClient(cc *grpc.ClientConn) APIClient { return &aPIClient{cc} } +func (c *aPIClient) GetServerVersion(ctx context.Context, in *GetServerVersionRequest, opts ...grpc.CallOption) (*GetServerVersionResponse, error) { + out := new(GetServerVersionResponse) + err := grpc.Invoke(ctx, "/types.API/GetServerVersion", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *aPIClient) CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) { out := new(CreateContainerResponse) err := grpc.Invoke(ctx, "/types.API/CreateContainer", in, out, c.cc, opts...) @@ -970,6 +1008,7 @@ func (c *aPIClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.Ca // Server API for API service type APIServer interface { + GetServerVersion(context.Context, *GetServerVersionRequest) (*GetServerVersionResponse, error) CreateContainer(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error) UpdateContainer(context.Context, *UpdateContainerRequest) (*UpdateContainerResponse, error) Signal(context.Context, *SignalRequest) (*SignalResponse, error) @@ -987,6 +1026,18 @@ func RegisterAPIServer(s *grpc.Server, srv APIServer) { s.RegisterService(&_API_serviceDesc, srv) } +func _API_GetServerVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) { + in := new(GetServerVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + out, err := srv.(APIServer).GetServerVersion(ctx, in) + if err != nil { + return nil, err + } + return out, nil +} + func _API_CreateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) { in := new(CreateContainerRequest) if err := dec(in); err != nil { @@ -1132,6 +1183,10 @@ var _API_serviceDesc = grpc.ServiceDesc{ ServiceName: "types.API", HandlerType: (*APIServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "GetServerVersion", + Handler: _API_GetServerVersion_Handler, + }, { MethodName: "CreateContainer", Handler: _API_CreateContainer_Handler, @@ -1183,144 +1238,148 @@ var _API_serviceDesc = grpc.ServiceDesc{ } var fileDescriptor0 = []byte{ - // 2212 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x39, 0x4b, 0x73, 0x1c, 0x49, - 0xd1, 0x9e, 0xa7, 0x34, 0x39, 0x0f, 0x49, 0x6d, 0x3d, 0xc6, 0xb3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, 0x31, - 0xb2, 0xd3, 0x54, 0x46, 0xa0, 0xee, 0x19, 0x84, 0x9b, 0x43, 0x43, 0xb2, 0x2f, 0x1d, 0x17, 0x28, - 0x81, 0xaa, 0x3a, 0x81, 0xca, 0xe9, 0xd2, 0xd5, 0xe9, 0xa2, 0x12, 0xab, 0x6e, 0x12, 0xab, 0xa4, - 0xb4, 0x31, 0xaf, 0xf4, 0xf7, 0x55, 0xe8, 0x7c, 0xce, 0xf8, 0x55, 0x92, 0x5d, 0x88, 0x42, 0xc9, - 0x97, 0xde, 0x7c, 0x0f, 0x60, 0x3d, 0xbb, 0x1e, 0x9e, 0xdf, 0x70, 0x95, 0x18, 0x75, 0xac, 0xcb, - 0xeb, 0x17, 0x02, 0x74, 0x1e, 0x02, 0x20, 0xe9, 0xd8, 0xa7, 0xdb, 0x8e, 0x06, 0x97, 0x56, 0x76, - 0xad, 0x10, 0xce, 0x7b, 0xd0, 0xf2, 0xae, 0x87, 0xd8, 0x4f, 0x93, 0x8c, 0xb2, 0xb7, 0xee, 0xa1, - 0xa8, 0x57, 0x12, 0x16, 0x7b, 0x91, 0x18, 0x64, 0x49, 0x9a, 0xb2, 0xa0, 0x30, 0x2d, 0xbb, 0x7e, - 0x49, 0x08, 0xa1, 0xf5, 0xb4, 0xd0, 0xda, 0x24, 0xad, 0xdc, 0x68, 0x45, 0x52, 0xaa, 0xb4, 0xae, - 0xa9, 0x43, 0xd9, 0x5a, 0x4f, 0xb5, 0xd6, 0x75, 0xd2, 0xca, 0x2d, 0xad, 0xa7, 0x46, 0x6b, 0xab, - 0xd8, 0xab, 0xb4, 0xba, 0x7f, 0xa9, 0xc0, 0x3a, 0xa6, 0xe5, 0x59, 0xee, 0x8f, 0x19, 0xde, 0x60, - 0x6d, 0x8e, 0x29, 0x1c, 0x0d, 0x67, 0x02, 0x54, 0x21, 0x03, 0x89, 0x22, 0x86, 0xff, 0x83, 0x4e, - 0xca, 0x32, 0x4c, 0x56, 0xc5, 0x51, 0xc5,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19, 0x00, 0x00, + // 2285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x19, 0xcb, 0x72, 0x1c, 0x49, + 0xd1, 0xf3, 0x94, 0x26, 0xe7, 0x21, 0xa9, 0xfd, 0xd0, 0x78, 0x76, 0xed, 0x35, 0x1d, 0xc0, 0x1a, + 0x58, 0x84, 0x91, 0x77, 0x03, 0x07, 0x04, 0x44, 0xac, 0x65, 0xb3, 0x98, 0xb5, 0x16, 0xb9, 0x25, + 0xb1, 0x17, 0x22, 0x26, 0x5a, 0x33, 0xe5, 0x99, 0x46, 0x33, 0xdd, 0xbd, 0xdd, 0x35, 0xd2, 0xe8, + 0xc2, 0x11, 0x6e, 0xfc, 0x00, 0x11, 0x5c, 0xb8, 0x71, 0xe7, 0xc0, 0x17, 0xf0, 0x27, 0xc4, 0x5e, + 0xb8, 0x73, 0x24, 0xab, 0x32, 0xbb, 0xba, 0x7a, 0x1e, 0xd2, 0x72, 0x20, 0xb8, 0xec, 0x65, 0xa2, + 0x32, 0x2b, 0x2b, 0x33, 0x2b, 0xdf, 0x5d, 0x03, 0x0d, 0x3f, 0x0e, 0xf6, 0xe2, 0x24, 0x92, 0x91, + 0x53, 0x93, 0x57, 0xb1, 0x48, 0xdd, 0xfb, 0xb0, 0xfb, 0x89, 0x90, 0xc7, 0x22, 0xb9, 0x10, 0xc9, + 0xaf, 0x45, 0x92, 0x06, 0x51, 0xe8, 0x89, 0x2f, 0x66, 0x22, 0x95, 0xee, 0x1c, 0xba, 0xcb, 0x5b, + 0x69, 0x1c, 0x85, 0xa9, 0x70, 0xee, 0x40, 0x6d, 0xea, 0xff, 0x36, 0x4a, 0xba, 0xa5, 0x47, 0xa5, + 0xc7, 0x6d, 0x8f, 0x00, 0x8d, 0x0d, 0x42, 0xc4, 0x96, 0x19, 0xab, 0x00, 0x85, 0x8d, 0x7d, 0x39, + 0x18, 0x77, 0x2b,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x46, 0xe7, 0xc7, + 0xaa, 0x44, 0xd5, 0x75, 0x89, 0xd2, 0x6b, 0xa7, 0x8b, 0x17, 0x9b, 0x85, 0x32, 0xc0, 0xcc, 0xa3, + 0x9e, 0x92, 0x81, 0xee, 0x47, 0xb0, 0x71, 0xe8, 0x0f, 0xc6, 0x78, 0x0f, 0x75, 0x70, 0x10, 0x73, + 0x98, 0xe2, 0x41, 0xb5, 0x56, 0x42, 0xa6, 0x02, 0xed, 0x7d, 0xc5, 0xf5, 0x94, 0x21, 0xf7, 0x1c, + 0x1b, 0x33, 0xa5, 0x01, 0x27, 0xd3, 0x13, 0xac, 0x5c, 0x99, 0x41, 0xb2, 0x5c, 0x5a, 0x6e, 0xed, + 0x16, 0x0d, 0xba, 0x65, 0x63, 0x4a, 0x92, 0xb9, 0xd0, 0x65, 0x36, 0x60, 0x7d, 0xbc, 0x6c, 0xdb, + 0xfd, 0x03, 0xce, 0x4e, 0x34, 0x55, 0xdd, 0x38, 0x3b, 0xad, 0x9e, 0x07, 0xc8, 0x7c, 0x95, 0x82, + 0xf9, 0x9e, 0x42, 0x23, 0x11, 0x69, 0x34, 0x4b, 0xd0, 0xcc, 0xda, 0xb2, 0xcd, 0xfd, 0xbb, 0x59, + 0x26, 0x69, 0x59, 0x1e, 0xef, 0x7a, 0x39, 0x9d, 0xfb, 0x65, 0x19, 0x3a, 0xc5, 0x5d, 0x55, 0x97, + 0xce, 0x26, 0xe7, 0x41, 0xf4, 0x39, 0x8d, 0x83, 0x64, 0x3c, 0x1b, 0xa5, 0xb2, 0x0a, 0x6d, 0x79, + 0x8c, 0x5d, 0x07, 0x25, 0x51, 0x57, 0xc9, 0x11, 0xbc, 0x7b, 0x24, 0x92, 0x20, 0x1a, 0xf2, 0xc8, + 0x92, 0x23, 0x54, 0x19, 0x40, 0xe0, 0xcd, 0x2c, 0x92, 0x3e, 0x0f, 0xa0, 0x06, 0xd6, 0x73, 0x20, + 0xfa, 0x48, 0xc8, 0x03, 0xe5, 0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 0xe7, 0x69, 0xb6, 0x8b, 0x4f, + 0x72, 0x86, 0xed, 0x9a, 0xa7, 0x3e, 0xc3, 0x76, 0xed, 0x5b, 0xde, 0x2d, 0xe7, 0x57, 0xd0, 0x29, + 0x3e, 0x92, 0x39, 0x99, 0x91, 0x56, 0x3e, 0xf2, 0xf5, 0x1e, 0xac, 0xd9, 0x35, 0x0c, 0x3f, 0x84, + 0x1a, 0xbd, 0x7e, 0x65, 0x29, 0x67, 0x3f, 0x9a, 0xf5, 0xee, 0x14, 0x91, 0xe6, 0xd4, 0x13, 0xa8, + 0xd3, 0x87, 0x9d, 0x09, 0x80, 0xc2, 0x77, 0x5e, 0xaf, 0x65, 0x63, 0xdd, 0x5b, 0x4f, 0x4a, 0x99, + 0x9c, 0xb4, 0x20, 0x27, 0x5d, 0x25, 0xc7, 0x72, 0xce, 0x59, 0x5d, 0xff, 0xa3, 0xf5, 0xf4, 0x3f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xa3, 0xf6, 0xb8, 0xde, 0x1a, 0x00, 0x00, } diff --git a/components/engine/vendor/src/github.com/docker/containerd/api/grpc/types/api.proto b/components/engine/vendor/src/github.com/docker/containerd/api/grpc/types/api.proto index da26b1be2b..d6f56e1043 100644 --- a/components/engine/vendor/src/github.com/docker/containerd/api/grpc/types/api.proto +++ b/components/engine/vendor/src/github.com/docker/containerd/api/grpc/types/api.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package types; service API { + rpc GetServerVersion(GetServerVersionRequest) returns (GetServerVersionResponse) {} rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse) {} rpc UpdateContainer(UpdateContainerRequest) returns (UpdateContainerResponse) {} rpc Signal(SignalRequest) returns (SignalResponse) {} @@ -16,6 +17,16 @@ service API { rpc Stats(StatsRequest) returns (StatsResponse) {} } +message GetServerVersionRequest { +} + +message GetServerVersionResponse { + uint32 major = 1; + uint32 minor = 2; + uint32 patch = 3; + string revision = 4; +} + message UpdateProcessRequest { string id = 1; string pid = 2; diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/apparmor/apparmor.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/apparmor/apparmor.go index 22c17f5272..82ed1a68a6 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/apparmor/apparmor.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/apparmor/apparmor.go @@ -7,6 +7,7 @@ package apparmor // #include import "C" import ( + "fmt" "io/ioutil" "os" "unsafe" @@ -32,7 +33,7 @@ func ApplyProfile(name string) error { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) if _, err := C.aa_change_onexec(cName); err != nil { - return err + return fmt.Errorf("apparmor failed to apply profile: %s", err) } return nil } diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/stats.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/stats.go index 797a923c38..b483f1bf98 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/stats.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/stats.go @@ -11,6 +11,7 @@ type ThrottlingData struct { ThrottledTime uint64 `json:"throttled_time,omitempty"` } +// CpuUsage denotes the usage of a CPU. // All CPU stats are aggregate since container inception. type CpuUsage struct { // Total CPU time consumed. diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/utils.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/utils.go index 235273299f..491faf287e 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/utils.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/utils.go @@ -18,11 +18,14 @@ import ( const cgroupNamePrefix = "name=" -// https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt +// https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt func FindCgroupMountpoint(subsystem string) (string, error) { // We are not using mount.GetMounts() because it's super-inefficient, // parsing it directly sped up x10 times because of not using Sscanf. // It was one of two major performance drawbacks in container start. + if !isSubsystemAvailable(subsystem) { + return "", NewNotFoundError(subsystem) + } f, err := os.Open("/proc/self/mountinfo") if err != nil { return "", err @@ -47,6 +50,9 @@ func FindCgroupMountpoint(subsystem string) (string, error) { } func FindCgroupMountpointAndRoot(subsystem string) (string, string, error) { + if !isSubsystemAvailable(subsystem) { + return "", "", NewNotFoundError(subsystem) + } f, err := os.Open("/proc/self/mountinfo") if err != nil { return "", "", err @@ -70,6 +76,15 @@ func FindCgroupMountpointAndRoot(subsystem string) (string, string, error) { return "", "", NewNotFoundError(subsystem) } +func isSubsystemAvailable(subsystem string) bool { + cgroups, err := ParseCgroupFile("/proc/self/cgroup") + if err != nil { + return false + } + _, avail := cgroups[subsystem] + return avail +} + func FindCgroupMountpointDir() (string, error) { f, err := os.Open("/proc/self/mountinfo") if err != nil { @@ -124,7 +139,8 @@ func (m Mount) GetThisCgroupDir(cgroups map[string]string) (string, error) { func getCgroupMountsHelper(ss map[string]bool, mi io.Reader) ([]Mount, error) { res := make([]Mount, 0, len(ss)) scanner := bufio.NewScanner(mi) - for scanner.Scan() { + numFound := 0 + for scanner.Scan() && numFound < len(ss) { txt := scanner.Text() sepIdx := strings.Index(txt, " - ") if sepIdx == -1 { @@ -139,12 +155,15 @@ func getCgroupMountsHelper(ss map[string]bool, mi io.Reader) ([]Mount, error) { Root: fields[3], } for _, opt := range strings.Split(fields[len(fields)-1], ",") { + if !ss[opt] { + continue + } if strings.HasPrefix(opt, cgroupNamePrefix) { m.Subsystems = append(m.Subsystems, opt[len(cgroupNamePrefix):]) - } - if ss[opt] { + } else { m.Subsystems = append(m.Subsystems, opt) } + numFound++ } res = append(res, m) } @@ -161,19 +180,19 @@ func GetCgroupMounts() ([]Mount, error) { } defer f.Close() - all, err := GetAllSubsystems() + all, err := ParseCgroupFile("/proc/self/cgroup") if err != nil { return nil, err } allMap := make(map[string]bool) - for _, s := range all { + for s := range all { allMap[s] = true } return getCgroupMountsHelper(allMap, f) } -// Returns all the cgroup subsystems supported by the kernel +// GetAllSubsystems returns all the cgroup subsystems supported by the kernel func GetAllSubsystems() ([]string, error) { f, err := os.Open("/proc/cgroups") if err != nil { @@ -199,7 +218,7 @@ func GetAllSubsystems() ([]string, error) { return subsystems, nil } -// Returns the relative path to the cgroup docker is running in. +// GetThisCgroupDir returns the relative path to the cgroup docker is running in. func GetThisCgroupDir(subsystem string) (string, error) { cgroups, err := ParseCgroupFile("/proc/self/cgroup") if err != nil { diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config.go index f83f638e3f..ef232222ca 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config.go @@ -33,7 +33,7 @@ type Seccomp struct { Syscalls []*Syscall `json:"syscalls"` } -// An action to be taken upon rule match in Seccomp +// Action is taken upon rule match in Seccomp type Action int const ( @@ -44,7 +44,7 @@ const ( Trace ) -// A comparison operator to be used when matching syscall arguments in Seccomp +// Operator is a comparison operator to be used when matching syscall arguments in Seccomp type Operator int const ( @@ -57,7 +57,7 @@ const ( MaskEqualTo ) -// A rule to match a specific syscall argument in Seccomp +// Arg is a rule to match a specific syscall argument in Seccomp type Arg struct { Index uint `json:"index"` Value uint64 `json:"value"` @@ -65,7 +65,7 @@ type Arg struct { Op Operator `json:"op"` } -// An rule to match a syscall in Seccomp +// Syscall is a rule to match a syscall in Seccomp type Syscall struct { Name string `json:"name"` Action Action `json:"action"` @@ -249,10 +249,11 @@ func (hooks Hooks) MarshalJSON() ([]byte, error) { // HookState is the payload provided to a hook on execution. type HookState struct { - Version string `json:"version"` - ID string `json:"id"` - Pid int `json:"pid"` - Root string `json:"root"` + Version string `json:"ociVersion"` + ID string `json:"id"` + Pid int `json:"pid"` + Root string `json:"root"` + BundlePath string `json:"bundlePath"` } type Hook interface { @@ -260,7 +261,7 @@ type Hook interface { Run(HookState) error } -// NewFunctionHooks will call the provided function when the hook is run. +// NewFunctionHook will call the provided function when the hook is run. func NewFunctionHook(f func(HookState) error) FuncHook { return FuncHook{ run: f, @@ -283,7 +284,7 @@ type Command struct { Timeout *time.Duration `json:"timeout"` } -// NewCommandHooks will execute the provided command when the hook is run. +// NewCommandHook will execute the provided command when the hook is run. func NewCommandHook(cmd Command) CommandHook { return CommandHook{ Command: cmd, @@ -307,7 +308,11 @@ func (c Command) Run(s HookState) error { } errC := make(chan error, 1) go func() { - errC <- cmd.Run() + out, err := cmd.CombinedOutput() + if err != nil { + err = fmt.Errorf("%s: %s", err, out) + } + errC <- err }() if c.Timeout != nil { select { diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config_unix.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config_unix.go index c447f3ef29..a60554a7b9 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config_unix.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/config_unix.go @@ -4,7 +4,7 @@ package configs import "fmt" -// Gets the root uid for the process on host which could be non-zero +// HostUID gets the root uid for the process on host which could be non-zero // when user namespaces are enabled. func (c Config) HostUID() (int, error) { if c.Namespaces.Contains(NEWUSER) { @@ -21,7 +21,7 @@ func (c Config) HostUID() (int, error) { return 0, nil } -// Gets the root gid for the process on host which could be non-zero +// HostGID gets the root gid for the process on host which could be non-zero // when user namespaces are enabled. func (c Config) HostGID() (int, error) { if c.Namespaces.Contains(NEWUSER) { diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/device_defaults.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/device_defaults.go index e45299264c..ba1f437f3b 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/device_defaults.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/configs/device_defaults.go @@ -3,7 +3,7 @@ package configs var ( - // These are devices that are to be both allowed and created. + // DefaultSimpleDevices are devices that are to be both allowed and created. DefaultSimpleDevices = []*Device{ // /dev/null and zero { diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go index fedbae4f60..684bb41bdc 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/label/label.go @@ -21,6 +21,10 @@ func SetProcessLabel(processLabel string) error { return nil } +func GetFileLabel(path string) (string, error) { + return "", nil +} + func SetFileLabel(path string, fileLabel string) error { return nil } diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/label/label_selinux.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/label/label_selinux.go index e561cbfed7..4493bda774 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/label/label_selinux.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/label/label_selinux.go @@ -94,6 +94,11 @@ func GetProcessLabel() (string, error) { return selinux.Getexeccon() } +// GetFileLabel returns the label for specified path +func GetFileLabel(path string) (string, error) { + return selinux.Getfilecon(path) +} + // SetFileLabel modifies the "path" label to the specified file label func SetFileLabel(path string, fileLabel string) error { if selinux.SelinuxEnabled() && fileLabel != "" { @@ -102,7 +107,7 @@ func SetFileLabel(path string, fileLabel string) error { return nil } -// Tell the kernel the label for all files to be created +// SetFileCreateLabel tells the kernel the label for all files to be created func SetFileCreateLabel(fileLabel string) error { if selinux.SelinuxEnabled() { return selinux.Setfscreatecon(fileLabel) @@ -110,7 +115,7 @@ func SetFileCreateLabel(fileLabel string) error { return nil } -// Change the label of path to the filelabel string. +// Relabel changes the label of path to the filelabel string. // It changes the MCS label to s0 if shared is true. // This will allow all containers to share the content. func Relabel(path string, fileLabel string, shared bool) error { diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/selinux/selinux.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/selinux/selinux.go index 3bdce10ca3..2a18e2ad89 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/selinux/selinux.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/selinux/selinux.go @@ -13,9 +13,9 @@ import ( "regexp" "strconv" "strings" + "sync" "syscall" - "github.com/docker/docker/pkg/mount" "github.com/opencontainers/runc/libcontainer/system" ) @@ -35,6 +35,7 @@ const ( var ( assignRegex = regexp.MustCompile(`^([^=]+)=(.*)$`) mcsList = make(map[string]bool) + mcsLock sync.Mutex selinuxfs = "unknown" selinuxEnabled = false // Stores whether selinux is currently enabled selinuxEnabledChecked = false // Stores whether selinux enablement has been checked or established yet @@ -58,16 +59,31 @@ func getSelinuxMountPoint() string { } selinuxfs = "" - mounts, err := mount.GetMounts() + f, err := os.Open("/proc/self/mountinfo") if err != nil { return selinuxfs } - for _, mount := range mounts { - if mount.Fstype == "selinuxfs" { - selinuxfs = mount.Mountpoint - break + defer f.Close() + + scanner := bufio.NewScanner(f) + for scanner.Scan() { + txt := scanner.Text() + // Safe as mountinfo encodes mountpoints with spaces as \040. + sepIdx := strings.Index(txt, " - ") + if sepIdx == -1 { + continue } + if !strings.Contains(txt[sepIdx:], "selinuxfs") { + continue + } + fields := strings.Split(txt, " ") + if len(fields) < 5 { + continue + } + selinuxfs = fields[4] + break } + if selinuxfs != "" { var buf syscall.Statfs_t syscall.Statfs(selinuxfs, &buf) @@ -267,6 +283,8 @@ func SelinuxGetEnforceMode() int { } func mcsAdd(mcs string) error { + mcsLock.Lock() + defer mcsLock.Unlock() if mcsList[mcs] { return fmt.Errorf("MCS Label already exists") } @@ -275,7 +293,9 @@ func mcsAdd(mcs string) error { } func mcsDelete(mcs string) { + mcsLock.Lock() mcsList[mcs] = false + mcsLock.Unlock() } func IntToMcs(id int, catRange uint32) string { @@ -291,7 +311,7 @@ func IntToMcs(id int, catRange uint32) string { for ORD > TIER { ORD = ORD - TIER - TIER -= 1 + TIER-- } TIER = SETSIZE - TIER ORD = ORD + TIER @@ -432,7 +452,7 @@ func badPrefix(fpath string) error { return nil } -// Change the fpath file object to the SELinux label scon. +// Chcon changes the fpath file object to the SELinux label scon. // If the fpath is a directory and recurse is true Chcon will walk the // directory tree setting the label func Chcon(fpath string, scon string, recurse bool) error { @@ -466,14 +486,14 @@ func DupSecOpt(src string) []string { con["level"] == "" { return nil } - return []string{"label:user:" + con["user"], - "label:role:" + con["role"], - "label:type:" + con["type"], - "label:level:" + con["level"]} + return []string{"label=user:" + con["user"], + "label=role:" + con["role"], + "label=type:" + con["type"], + "label=level:" + con["level"]} } // DisableSecOpt returns a security opt that can be used to disabling SELinux // labeling support for future container processes func DisableSecOpt() []string { - return []string{"label:disable"} + return []string{"label=disable"} } diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/system/linux.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/system/linux.go index 8b199d92ed..1afc52b4bd 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/system/linux.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/system/linux.go @@ -100,17 +100,12 @@ func Setctty() error { return nil } -/* - * Detect whether we are currently running in a user namespace. - * Copied from github.com/lxc/lxd/shared/util.go - */ +// RunningInUserNS detects whether we are currently running in a user namespace. +// Copied from github.com/lxc/lxd/shared/util.go func RunningInUserNS() bool { file, err := os.Open("/proc/self/uid_map") if err != nil { - /* - * This kernel-provided file only exists if user namespaces are - * supported - */ + // This kernel-provided file only exists if user namespaces are supported return false } defer file.Close() diff --git a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/system/sysconfig.go b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/system/sysconfig.go index b3a07cba3e..3e3d7e01e3 100644 --- a/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/system/sysconfig.go +++ b/components/engine/vendor/src/github.com/opencontainers/runc/libcontainer/system/sysconfig.go @@ -10,3 +10,7 @@ import "C" func GetClockTicks() int { return int(C.sysconf(C._SC_CLK_TCK)) } + +func GetLongBit() int { + return int(C.sysconf(C._SC_LONG_BIT)) +} From dbf25e32d60d2fa337276af2859f3faddba56104 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 9 May 2016 15:17:10 -0700 Subject: [PATCH 2/3] Fix containerd proto for connection Signed-off-by: Michael Crosby Upstream-commit: 6889c3276c6895a8440dc8883b8cd608793199f3 Component: engine --- .../integration-cli/docker_cli_daemon_experimental_test.go | 6 +++--- .../engine/integration-cli/docker_cli_daemon_test.go | 2 +- components/engine/libcontainerd/remote_linux.go | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/components/engine/integration-cli/docker_cli_daemon_experimental_test.go b/components/engine/integration-cli/docker_cli_daemon_experimental_test.go index fea887d720..b191f07222 100644 --- a/components/engine/integration-cli/docker_cli_daemon_experimental_test.go +++ b/components/engine/integration-cli/docker_cli_daemon_experimental_test.go @@ -33,7 +33,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithKilledRunningContainer(t *check } // kill the container - runCmd := exec.Command(ctrBinary, "--address", "/var/run/docker/libcontainerd/docker-containerd.sock", "containers", "kill", cid) + runCmd := exec.Command(ctrBinary, "--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock", "containers", "kill", cid) if out, ec, err := runCommandWithOutput(runCmd); err != nil { t.Fatalf("Failed to run ctr, ExitCode: %d, err: '%v' output: '%s' cid: '%s'\n", ec, err, out, cid) } @@ -120,7 +120,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithPausedRunningContainer(t *check } // kill the container - runCmd := exec.Command(ctrBinary, "--address", "/var/run/docker/libcontainerd/docker-containerd.sock", "containers", "pause", cid) + runCmd := exec.Command(ctrBinary, "--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock", "containers", "pause", cid) if out, ec, err := runCommandWithOutput(runCmd); err != nil { t.Fatalf("Failed to run ctr, ExitCode: %d, err: '%v' output: '%s' cid: '%s'\n", ec, err, out, cid) } @@ -170,7 +170,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithUnpausedRunningContainer(t *che } // resume the container - runCmd := exec.Command(ctrBinary, "--address", "/var/run/docker/libcontainerd/docker-containerd.sock", "containers", "resume", cid) + runCmd := exec.Command(ctrBinary, "--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock", "containers", "resume", cid) if out, ec, err := runCommandWithOutput(runCmd); err != nil { t.Fatalf("Failed to run ctr, ExitCode: %d, err: '%v' output: '%s' cid: '%s'\n", ec, err, out, cid) } diff --git a/components/engine/integration-cli/docker_cli_daemon_test.go b/components/engine/integration-cli/docker_cli_daemon_test.go index 13327d5265..edf56171c9 100644 --- a/components/engine/integration-cli/docker_cli_daemon_test.go +++ b/components/engine/integration-cli/docker_cli_daemon_test.go @@ -1550,7 +1550,7 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonAndContainerKill(c *chec c.Assert(strings.Contains(string(mountOut), id), check.Equals, true, comment) // kill the container - runCmd := exec.Command(ctrBinary, "--address", "/var/run/docker/libcontainerd/docker-containerd.sock", "containers", "kill", id) + runCmd := exec.Command(ctrBinary, "--address", "unix:///var/run/docker/libcontainerd/docker-containerd.sock", "containers", "kill", id) if out, ec, err := runCommandWithOutput(runCmd); err != nil { c.Fatalf("Failed to run ctr, ExitCode: %d, err: %v output: %s id: %s\n", ec, err, out, id) } diff --git a/components/engine/libcontainerd/remote_linux.go b/components/engine/libcontainerd/remote_linux.go index 84d419d07d..d19372d7bd 100644 --- a/components/engine/libcontainerd/remote_linux.go +++ b/components/engine/libcontainerd/remote_linux.go @@ -349,7 +349,12 @@ func (r *remote) runContainerdDaemon() error { } // Start a new instance - args := []string{"-l", r.rpcAddr, "--runtime", "docker-runc", "--metrics-interval=0"} + args := []string{ + "-l", fmt.Sprintf("unix://%s", r.rpcAddr), + "--shim", "docker-containerd-shim", + "--runtime", "docker-runc", + "--metrics-interval=0", + } if r.debugLog { args = append(args, "--debug") } From 820ddc1c927c1685eac8dd23a03c1cf6353ee2fe Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 9 May 2016 15:21:41 -0700 Subject: [PATCH 3/3] Update protobufs to 8d92cf5fc15a4382f8964b08e1f42a This syncs the protobuf version with the one that is used with containerd. Signed-off-by: Michael Crosby Upstream-commit: 4e290986cdf08a34ad508473bab702793503fa6b Component: engine --- components/engine/hack/vendor.sh | 2 +- .../github.com/golang/protobuf/proto/Makefile | 2 +- .../golang/protobuf/proto/decode.go | 9 +- .../golang/protobuf/proto/encode.go | 8 +- .../github.com/golang/protobuf/proto/equal.go | 28 ++- .../github.com/golang/protobuf/proto/lib.go | 11 ++ .../golang/protobuf/proto/properties.go | 8 +- .../github.com/golang/protobuf/proto/text.go | 166 ++++++++++++++---- .../golang/protobuf/proto/text_parser.go | 109 ++++++++++-- 9 files changed, 273 insertions(+), 70 deletions(-) diff --git a/components/engine/hack/vendor.sh b/components/engine/hack/vendor.sh index ecce8812f1..4deefc58d3 100755 --- a/components/engine/hack/vendor.sh +++ b/components/engine/hack/vendor.sh @@ -67,7 +67,7 @@ clone git github.com/seccomp/libseccomp-golang 1b506fc7c24eec5a3693cdcbed40d9c22 clone git github.com/coreos/go-systemd v4 clone git github.com/godbus/dbus v4.0.0 clone git github.com/syndtr/gocapability 2c00daeb6c3b45114c80ac44119e7b8801fdd852 -clone git github.com/golang/protobuf 68415e7123da32b07eab49c96d2c4d6158360e9b +clone git github.com/golang/protobuf 8d92cf5fc15a4382f8964b08e1f42a75c0591aa3 # gelf logging driver deps clone git github.com/Graylog2/go-gelf aab2f594e4585d43468ac57287b0dece9d806883 diff --git a/components/engine/vendor/src/github.com/golang/protobuf/proto/Makefile b/components/engine/vendor/src/github.com/golang/protobuf/proto/Makefile index f1f06564a1..e2e0651a93 100644 --- a/components/engine/vendor/src/github.com/golang/protobuf/proto/Makefile +++ b/components/engine/vendor/src/github.com/golang/protobuf/proto/Makefile @@ -39,5 +39,5 @@ test: install generate-test-pbs generate-test-pbs: make install make -C testdata - protoc --go_out=Mtestdata/test.proto=github.com/golang/protobuf/proto/testdata:. proto3_proto/proto3.proto + protoc --go_out=Mtestdata/test.proto=github.com/golang/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. proto3_proto/proto3.proto make diff --git a/components/engine/vendor/src/github.com/golang/protobuf/proto/decode.go b/components/engine/vendor/src/github.com/golang/protobuf/proto/decode.go index 5810782fd8..f94b9f416e 100644 --- a/components/engine/vendor/src/github.com/golang/protobuf/proto/decode.go +++ b/components/engine/vendor/src/github.com/golang/protobuf/proto/decode.go @@ -768,10 +768,11 @@ func (o *Buffer) dec_new_map(p *Properties, base structPointer) error { } } keyelem, valelem := keyptr.Elem(), valptr.Elem() - if !keyelem.IsValid() || !valelem.IsValid() { - // We did not decode the key or the value in the map entry. - // Either way, it's an invalid map entry. - return fmt.Errorf("proto: bad map data: missing key/val") + if !keyelem.IsValid() { + keyelem = reflect.Zero(p.mtype.Key()) + } + if !valelem.IsValid() { + valelem = reflect.Zero(p.mtype.Elem()) } v.SetMapIndex(keyelem, valelem) diff --git a/components/engine/vendor/src/github.com/golang/protobuf/proto/encode.go b/components/engine/vendor/src/github.com/golang/protobuf/proto/encode.go index 231b07401a..eb7e0474ef 100644 --- a/components/engine/vendor/src/github.com/golang/protobuf/proto/encode.go +++ b/components/engine/vendor/src/github.com/golang/protobuf/proto/encode.go @@ -64,6 +64,10 @@ var ( // a struct with a repeated field containing a nil element. errRepeatedHasNil = errors.New("proto: repeated field has nil element") + // errOneofHasNil is the error returned if Marshal is called with + // a struct with a oneof field containing a nil element. + errOneofHasNil = errors.New("proto: oneof field has nil value") + // ErrNil is the error returned if Marshal is called with nil. ErrNil = errors.New("proto: Marshal called with nil") ) @@ -1222,7 +1226,9 @@ func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { // Do oneof fields. if prop.oneofMarshaler != nil { m := structPointer_Interface(base, prop.stype).(Message) - if err := prop.oneofMarshaler(m, o); err != nil { + if err := prop.oneofMarshaler(m, o); err == ErrNil { + return errOneofHasNil + } else if err != nil { return err } } diff --git a/components/engine/vendor/src/github.com/golang/protobuf/proto/equal.go b/components/engine/vendor/src/github.com/golang/protobuf/proto/equal.go index cc3f2c95a7..f5db1def3c 100644 --- a/components/engine/vendor/src/github.com/golang/protobuf/proto/equal.go +++ b/components/engine/vendor/src/github.com/golang/protobuf/proto/equal.go @@ -50,7 +50,9 @@ Equality is defined in this way: are equal, and extensions sets are equal. - Two set scalar fields are equal iff their values are equal. If the fields are of a floating-point type, remember that - NaN != x for all x, including NaN. + NaN != x for all x, including NaN. If the message is defined + in a proto3 .proto file, fields are not "set"; specifically, + zero length proto3 "bytes" fields are equal (nil == {}). - Two repeated fields are equal iff their lengths are the same, and their corresponding elements are equal (a "bytes" field, although represented by []byte, is not a repeated field) @@ -88,6 +90,7 @@ func Equal(a, b Message) bool { // v1 and v2 are known to have the same type. func equalStruct(v1, v2 reflect.Value) bool { + sprop := GetProperties(v1.Type()) for i := 0; i < v1.NumField(); i++ { f := v1.Type().Field(i) if strings.HasPrefix(f.Name, "XXX_") { @@ -113,7 +116,7 @@ func equalStruct(v1, v2 reflect.Value) bool { } f1, f2 = f1.Elem(), f2.Elem() } - if !equalAny(f1, f2) { + if !equalAny(f1, f2, sprop.Prop[i]) { return false } } @@ -140,7 +143,8 @@ func equalStruct(v1, v2 reflect.Value) bool { } // v1 and v2 are known to have the same type. -func equalAny(v1, v2 reflect.Value) bool { +// prop may be nil. +func equalAny(v1, v2 reflect.Value, prop *Properties) bool { if v1.Type() == protoMessageType { m1, _ := v1.Interface().(Message) m2, _ := v2.Interface().(Message) @@ -163,7 +167,7 @@ func equalAny(v1, v2 reflect.Value) bool { if e1.Type() != e2.Type() { return false } - return equalAny(e1, e2) + return equalAny(e1, e2, nil) case reflect.Map: if v1.Len() != v2.Len() { return false @@ -174,16 +178,22 @@ func equalAny(v1, v2 reflect.Value) bool { // This key was not found in the second map. return false } - if !equalAny(v1.MapIndex(key), val2) { + if !equalAny(v1.MapIndex(key), val2, nil) { return false } } return true case reflect.Ptr: - return equalAny(v1.Elem(), v2.Elem()) + return equalAny(v1.Elem(), v2.Elem(), prop) case reflect.Slice: if v1.Type().Elem().Kind() == reflect.Uint8 { // short circuit: []byte + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value. + if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 { + return true + } if v1.IsNil() != v2.IsNil() { return false } @@ -194,7 +204,7 @@ func equalAny(v1, v2 reflect.Value) bool { return false } for i := 0; i < v1.Len(); i++ { - if !equalAny(v1.Index(i), v2.Index(i)) { + if !equalAny(v1.Index(i), v2.Index(i), prop) { return false } } @@ -229,7 +239,7 @@ func equalExtensions(base reflect.Type, em1, em2 map[int32]Extension) bool { if m1 != nil && m2 != nil { // Both are unencoded. - if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2)) { + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { return false } continue @@ -257,7 +267,7 @@ func equalExtensions(base reflect.Type, em1, em2 map[int32]Extension) bool { log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err) return false } - if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2)) { + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { return false } } diff --git a/components/engine/vendor/src/github.com/golang/protobuf/proto/lib.go b/components/engine/vendor/src/github.com/golang/protobuf/proto/lib.go index dcabe3bc0d..0de8f8dffd 100644 --- a/components/engine/vendor/src/github.com/golang/protobuf/proto/lib.go +++ b/components/engine/vendor/src/github.com/golang/protobuf/proto/lib.go @@ -70,6 +70,12 @@ for a protocol buffer variable v: with distinguished wrapper types for each possible field value. - Marshal and Unmarshal are functions to encode and decode the wire format. +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Getters are only generated for message and oneof fields. + - Enum types do not get an Enum method. + The simplest way to describe this is to see an example. Given file test.proto, containing @@ -229,6 +235,7 @@ To create and play with a Test object: test := &pb.Test{ Label: proto.String("hello"), Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, Optionalgroup: &pb.Test_OptionalGroup{ RequiredField: proto.String("good bye"), }, @@ -881,3 +888,7 @@ func isProto3Zero(v reflect.Value) bool { } return false } + +// ProtoPackageIsVersion1 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const ProtoPackageIsVersion1 = true diff --git a/components/engine/vendor/src/github.com/golang/protobuf/proto/properties.go b/components/engine/vendor/src/github.com/golang/protobuf/proto/properties.go index d4531c0563..4fe2ec22e8 100644 --- a/components/engine/vendor/src/github.com/golang/protobuf/proto/properties.go +++ b/components/engine/vendor/src/github.com/golang/protobuf/proto/properties.go @@ -173,6 +173,7 @@ func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order type Properties struct { Name string // name of the field, for error messages OrigName string // original name before protocol compiler (always set) + JSONName string // name to use for JSON; determined by protoc Wire string WireType int Tag int @@ -229,8 +230,9 @@ func (p *Properties) String() string { if p.Packed { s += ",packed" } - if p.OrigName != p.Name { - s += ",name=" + p.OrigName + s += ",name=" + p.OrigName + if p.JSONName != p.OrigName { + s += ",json=" + p.JSONName } if p.proto3 { s += ",proto3" @@ -310,6 +312,8 @@ func (p *Properties) Parse(s string) { p.Packed = true case strings.HasPrefix(f, "name="): p.OrigName = f[5:] + case strings.HasPrefix(f, "json="): + p.JSONName = f[5:] case strings.HasPrefix(f, "enum="): p.Enum = f[5:] case f == "proto3": diff --git a/components/engine/vendor/src/github.com/golang/protobuf/proto/text.go b/components/engine/vendor/src/github.com/golang/protobuf/proto/text.go index 2336b144c1..37c953570d 100644 --- a/components/engine/vendor/src/github.com/golang/protobuf/proto/text.go +++ b/components/engine/vendor/src/github.com/golang/protobuf/proto/text.go @@ -175,7 +175,93 @@ type raw interface { Bytes() []byte } -func writeStruct(w *textWriter, sv reflect.Value) error { +func requiresQuotes(u string) bool { + // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. + for _, ch := range u { + switch { + case ch == '.' || ch == '/' || ch == '_': + continue + case '0' <= ch && ch <= '9': + continue + case 'A' <= ch && ch <= 'Z': + continue + case 'a' <= ch && ch <= 'z': + continue + default: + return true + } + } + return false +} + +// isAny reports whether sv is a google.protobuf.Any message +func isAny(sv reflect.Value) bool { + type wkt interface { + XXX_WellKnownType() string + } + t, ok := sv.Addr().Interface().(wkt) + return ok && t.XXX_WellKnownType() == "Any" +} + +// writeProto3Any writes an expanded google.protobuf.Any message. +// +// It returns (false, nil) if sv value can't be unmarshaled (e.g. because +// required messages are not linked in). +// +// It returns (true, error) when sv was written in expanded format or an error +// was encountered. +func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { + turl := sv.FieldByName("TypeUrl") + val := sv.FieldByName("Value") + if !turl.IsValid() || !val.IsValid() { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + b, ok := val.Interface().([]byte) + if !ok { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + parts := strings.Split(turl.String(), "/") + mt := MessageType(parts[len(parts)-1]) + if mt == nil { + return false, nil + } + m := reflect.New(mt.Elem()) + if err := Unmarshal(b, m.Interface().(Message)); err != nil { + return false, nil + } + w.Write([]byte("[")) + u := turl.String() + if requiresQuotes(u) { + writeString(w, u) + } else { + w.Write([]byte(u)) + } + if w.compact { + w.Write([]byte("]:<")) + } else { + w.Write([]byte("]: <\n")) + w.ind++ + } + if err := tm.writeStruct(w, m.Elem()); err != nil { + return true, err + } + if w.compact { + w.Write([]byte("> ")) + } else { + w.ind-- + w.Write([]byte(">\n")) + } + return true, nil +} + +func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { + if tm.ExpandAny && isAny(sv) { + if canExpand, err := tm.writeProto3Any(w, sv); canExpand { + return err + } + } st := sv.Type() sprops := GetProperties(st) for i := 0; i < sv.NumField(); i++ { @@ -227,7 +313,7 @@ func writeStruct(w *textWriter, sv reflect.Value) error { } continue } - if err := writeAny(w, v, props); err != nil { + if err := tm.writeAny(w, v, props); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -269,7 +355,7 @@ func writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := writeAny(w, key, props.mkeyprop); err != nil { + if err := tm.writeAny(w, key, props.mkeyprop); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -286,7 +372,7 @@ func writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := writeAny(w, val, props.mvalprop); err != nil { + if err := tm.writeAny(w, val, props.mvalprop); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -358,7 +444,7 @@ func writeStruct(w *textWriter, sv reflect.Value) error { } // Enums have a String method, so writeAny will work fine. - if err := writeAny(w, fv, props); err != nil { + if err := tm.writeAny(w, fv, props); err != nil { return err } @@ -370,7 +456,7 @@ func writeStruct(w *textWriter, sv reflect.Value) error { // Extensions (the XXX_extensions field). pv := sv.Addr() if pv.Type().Implements(extendableProtoType) { - if err := writeExtensions(w, pv); err != nil { + if err := tm.writeExtensions(w, pv); err != nil { return err } } @@ -400,7 +486,7 @@ func writeRaw(w *textWriter, b []byte) error { } // writeAny writes an arbitrary field. -func writeAny(w *textWriter, v reflect.Value, props *Properties) error { +func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { v = reflect.Indirect(v) // Floats have special cases. @@ -449,15 +535,15 @@ func writeAny(w *textWriter, v reflect.Value, props *Properties) error { } } w.indent() - if tm, ok := v.Interface().(encoding.TextMarshaler); ok { - text, err := tm.MarshalText() + if etm, ok := v.Interface().(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() if err != nil { return err } if _, err = w.Write(text); err != nil { return err } - } else if err := writeStruct(w, v); err != nil { + } else if err := tm.writeStruct(w, v); err != nil { return err } w.unindent() @@ -601,7 +687,7 @@ func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } // writeExtensions writes all the extensions in pv. // pv is assumed to be a pointer to a protocol message struct that is extendable. -func writeExtensions(w *textWriter, pv reflect.Value) error { +func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { emap := extensionMaps[pv.Type().Elem()] ep := pv.Interface().(extendableProto) @@ -636,13 +722,13 @@ func writeExtensions(w *textWriter, pv reflect.Value) error { // Repeated extensions will appear as a slice. if !desc.repeated() { - if err := writeExtension(w, desc.Name, pb); err != nil { + if err := tm.writeExtension(w, desc.Name, pb); err != nil { return err } } else { v := reflect.ValueOf(pb) for i := 0; i < v.Len(); i++ { - if err := writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { + if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { return err } } @@ -651,7 +737,7 @@ func writeExtensions(w *textWriter, pv reflect.Value) error { return nil } -func writeExtension(w *textWriter, name string, pb interface{}) error { +func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { return err } @@ -660,7 +746,7 @@ func writeExtension(w *textWriter, name string, pb interface{}) error { return err } } - if err := writeAny(w, reflect.ValueOf(pb), nil); err != nil { + if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -685,7 +771,15 @@ func (w *textWriter) writeIndent() { w.complete = false } -func marshalText(w io.Writer, pb Message, compact bool) error { +// TextMarshaler is a configurable text format marshaler. +type TextMarshaler struct { + Compact bool // use compact text format (one line). + ExpandAny bool // expand google.protobuf.Any messages of known types +} + +// Marshal writes a given protocol buffer in text format. +// The only errors returned are from w. +func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { val := reflect.ValueOf(pb) if pb == nil || val.IsNil() { w.Write([]byte("")) @@ -700,11 +794,11 @@ func marshalText(w io.Writer, pb Message, compact bool) error { aw := &textWriter{ w: ww, complete: true, - compact: compact, + compact: tm.Compact, } - if tm, ok := pb.(encoding.TextMarshaler); ok { - text, err := tm.MarshalText() + if etm, ok := pb.(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() if err != nil { return err } @@ -718,7 +812,7 @@ func marshalText(w io.Writer, pb Message, compact bool) error { } // Dereference the received pointer so we don't have outer < and >. v := reflect.Indirect(val) - if err := writeStruct(aw, v); err != nil { + if err := tm.writeStruct(aw, v); err != nil { return err } if bw != nil { @@ -727,25 +821,29 @@ func marshalText(w io.Writer, pb Message, compact bool) error { return nil } +// Text is the same as Marshal, but returns the string directly. +func (tm *TextMarshaler) Text(pb Message) string { + var buf bytes.Buffer + tm.Marshal(&buf, pb) + return buf.String() +} + +var ( + defaultTextMarshaler = TextMarshaler{} + compactTextMarshaler = TextMarshaler{Compact: true} +) + +// TODO: consider removing some of the Marshal functions below. + // MarshalText writes a given protocol buffer in text format. // The only errors returned are from w. -func MarshalText(w io.Writer, pb Message) error { - return marshalText(w, pb, false) -} +func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } // MarshalTextString is the same as MarshalText, but returns the string directly. -func MarshalTextString(pb Message) string { - var buf bytes.Buffer - marshalText(&buf, pb, false) - return buf.String() -} +func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } // CompactText writes a given protocol buffer in compact text format (one line). -func CompactText(w io.Writer, pb Message) error { return marshalText(w, pb, true) } +func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } // CompactTextString is the same as CompactText, but returns the string directly. -func CompactTextString(pb Message) string { - var buf bytes.Buffer - marshalText(&buf, pb, true) - return buf.String() -} +func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/components/engine/vendor/src/github.com/golang/protobuf/proto/text_parser.go b/components/engine/vendor/src/github.com/golang/protobuf/proto/text_parser.go index 6d0cf25894..b5e1c8e1f4 100644 --- a/components/engine/vendor/src/github.com/golang/protobuf/proto/text_parser.go +++ b/components/engine/vendor/src/github.com/golang/protobuf/proto/text_parser.go @@ -119,6 +119,14 @@ func isWhitespace(c byte) bool { return false } +func isQuote(c byte) bool { + switch c { + case '"', '\'': + return true + } + return false +} + func (p *textParser) skipWhitespace() { i := 0 for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { @@ -155,7 +163,7 @@ func (p *textParser) advance() { p.cur.offset, p.cur.line = p.offset, p.line p.cur.unquoted = "" switch p.s[0] { - case '<', '>', '{', '}', ':', '[', ']', ';', ',': + case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': // Single symbol p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] case '"', '\'': @@ -333,13 +341,13 @@ func (p *textParser) next() *token { p.advance() if p.done { p.cur.value = "" - } else if len(p.cur.value) > 0 && p.cur.value[0] == '"' { + } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { // Look for multiple quoted strings separated by whitespace, // and concatenate them. cat := p.cur for { p.skipWhitespace() - if p.done || p.s[0] != '"' { + if p.done || !isQuote(p.s[0]) { break } p.advance() @@ -443,7 +451,10 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { fieldSet := make(map[string]bool) // A struct is a sequence of "name: value", terminated by one of // '>' or '}', or the end of the input. A name may also be - // "[extension]". + // "[extension]" or "[type/url]". + // + // The whole struct can also be an expanded Any message, like: + // [type/url] < ... struct contents ... > for { tok := p.next() if tok.err != nil { @@ -453,33 +464,66 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { break } if tok.value == "[" { - // Looks like an extension. + // Looks like an extension or an Any. // // TODO: Check whether we need to handle // namespace rooted names (e.g. ".something.Foo"). - tok = p.next() - if tok.err != nil { - return tok.err + extName, err := p.consumeExtName() + if err != nil { + return err } + + if s := strings.LastIndex(extName, "/"); s >= 0 { + // If it contains a slash, it's an Any type URL. + messageName := extName[s+1:] + mt := MessageType(messageName) + if mt == nil { + return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) + } + tok = p.next() + if tok.err != nil { + return tok.err + } + // consume an optional colon + if tok.value == ":" { + tok = p.next() + if tok.err != nil { + return tok.err + } + } + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + v := reflect.New(mt.Elem()) + if pe := p.readStruct(v.Elem(), terminator); pe != nil { + return pe + } + b, err := Marshal(v.Interface().(Message)) + if err != nil { + return p.errorf("failed to marshal message of type %q: %v", messageName, err) + } + sv.FieldByName("TypeUrl").SetString(extName) + sv.FieldByName("Value").SetBytes(b) + continue + } + var desc *ExtensionDesc // This could be faster, but it's functional. // TODO: Do something smarter than a linear scan. for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { - if d.Name == tok.value { + if d.Name == extName { desc = d break } } if desc == nil { - return p.errorf("unrecognized extension %q", tok.value) - } - // Check the extension terminator. - tok = p.next() - if tok.err != nil { - return tok.err - } - if tok.value != "]" { - return p.errorf("unrecognized extension terminator %q", tok.value) + return p.errorf("unrecognized extension %q", extName) } props := &Properties{} @@ -635,6 +679,35 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { return reqFieldErr } +// consumeExtName consumes extension name or expanded Any type URL and the +// following ']'. It returns the name or URL consumed. +func (p *textParser) consumeExtName() (string, error) { + tok := p.next() + if tok.err != nil { + return "", tok.err + } + + // If extension name or type url is quoted, it's a single token. + if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { + name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) + if err != nil { + return "", err + } + return name, p.consumeToken("]") + } + + // Consume everything up to "]" + var parts []string + for tok.value != "]" { + parts = append(parts, tok.value) + tok = p.next() + if tok.err != nil { + return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) + } + } + return strings.Join(parts, ""), nil +} + // consumeOptionalSeparator consumes an optional semicolon or comma. // It is used in readStruct to provide backward compatibility. func (p *textParser) consumeOptionalSeparator() error {