Merge pull request #278 from Random-Liu/update-containerd
Update containerd to v1.0.0-beta.1
This commit is contained in:
commit
529971a1dd
@ -1,5 +1,5 @@
|
|||||||
RUNC_VERSION=593914b8bd5448a93f7c3e4902a03408b6d5c0ce
|
RUNC_VERSION=593914b8bd5448a93f7c3e4902a03408b6d5c0ce
|
||||||
CNI_VERSION=v0.6.0
|
CNI_VERSION=v0.6.0
|
||||||
CONTAINERD_VERSION=9934acb27147f6b25707ba486e30c4dc040ba040
|
CONTAINERD_VERSION=v1.0.0-beta.1
|
||||||
CRITOOL_VERSION=48f8614feab2e345647aa8c923c55b98bd1e842c
|
CRITOOL_VERSION=48f8614feab2e345647aa8c923c55b98bd1e842c
|
||||||
KUBERNETES_VERSION=11a836078d0c78a4253a77a3ff6f4a555c4121f9
|
KUBERNETES_VERSION=11a836078d0c78a4253a77a3ff6f4a555c4121f9
|
||||||
|
@ -2,7 +2,7 @@ github.com/blang/semver v3.1.0
|
|||||||
github.com/boltdb/bolt e9cf4fae01b5a8ff89d0ec6b32f0d9c9f79aefdd
|
github.com/boltdb/bolt e9cf4fae01b5a8ff89d0ec6b32f0d9c9f79aefdd
|
||||||
github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895
|
github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895
|
||||||
github.com/containerd/cgroups 5933ab4dc4f7caa3a73a1dc141bd11f42b5c9163
|
github.com/containerd/cgroups 5933ab4dc4f7caa3a73a1dc141bd11f42b5c9163
|
||||||
github.com/containerd/containerd 9934acb27147f6b25707ba486e30c4dc040ba040
|
github.com/containerd/containerd v1.0.0-beta.1
|
||||||
github.com/containerd/continuity cf279e6ac893682272b4479d4c67fd3abf878b4e
|
github.com/containerd/continuity cf279e6ac893682272b4479d4c67fd3abf878b4e
|
||||||
github.com/containerd/fifo fbfb6a11ec671efbe94ad1c12c2e98773f19e1e6
|
github.com/containerd/fifo fbfb6a11ec671efbe94ad1c12c2e98773f19e1e6
|
||||||
github.com/containerd/typeurl f6943554a7e7e88b3c14aad190bf05932da84788
|
github.com/containerd/typeurl f6943554a7e7e88b3c14aad190bf05932da84788
|
||||||
|
2
vendor/github.com/containerd/containerd/README.md
generated
vendored
2
vendor/github.com/containerd/containerd/README.md
generated
vendored
@ -9,6 +9,8 @@ containerd is an industry-standard container runtime with an emphasis on simplic
|
|||||||
|
|
||||||
containerd is designed to be embedded into a larger system, rather than being used directly by developers or end-users.
|
containerd is designed to be embedded into a larger system, rather than being used directly by developers or end-users.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
If you are interested in trying out containerd please see our [Getting Started Guide](docs/getting-started.md).
|
If you are interested in trying out containerd please see our [Getting Started Guide](docs/getting-started.md).
|
||||||
|
2
vendor/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go
generated
vendored
2
vendor/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go
generated
vendored
@ -65,6 +65,8 @@ type Container struct {
|
|||||||
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
// Labels provides an area to include arbitrary data on containers.
|
// Labels provides an area to include arbitrary data on containers.
|
||||||
//
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
|
//
|
||||||
// Note that to add a new value to this field, read the existing set and
|
// Note that to add a new value to this field, read the existing set and
|
||||||
// include the entire result in the update call.
|
// include the entire result in the update call.
|
||||||
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
|
2
vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto
generated
vendored
2
vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto
generated
vendored
@ -42,6 +42,8 @@ message Container {
|
|||||||
|
|
||||||
// Labels provides an area to include arbitrary data on containers.
|
// Labels provides an area to include arbitrary data on containers.
|
||||||
//
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
|
//
|
||||||
// Note that to add a new value to this field, read the existing set and
|
// Note that to add a new value to this field, read the existing set and
|
||||||
// include the entire result in the update call.
|
// include the entire result in the update call.
|
||||||
map<string, string> labels = 2;
|
map<string, string> labels = 2;
|
||||||
|
8
vendor/github.com/containerd/containerd/api/services/content/v1/content.pb.go
generated
vendored
8
vendor/github.com/containerd/containerd/api/services/content/v1/content.pb.go
generated
vendored
@ -115,7 +115,9 @@ type Info struct {
|
|||||||
CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,stdtime" json:"created_at"`
|
CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,stdtime" json:"created_at"`
|
||||||
// UpdatedAt provides the time the info was last updated.
|
// UpdatedAt provides the time the info was last updated.
|
||||||
UpdatedAt time.Time `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
|
UpdatedAt time.Time `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
|
||||||
// Labels are arbitrary data on content.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,7 +323,9 @@ type WriteContentRequest struct {
|
|||||||
// If this is empty and the message is not a commit, a response will be
|
// If this is empty and the message is not a commit, a response will be
|
||||||
// returned with the current write state.
|
// returned with the current write state.
|
||||||
Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
|
Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
|
||||||
// Labels are arbitrary data to set on commit.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
vendor/github.com/containerd/containerd/api/services/content/v1/content.proto
generated
vendored
8
vendor/github.com/containerd/containerd/api/services/content/v1/content.proto
generated
vendored
@ -87,7 +87,9 @@ message Info {
|
|||||||
// UpdatedAt provides the time the info was last updated.
|
// UpdatedAt provides the time the info was last updated.
|
||||||
google.protobuf.Timestamp updated_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
google.protobuf.Timestamp updated_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||||
|
|
||||||
// Labels are arbitrary data on content.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
map<string, string> labels = 5;
|
map<string, string> labels = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,7 +272,9 @@ message WriteContentRequest {
|
|||||||
// returned with the current write state.
|
// returned with the current write state.
|
||||||
bytes data = 6;
|
bytes data = 6;
|
||||||
|
|
||||||
// Labels are arbitrary data to set on commit.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
map<string, string> labels = 7;
|
map<string, string> labels = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
vendor/github.com/containerd/containerd/api/services/images/v1/images.pb.go
generated
vendored
1
vendor/github.com/containerd/containerd/api/services/images/v1/images.pb.go
generated
vendored
@ -67,6 +67,7 @@ type Image struct {
|
|||||||
// and do not get inherited into the package image in any way.
|
// and do not get inherited into the package image in any way.
|
||||||
//
|
//
|
||||||
// Labels may be updated using the field mask.
|
// Labels may be updated using the field mask.
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
// Target describes the content entry point of the image.
|
// Target describes the content entry point of the image.
|
||||||
Target containerd_types.Descriptor `protobuf:"bytes,3,opt,name=target" json:"target"`
|
Target containerd_types.Descriptor `protobuf:"bytes,3,opt,name=target" json:"target"`
|
||||||
|
1
vendor/github.com/containerd/containerd/api/services/images/v1/images.proto
generated
vendored
1
vendor/github.com/containerd/containerd/api/services/images/v1/images.proto
generated
vendored
@ -51,6 +51,7 @@ message Image {
|
|||||||
// and do not get inherited into the package image in any way.
|
// and do not get inherited into the package image in any way.
|
||||||
//
|
//
|
||||||
// Labels may be updated using the field mask.
|
// Labels may be updated using the field mask.
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
map<string, string> labels = 2;
|
map<string, string> labels = 2;
|
||||||
|
|
||||||
// Target describes the content entry point of the image.
|
// Target describes the content entry point of the image.
|
||||||
|
2
vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.pb.go
generated
vendored
2
vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.pb.go
generated
vendored
@ -55,6 +55,8 @@ type Namespace struct {
|
|||||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
// Labels provides an area to include arbitrary data on namespaces.
|
// Labels provides an area to include arbitrary data on namespaces.
|
||||||
//
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
|
//
|
||||||
// Note that to add a new value to this field, read the existing set and
|
// Note that to add a new value to this field, read the existing set and
|
||||||
// include the entire result in the update call.
|
// include the entire result in the update call.
|
||||||
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
|
2
vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto
generated
vendored
2
vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto
generated
vendored
@ -32,6 +32,8 @@ message Namespace {
|
|||||||
|
|
||||||
// Labels provides an area to include arbitrary data on namespaces.
|
// Labels provides an area to include arbitrary data on namespaces.
|
||||||
//
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
|
//
|
||||||
// Note that to add a new value to this field, read the existing set and
|
// Note that to add a new value to this field, read the existing set and
|
||||||
// include the entire result in the update call.
|
// include the entire result in the update call.
|
||||||
map<string, string> labels = 2;
|
map<string, string> labels = 2;
|
||||||
|
8
vendor/github.com/containerd/containerd/api/services/snapshot/v1/snapshots.pb.go
generated
vendored
8
vendor/github.com/containerd/containerd/api/services/snapshot/v1/snapshots.pb.go
generated
vendored
@ -97,6 +97,8 @@ type PrepareSnapshotRequest struct {
|
|||||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||||
Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
|
Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
|
||||||
// Labels are arbitrary data on snapshots.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,6 +119,8 @@ type ViewSnapshotRequest struct {
|
|||||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||||
Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
|
Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
|
||||||
// Labels are arbitrary data on snapshots.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,6 +167,8 @@ type CommitSnapshotRequest struct {
|
|||||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
|
||||||
// Labels are arbitrary data on snapshots.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,6 +194,8 @@ type Info struct {
|
|||||||
// UpdatedAt provides the time the info was last updated.
|
// UpdatedAt provides the time the info was last updated.
|
||||||
UpdatedAt time.Time `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
|
UpdatedAt time.Time `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
|
||||||
// Labels are arbitrary data on snapshots.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
vendor/github.com/containerd/containerd/api/services/snapshot/v1/snapshots.proto
generated
vendored
8
vendor/github.com/containerd/containerd/api/services/snapshot/v1/snapshots.proto
generated
vendored
@ -29,6 +29,8 @@ message PrepareSnapshotRequest {
|
|||||||
string parent = 3;
|
string parent = 3;
|
||||||
|
|
||||||
// Labels are arbitrary data on snapshots.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
map<string, string> labels = 4;
|
map<string, string> labels = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,6 +44,8 @@ message ViewSnapshotRequest {
|
|||||||
string parent = 3;
|
string parent = 3;
|
||||||
|
|
||||||
// Labels are arbitrary data on snapshots.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
map<string, string> labels = 4;
|
map<string, string> labels = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,6 +73,8 @@ message CommitSnapshotRequest {
|
|||||||
string key = 3;
|
string key = 3;
|
||||||
|
|
||||||
// Labels are arbitrary data on snapshots.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
map<string, string> labels = 4;
|
map<string, string> labels = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,6 +105,8 @@ message Info {
|
|||||||
google.protobuf.Timestamp updated_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
google.protobuf.Timestamp updated_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||||
|
|
||||||
// Labels are arbitrary data on snapshots.
|
// Labels are arbitrary data on snapshots.
|
||||||
|
//
|
||||||
|
// The combined size of a key/value pair cannot exceed 4096 bytes.
|
||||||
map<string, string> labels = 6;
|
map<string, string> labels = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
535
vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go
generated
vendored
535
vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go
generated
vendored
@ -34,6 +34,8 @@
|
|||||||
UpdateTaskRequest
|
UpdateTaskRequest
|
||||||
MetricsRequest
|
MetricsRequest
|
||||||
MetricsResponse
|
MetricsResponse
|
||||||
|
WaitRequest
|
||||||
|
WaitResponse
|
||||||
*/
|
*/
|
||||||
package tasks
|
package tasks
|
||||||
|
|
||||||
@ -316,6 +318,24 @@ func (m *MetricsResponse) Reset() { *m = MetricsResponse{} }
|
|||||||
func (*MetricsResponse) ProtoMessage() {}
|
func (*MetricsResponse) ProtoMessage() {}
|
||||||
func (*MetricsResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{24} }
|
func (*MetricsResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{24} }
|
||||||
|
|
||||||
|
type WaitRequest struct {
|
||||||
|
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
|
||||||
|
ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *WaitRequest) Reset() { *m = WaitRequest{} }
|
||||||
|
func (*WaitRequest) ProtoMessage() {}
|
||||||
|
func (*WaitRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{25} }
|
||||||
|
|
||||||
|
type WaitResponse struct {
|
||||||
|
ExitStatus uint32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
|
||||||
|
ExitedAt time.Time `protobuf:"bytes,2,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *WaitResponse) Reset() { *m = WaitResponse{} }
|
||||||
|
func (*WaitResponse) ProtoMessage() {}
|
||||||
|
func (*WaitResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{26} }
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*CreateTaskRequest)(nil), "containerd.services.tasks.v1.CreateTaskRequest")
|
proto.RegisterType((*CreateTaskRequest)(nil), "containerd.services.tasks.v1.CreateTaskRequest")
|
||||||
proto.RegisterType((*CreateTaskResponse)(nil), "containerd.services.tasks.v1.CreateTaskResponse")
|
proto.RegisterType((*CreateTaskResponse)(nil), "containerd.services.tasks.v1.CreateTaskResponse")
|
||||||
@ -342,6 +362,8 @@ func init() {
|
|||||||
proto.RegisterType((*UpdateTaskRequest)(nil), "containerd.services.tasks.v1.UpdateTaskRequest")
|
proto.RegisterType((*UpdateTaskRequest)(nil), "containerd.services.tasks.v1.UpdateTaskRequest")
|
||||||
proto.RegisterType((*MetricsRequest)(nil), "containerd.services.tasks.v1.MetricsRequest")
|
proto.RegisterType((*MetricsRequest)(nil), "containerd.services.tasks.v1.MetricsRequest")
|
||||||
proto.RegisterType((*MetricsResponse)(nil), "containerd.services.tasks.v1.MetricsResponse")
|
proto.RegisterType((*MetricsResponse)(nil), "containerd.services.tasks.v1.MetricsResponse")
|
||||||
|
proto.RegisterType((*WaitRequest)(nil), "containerd.services.tasks.v1.WaitRequest")
|
||||||
|
proto.RegisterType((*WaitResponse)(nil), "containerd.services.tasks.v1.WaitResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -375,6 +397,7 @@ type TasksClient interface {
|
|||||||
Checkpoint(ctx context.Context, in *CheckpointTaskRequest, opts ...grpc.CallOption) (*CheckpointTaskResponse, error)
|
Checkpoint(ctx context.Context, in *CheckpointTaskRequest, opts ...grpc.CallOption) (*CheckpointTaskResponse, error)
|
||||||
Update(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
|
Update(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
|
||||||
Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error)
|
Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error)
|
||||||
|
Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (*WaitResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type tasksClient struct {
|
type tasksClient struct {
|
||||||
@ -529,6 +552,15 @@ func (c *tasksClient) Metrics(ctx context.Context, in *MetricsRequest, opts ...g
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *tasksClient) Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (*WaitResponse, error) {
|
||||||
|
out := new(WaitResponse)
|
||||||
|
err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Wait", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Server API for Tasks service
|
// Server API for Tasks service
|
||||||
|
|
||||||
type TasksServer interface {
|
type TasksServer interface {
|
||||||
@ -552,6 +584,7 @@ type TasksServer interface {
|
|||||||
Checkpoint(context.Context, *CheckpointTaskRequest) (*CheckpointTaskResponse, error)
|
Checkpoint(context.Context, *CheckpointTaskRequest) (*CheckpointTaskResponse, error)
|
||||||
Update(context.Context, *UpdateTaskRequest) (*google_protobuf.Empty, error)
|
Update(context.Context, *UpdateTaskRequest) (*google_protobuf.Empty, error)
|
||||||
Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error)
|
Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error)
|
||||||
|
Wait(context.Context, *WaitRequest) (*WaitResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func RegisterTasksServer(s *grpc.Server, srv TasksServer) {
|
func RegisterTasksServer(s *grpc.Server, srv TasksServer) {
|
||||||
@ -846,6 +879,24 @@ func _Tasks_Metrics_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Tasks_Wait_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(WaitRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(TasksServer).Wait(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/containerd.services.tasks.v1.Tasks/Wait",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(TasksServer).Wait(ctx, req.(*WaitRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
var _Tasks_serviceDesc = grpc.ServiceDesc{
|
var _Tasks_serviceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "containerd.services.tasks.v1.Tasks",
|
ServiceName: "containerd.services.tasks.v1.Tasks",
|
||||||
HandlerType: (*TasksServer)(nil),
|
HandlerType: (*TasksServer)(nil),
|
||||||
@ -914,6 +965,10 @@ var _Tasks_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "Metrics",
|
MethodName: "Metrics",
|
||||||
Handler: _Tasks_Metrics_Handler,
|
Handler: _Tasks_Metrics_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Wait",
|
||||||
|
Handler: _Tasks_Wait_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "github.com/containerd/containerd/api/services/tasks/v1/tasks.proto",
|
Metadata: "github.com/containerd/containerd/api/services/tasks/v1/tasks.proto",
|
||||||
@ -1778,6 +1833,67 @@ func (m *MetricsResponse) MarshalTo(dAtA []byte) (int, error) {
|
|||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *WaitRequest) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalTo(dAtA)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *WaitRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
var i int
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.ContainerID) > 0 {
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
i++
|
||||||
|
i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID)))
|
||||||
|
i += copy(dAtA[i:], m.ContainerID)
|
||||||
|
}
|
||||||
|
if len(m.ExecID) > 0 {
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
i++
|
||||||
|
i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID)))
|
||||||
|
i += copy(dAtA[i:], m.ExecID)
|
||||||
|
}
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *WaitResponse) Marshal() (dAtA []byte, err error) {
|
||||||
|
size := m.Size()
|
||||||
|
dAtA = make([]byte, size)
|
||||||
|
n, err := m.MarshalTo(dAtA)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dAtA[:n], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *WaitResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
var i int
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.ExitStatus != 0 {
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
i++
|
||||||
|
i = encodeVarintTasks(dAtA, i, uint64(m.ExitStatus))
|
||||||
|
}
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
i++
|
||||||
|
i = encodeVarintTasks(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
|
||||||
|
n10, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i += n10
|
||||||
|
return i, nil
|
||||||
|
}
|
||||||
|
|
||||||
func encodeFixed64Tasks(dAtA []byte, offset int, v uint64) int {
|
func encodeFixed64Tasks(dAtA []byte, offset int, v uint64) int {
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
dAtA[offset+1] = uint8(v >> 8)
|
dAtA[offset+1] = uint8(v >> 8)
|
||||||
@ -2175,6 +2291,31 @@ func (m *MetricsResponse) Size() (n int) {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *WaitRequest) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = len(m.ContainerID)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTasks(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.ExecID)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTasks(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *WaitResponse) Size() (n int) {
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.ExitStatus != 0 {
|
||||||
|
n += 1 + sovTasks(uint64(m.ExitStatus))
|
||||||
|
}
|
||||||
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
|
||||||
|
n += 1 + l + sovTasks(uint64(l))
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
func sovTasks(x uint64) (n int) {
|
func sovTasks(x uint64) (n int) {
|
||||||
for {
|
for {
|
||||||
n++
|
n++
|
||||||
@ -2468,6 +2609,28 @@ func (this *MetricsResponse) String() string {
|
|||||||
}, "")
|
}, "")
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
func (this *WaitRequest) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&WaitRequest{`,
|
||||||
|
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
|
||||||
|
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
func (this *WaitResponse) String() string {
|
||||||
|
if this == nil {
|
||||||
|
return "nil"
|
||||||
|
}
|
||||||
|
s := strings.Join([]string{`&WaitResponse{`,
|
||||||
|
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
|
||||||
|
`ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
|
||||||
|
`}`,
|
||||||
|
}, "")
|
||||||
|
return s
|
||||||
|
}
|
||||||
func valueToStringTasks(v interface{}) string {
|
func valueToStringTasks(v interface{}) string {
|
||||||
rv := reflect.ValueOf(v)
|
rv := reflect.ValueOf(v)
|
||||||
if rv.IsNil() {
|
if rv.IsNil() {
|
||||||
@ -5281,6 +5444,213 @@ func (m *MetricsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (m *WaitRequest) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTasks
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: WaitRequest: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: WaitRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTasks
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return ErrInvalidLengthTasks
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.ContainerID = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTasks
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return ErrInvalidLengthTasks
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.ExecID = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipTasks(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skippy < 0 {
|
||||||
|
return ErrInvalidLengthTasks
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *WaitResponse) Unmarshal(dAtA []byte) error {
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTasks
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= (uint64(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
wireType := int(wire & 0x7)
|
||||||
|
if wireType == 4 {
|
||||||
|
return fmt.Errorf("proto: WaitResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: WaitResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType)
|
||||||
|
}
|
||||||
|
m.ExitStatus = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTasks
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.ExitStatus |= (uint32(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTasks
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= (int(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthTasks
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipTasks(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skippy < 0 {
|
||||||
|
return ErrInvalidLengthTasks
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func skipTasks(dAtA []byte) (n int, err error) {
|
func skipTasks(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
@ -5391,85 +5761,88 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptorTasks = []byte{
|
var fileDescriptorTasks = []byte{
|
||||||
// 1274 bytes of a gzipped FileDescriptorProto
|
// 1313 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0x6f, 0x1b, 0x45,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5b, 0x6f, 0x1b, 0x45,
|
||||||
0x14, 0xef, 0xc6, 0xf6, 0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3, 0xb6, 0x16, 0xaf, 0xb7, 0xd7, 0xed, 0x5a, 0x02, 0x6a, 0x7b, 0xc8,
|
||||||
0x05, 0xc8, 0x01, 0x3d, 0x89, 0x22, 0xb6, 0x43, 0x8d, 0xc2, 0x72, 0xa1, 0x51, 0x6b, 0xbe, 0x6d,
|
0x82, 0x52, 0x14, 0x04, 0x6c, 0x87, 0xd6, 0xf3, 0xcb, 0xf9, 0x66, 0xad, 0xf5, 0xb6, 0x99, 0xba,
|
||||||
0xe7, 0xae, 0x54, 0x44, 0x67, 0xdf, 0xe7, 0x64, 0xba, 0x0a, 0x86, 0x16, 0xa0, 0x44, 0x59, 0x40,
|
0x52, 0x11, 0x9d, 0x79, 0x8f, 0x93, 0x69, 0x2b, 0x18, 0x5a, 0x80, 0x22, 0x65, 0x1e, 0xf1, 0xeb,
|
||||||
0x42, 0xa3, 0xc8, 0xbd, 0xbb, 0x72, 0x82, 0x16, 0x41, 0xa7, 0x2c, 0x88, 0x7a, 0xcc, 0x28, 0x89,
|
0x05, 0xee, 0xdd, 0x96, 0x13, 0xb4, 0x08, 0x25, 0xca, 0xbc, 0xa0, 0xcf, 0xea, 0x45, 0xb1, 0xac,
|
||||||
0x65, 0x35, 0x53, 0xeb, 0x38, 0x49, 0x0c, 0x3d, 0x5b, 0xc7, 0x49, 0x82, 0x4c, 0xa8, 0x30, 0x9c,
|
0x66, 0x6a, 0x1d, 0x47, 0x51, 0xbd, 0x94, 0xac, 0xe3, 0x28, 0x42, 0x3a, 0x54, 0x18, 0x8e, 0x7a,
|
||||||
0x74, 0x49, 0xe8, 0x75, 0x8c, 0xf2, 0xb2, 0xd6, 0xa8, 0xb8, 0xd9, 0x1c, 0xdd, 0x05, 0xf0, 0x77,
|
0xc4, 0x77, 0xba, 0xf5, 0xf2, 0xb2, 0xd6, 0xac, 0xd8, 0xc9, 0x1c, 0xdd, 0x01, 0x70, 0x77, 0xb1,
|
||||||
0xb1, 0xbf, 0x17, 0x47, 0x24, 0x64, 0x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0x7d, 0x54, 0xac, 0x43, 0xda, 0x42, 0x9b, 0xac,
|
||||||
0xac, 0xf9, 0xc9, 0xe4, 0x06, 0x2a, 0xd4, 0xef, 0xa1, 0x24, 0x34, 0x10, 0x5a, 0x39, 0xdb, 0x34,
|
0x2d, 0x72, 0xaf, 0xa3, 0x2d, 0x5a, 0x2f, 0x67, 0xa0, 0x28, 0xba, 0x21, 0xda, 0x83, 0x92, 0xd4,
|
||||||
0xaf, 0xc8, 0xcc, 0x8f, 0x26, 0xc2, 0xaa, 0x1d, 0xda, 0xa0, 0x4b, 0x61, 0x31, 0xee, 0x38, 0x43,
|
0x8d, 0xc8, 0x32, 0x27, 0xfd, 0x0a, 0x32, 0x47, 0x74, 0xba, 0xfe, 0xc9, 0xf4, 0x06, 0xea, 0x68,
|
||||||
0x42, 0xcb, 0xfc, 0x78, 0x12, 0x83, 0x6c, 0xa3, 0x67, 0x30, 0x7b, 0x42, 0xc1, 0xa0, 0xe6, 0x24,
|
0x3f, 0x42, 0x51, 0xe8, 0x3b, 0xb4, 0x32, 0xd9, 0x34, 0xad, 0x36, 0xf5, 0x8f, 0xa6, 0xc2, 0xaa,
|
||||||
0xe6, 0x27, 0x1b, 0xd9, 0x39, 0xb7, 0x7c, 0x02, 0x85, 0x4d, 0xcc, 0x50, 0xe3, 0x6c, 0xa3, 0x63,
|
0x1d, 0x3a, 0x50, 0x92, 0xa2, 0x29, 0xeb, 0x38, 0x23, 0x22, 0x52, 0xff, 0x78, 0x1a, 0x83, 0x64,
|
||||||
0x99, 0x63, 0x7e, 0x38, 0x01, 0x32, 0xe3, 0xad, 0xc8, 0x2b, 0x0c, 0xb2, 0xcf, 0x36, 0x19, 0x54,
|
0xa3, 0xa7, 0x30, 0x7b, 0x42, 0x9d, 0xa1, 0xd6, 0x34, 0xe6, 0x27, 0x9b, 0xf4, 0x19, 0xb7, 0x7c,
|
||||||
0x25, 0xa6, 0x33, 0x31, 0x5e, 0x6d, 0xd4, 0x82, 0x22, 0x17,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e, 0x5b, 0xff, 0x05, 0x00, 0x00,
|
0xc9, 0x7a, 0x85, 0xa9, 0xfe, 0xa7, 0xaf, 0x4c, 0x03, 0x95, 0xee, 0x57, 0xbf, 0x3d, 0x7c, 0xb5,
|
||||||
0xff, 0xff, 0x5e, 0xf6, 0xae, 0x85, 0xb9, 0x12, 0x00, 0x00,
|
0x74, 0xe9, 0xcf, 0x57, 0x4b, 0x97, 0x7e, 0x1d, 0x2c, 0x69, 0x87, 0x83, 0x25, 0xed, 0x8f, 0xc1,
|
||||||
|
0x92, 0xf6, 0xcf, 0x60, 0x49, 0x7b, 0x7c, 0xe7, 0xf5, 0xfe, 0x5a, 0x77, 0x5b, 0x0c, 0x9e, 0x94,
|
||||||
|
0x04, 0x5d, 0x37, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xe9, 0xe2, 0x8e, 0x41, 0xf4, 0x13, 0x00,
|
||||||
|
0x00,
|
||||||
}
|
}
|
||||||
|
12
vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto
generated
vendored
12
vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto
generated
vendored
@ -49,6 +49,8 @@ service Tasks {
|
|||||||
rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty);
|
rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty);
|
||||||
|
|
||||||
rpc Metrics(MetricsRequest) returns (MetricsResponse);
|
rpc Metrics(MetricsRequest) returns (MetricsResponse);
|
||||||
|
|
||||||
|
rpc Wait(WaitRequest) returns (WaitResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateTaskRequest {
|
message CreateTaskRequest {
|
||||||
@ -194,3 +196,13 @@ message MetricsRequest {
|
|||||||
message MetricsResponse {
|
message MetricsResponse {
|
||||||
repeated types.Metric metrics = 1;
|
repeated types.Metric metrics = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message WaitRequest {
|
||||||
|
string container_id = 1;
|
||||||
|
string exec_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message WaitResponse {
|
||||||
|
uint32 exit_status = 1;
|
||||||
|
google.protobuf.Timestamp exited_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||||
|
}
|
||||||
|
5
vendor/github.com/containerd/containerd/client.go
generated
vendored
5
vendor/github.com/containerd/containerd/client.go
generated
vendored
@ -23,6 +23,7 @@ import (
|
|||||||
"github.com/containerd/containerd/content"
|
"github.com/containerd/containerd/content"
|
||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
"github.com/containerd/containerd/images"
|
"github.com/containerd/containerd/images"
|
||||||
|
"github.com/containerd/containerd/platforms"
|
||||||
"github.com/containerd/containerd/plugin"
|
"github.com/containerd/containerd/plugin"
|
||||||
"github.com/containerd/containerd/reference"
|
"github.com/containerd/containerd/reference"
|
||||||
"github.com/containerd/containerd/remotes"
|
"github.com/containerd/containerd/remotes"
|
||||||
@ -226,7 +227,7 @@ func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpts) (Imag
|
|||||||
} else {
|
} else {
|
||||||
handler = images.Handlers(append(pullCtx.BaseHandlers,
|
handler = images.Handlers(append(pullCtx.BaseHandlers,
|
||||||
remotes.FetchHandler(store, fetcher),
|
remotes.FetchHandler(store, fetcher),
|
||||||
images.ChildrenHandler(store))...,
|
images.ChildrenHandler(store, platforms.Default()))...,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,7 +308,7 @@ func (c *Client) Push(ctx context.Context, ref string, desc ocispec.Descriptor,
|
|||||||
pushHandler := remotes.PushHandler(cs, pusher)
|
pushHandler := remotes.PushHandler(cs, pusher)
|
||||||
|
|
||||||
handlers := append(pushCtx.BaseHandlers,
|
handlers := append(pushCtx.BaseHandlers,
|
||||||
images.ChildrenHandler(cs),
|
images.ChildrenHandler(cs, platforms.Default()),
|
||||||
filterHandler,
|
filterHandler,
|
||||||
pushHandler,
|
pushHandler,
|
||||||
)
|
)
|
||||||
|
5
vendor/github.com/containerd/containerd/container.go
generated
vendored
5
vendor/github.com/containerd/containerd/container.go
generated
vendored
@ -229,15 +229,12 @@ func (c *container) NewTask(ctx context.Context, ioCreate IOCreation, opts ...Ne
|
|||||||
}
|
}
|
||||||
if info.Checkpoint != nil {
|
if info.Checkpoint != nil {
|
||||||
request.Checkpoint = info.Checkpoint
|
request.Checkpoint = info.Checkpoint
|
||||||
// we need to defer the create call to start
|
}
|
||||||
t.deferred = request
|
|
||||||
} else {
|
|
||||||
response, err := c.client.TaskService().Create(ctx, request)
|
response, err := c.client.TaskService().Create(ctx, request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errdefs.FromGRPC(err)
|
return nil, errdefs.FromGRPC(err)
|
||||||
}
|
}
|
||||||
t.pid = response.Pid
|
t.pid = response.Pid
|
||||||
}
|
|
||||||
return t, nil
|
return t, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
vendor/github.com/containerd/containerd/container_opts_unix.go
generated
vendored
2
vendor/github.com/containerd/containerd/container_opts_unix.go
generated
vendored
@ -38,7 +38,7 @@ func WithCheckpoint(desc v1.Descriptor, snapshotKey string) NewContainerOpts {
|
|||||||
case v1.MediaTypeImageLayer:
|
case v1.MediaTypeImageLayer:
|
||||||
fk := m
|
fk := m
|
||||||
rw = &fk
|
rw = &fk
|
||||||
case images.MediaTypeDockerSchema2Manifest:
|
case images.MediaTypeDockerSchema2Manifest, images.MediaTypeDockerSchema2ManifestList:
|
||||||
config, err := images.Config(ctx, store, m, platforms.Default())
|
config, err := images.Config(ctx, store, m, platforms.Default())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
2
vendor/github.com/containerd/containerd/containerstore.go
generated
vendored
2
vendor/github.com/containerd/containerd/containerstore.go
generated
vendored
@ -117,6 +117,8 @@ func containerFromProto(containerpb *containersapi.Container) containers.Contain
|
|||||||
Spec: containerpb.Spec,
|
Spec: containerpb.Spec,
|
||||||
Snapshotter: containerpb.Snapshotter,
|
Snapshotter: containerpb.Snapshotter,
|
||||||
SnapshotKey: containerpb.SnapshotKey,
|
SnapshotKey: containerpb.SnapshotKey,
|
||||||
|
CreatedAt: containerpb.CreatedAt,
|
||||||
|
UpdatedAt: containerpb.UpdatedAt,
|
||||||
Extensions: containerpb.Extensions,
|
Extensions: containerpb.Extensions,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
vendor/github.com/containerd/containerd/export.go
generated
vendored
3
vendor/github.com/containerd/containerd/export.go
generated
vendored
@ -9,6 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/containerd/containerd/content"
|
"github.com/containerd/containerd/content"
|
||||||
"github.com/containerd/containerd/images"
|
"github.com/containerd/containerd/images"
|
||||||
|
"github.com/containerd/containerd/platforms"
|
||||||
ocispecs "github.com/opencontainers/image-spec/specs-go"
|
ocispecs "github.com/opencontainers/image-spec/specs-go"
|
||||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@ -32,7 +33,7 @@ func (c *Client) exportToOCITar(ctx context.Context, desc ocispec.Descriptor, wr
|
|||||||
}
|
}
|
||||||
|
|
||||||
handlers := images.Handlers(
|
handlers := images.Handlers(
|
||||||
images.ChildrenHandler(cs),
|
images.ChildrenHandler(cs, platforms.Default()),
|
||||||
images.HandlerFunc(exportHandler),
|
images.HandlerFunc(exportHandler),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
2
vendor/github.com/containerd/containerd/image.go
generated
vendored
2
vendor/github.com/containerd/containerd/image.go
generated
vendored
@ -50,7 +50,7 @@ func (i *image) RootFS(ctx context.Context) ([]digest.Digest, error) {
|
|||||||
|
|
||||||
func (i *image) Size(ctx context.Context) (int64, error) {
|
func (i *image) Size(ctx context.Context) (int64, error) {
|
||||||
provider := i.client.ContentStore()
|
provider := i.client.ContentStore()
|
||||||
return i.i.Size(ctx, provider)
|
return i.i.Size(ctx, provider, platforms.Default())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *image) Config(ctx context.Context) (ocispec.Descriptor, error) {
|
func (i *image) Config(ctx context.Context) (ocispec.Descriptor, error) {
|
||||||
|
21
vendor/github.com/containerd/containerd/images/handlers.go
generated
vendored
21
vendor/github.com/containerd/containerd/images/handlers.go
generated
vendored
@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/containerd/containerd/content"
|
"github.com/containerd/containerd/content"
|
||||||
"github.com/containerd/containerd/log"
|
"github.com/containerd/containerd/log"
|
||||||
|
"github.com/containerd/containerd/platforms"
|
||||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
@ -127,7 +128,7 @@ func Dispatch(ctx context.Context, handler Handler, descs ...ocispec.Descriptor)
|
|||||||
//
|
//
|
||||||
// One can also replace this with another implementation to allow descending of
|
// One can also replace this with another implementation to allow descending of
|
||||||
// arbitrary types.
|
// arbitrary types.
|
||||||
func ChildrenHandler(provider content.Provider) HandlerFunc {
|
func ChildrenHandler(provider content.Provider, platform string) HandlerFunc {
|
||||||
return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
|
return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
|
||||||
var descs []ocispec.Descriptor
|
var descs []ocispec.Descriptor
|
||||||
switch desc.MediaType {
|
switch desc.MediaType {
|
||||||
@ -157,10 +158,26 @@ func ChildrenHandler(provider content.Provider) HandlerFunc {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if platform != "" {
|
||||||
|
matcher, err := platforms.Parse(platform)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, d := range index.Manifests {
|
||||||
|
if d.Platform == nil || matcher.Match(*d.Platform) {
|
||||||
|
descs = append(descs, d)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
descs = append(descs, index.Manifests...)
|
descs = append(descs, index.Manifests...)
|
||||||
|
}
|
||||||
|
|
||||||
case MediaTypeDockerSchema2Layer, MediaTypeDockerSchema2LayerGzip,
|
case MediaTypeDockerSchema2Layer, MediaTypeDockerSchema2LayerGzip,
|
||||||
|
MediaTypeDockerSchema2LayerForeign, MediaTypeDockerSchema2LayerForeignGzip,
|
||||||
MediaTypeDockerSchema2Config, ocispec.MediaTypeImageConfig,
|
MediaTypeDockerSchema2Config, ocispec.MediaTypeImageConfig,
|
||||||
ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerGzip:
|
ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerGzip,
|
||||||
|
ocispec.MediaTypeImageLayerNonDistributable, ocispec.MediaTypeImageLayerNonDistributableGzip:
|
||||||
// childless data types.
|
// childless data types.
|
||||||
return nil, nil
|
return nil, nil
|
||||||
default:
|
default:
|
||||||
|
6
vendor/github.com/containerd/containerd/images/image.go
generated
vendored
6
vendor/github.com/containerd/containerd/images/image.go
generated
vendored
@ -58,7 +58,7 @@ func (image *Image) RootFS(ctx context.Context, provider content.Provider, platf
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Size returns the total size of an image's packed resources.
|
// Size returns the total size of an image's packed resources.
|
||||||
func (image *Image) Size(ctx context.Context, provider content.Provider) (int64, error) {
|
func (image *Image) Size(ctx context.Context, provider content.Provider, platform string) (int64, error) {
|
||||||
var size int64
|
var size int64
|
||||||
return size, Walk(ctx, Handlers(HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
|
return size, Walk(ctx, Handlers(HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
|
||||||
if desc.Size < 0 {
|
if desc.Size < 0 {
|
||||||
@ -66,7 +66,7 @@ func (image *Image) Size(ctx context.Context, provider content.Provider) (int64,
|
|||||||
}
|
}
|
||||||
size += desc.Size
|
size += desc.Size
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}), ChildrenHandler(provider)), image.Target)
|
}), ChildrenHandler(provider, platform)), image.Target)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Manifest(ctx context.Context, provider content.Provider, image ocispec.Descriptor, platform string) (ocispec.Manifest, error) {
|
func Manifest(ctx context.Context, provider content.Provider, image ocispec.Descriptor, platform string) (ocispec.Manifest, error) {
|
||||||
@ -196,7 +196,7 @@ func Platforms(ctx context.Context, provider content.Provider, image ocispec.Des
|
|||||||
platforms.Normalize(ocispec.Platform{OS: image.OS, Architecture: image.Architecture}))
|
platforms.Normalize(ocispec.Platform{OS: image.OS, Architecture: image.Architecture}))
|
||||||
}
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}), ChildrenHandler(provider)), image)
|
}), ChildrenHandler(provider, "")), image)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RootFS returns the unpacked diffids that make up and images rootfs.
|
// RootFS returns the unpacked diffids that make up and images rootfs.
|
||||||
|
2
vendor/github.com/containerd/containerd/images/mediatypes.go
generated
vendored
2
vendor/github.com/containerd/containerd/images/mediatypes.go
generated
vendored
@ -6,7 +6,9 @@ package images
|
|||||||
// here for clarity.
|
// here for clarity.
|
||||||
const (
|
const (
|
||||||
MediaTypeDockerSchema2Layer = "application/vnd.docker.image.rootfs.diff.tar"
|
MediaTypeDockerSchema2Layer = "application/vnd.docker.image.rootfs.diff.tar"
|
||||||
|
MediaTypeDockerSchema2LayerForeign = "application/vnd.docker.image.rootfs.foreign.diff.tar"
|
||||||
MediaTypeDockerSchema2LayerGzip = "application/vnd.docker.image.rootfs.diff.tar.gzip"
|
MediaTypeDockerSchema2LayerGzip = "application/vnd.docker.image.rootfs.diff.tar.gzip"
|
||||||
|
MediaTypeDockerSchema2LayerForeignGzip = "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip"
|
||||||
MediaTypeDockerSchema2Config = "application/vnd.docker.container.image.v1+json"
|
MediaTypeDockerSchema2Config = "application/vnd.docker.container.image.v1+json"
|
||||||
MediaTypeDockerSchema2Manifest = "application/vnd.docker.distribution.manifest.v2+json"
|
MediaTypeDockerSchema2Manifest = "application/vnd.docker.distribution.manifest.v2+json"
|
||||||
MediaTypeDockerSchema2ManifestList = "application/vnd.docker.distribution.manifest.list.v2+json"
|
MediaTypeDockerSchema2ManifestList = "application/vnd.docker.distribution.manifest.list.v2+json"
|
||||||
|
23
vendor/github.com/containerd/containerd/labels/validate.go
generated
vendored
Normal file
23
vendor/github.com/containerd/containerd/labels/validate.go
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package labels
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/containerd/containerd/errdefs"
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
maxSize = 4096
|
||||||
|
)
|
||||||
|
|
||||||
|
func Validate(k, v string) error {
|
||||||
|
// A label key and value should be under 4096 bytes
|
||||||
|
if (len(k) + len(v)) > maxSize {
|
||||||
|
if len(k) > 10 {
|
||||||
|
k = k[:10]
|
||||||
|
}
|
||||||
|
|
||||||
|
return errors.Wrapf(errdefs.ErrInvalidArgument, "label key and value greater than maximum size (%d bytes), key: %s", maxSize, k)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
9
vendor/github.com/containerd/containerd/metadata/containers.go
generated
vendored
9
vendor/github.com/containerd/containerd/metadata/containers.go
generated
vendored
@ -10,6 +10,7 @@ import (
|
|||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
"github.com/containerd/containerd/filters"
|
"github.com/containerd/containerd/filters"
|
||||||
"github.com/containerd/containerd/identifiers"
|
"github.com/containerd/containerd/identifiers"
|
||||||
|
"github.com/containerd/containerd/labels"
|
||||||
"github.com/containerd/containerd/metadata/boltutil"
|
"github.com/containerd/containerd/metadata/boltutil"
|
||||||
"github.com/containerd/containerd/namespaces"
|
"github.com/containerd/containerd/namespaces"
|
||||||
"github.com/gogo/protobuf/proto"
|
"github.com/gogo/protobuf/proto"
|
||||||
@ -243,7 +244,13 @@ func validateContainer(container *containers.Container) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// labels and image have no validation
|
// image has no validation
|
||||||
|
for k, v := range container.Labels {
|
||||||
|
if err := labels.Validate(k, v); err == nil {
|
||||||
|
return errors.Wrapf(err, "containers.Labels")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if container.Runtime.Name == "" {
|
if container.Runtime.Name == "" {
|
||||||
return errors.Wrapf(errdefs.ErrInvalidArgument, "container.Runtime.Name must be set")
|
return errors.Wrapf(errdefs.ErrInvalidArgument, "container.Runtime.Name must be set")
|
||||||
}
|
}
|
||||||
|
18
vendor/github.com/containerd/containerd/metadata/content.go
generated
vendored
18
vendor/github.com/containerd/containerd/metadata/content.go
generated
vendored
@ -10,6 +10,7 @@ import (
|
|||||||
"github.com/containerd/containerd/content"
|
"github.com/containerd/containerd/content"
|
||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
"github.com/containerd/containerd/filters"
|
"github.com/containerd/containerd/filters"
|
||||||
|
"github.com/containerd/containerd/labels"
|
||||||
"github.com/containerd/containerd/metadata/boltutil"
|
"github.com/containerd/containerd/metadata/boltutil"
|
||||||
"github.com/containerd/containerd/namespaces"
|
"github.com/containerd/containerd/namespaces"
|
||||||
digest "github.com/opencontainers/go-digest"
|
digest "github.com/opencontainers/go-digest"
|
||||||
@ -94,6 +95,9 @@ func (cs *contentStore) Update(ctx context.Context, info content.Info, fieldpath
|
|||||||
// Set mutable fields
|
// Set mutable fields
|
||||||
updated.Labels = info.Labels
|
updated.Labels = info.Labels
|
||||||
}
|
}
|
||||||
|
if err := validateInfo(&updated); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
updated.UpdatedAt = time.Now().UTC()
|
updated.UpdatedAt = time.Now().UTC()
|
||||||
return writeInfo(&updated, bkt)
|
return writeInfo(&updated, bkt)
|
||||||
@ -371,6 +375,10 @@ func (nw *namespacedWriter) commit(ctx context.Context, tx *bolt.Tx, size int64,
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if err := validateInfo(&base); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
status, err := nw.Writer.Status()
|
status, err := nw.Writer.Status()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -446,6 +454,16 @@ func (cs *contentStore) checkAccess(ctx context.Context, dgst digest.Digest) err
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func validateInfo(info *content.Info) error {
|
||||||
|
for k, v := range info.Labels {
|
||||||
|
if err := labels.Validate(k, v); err == nil {
|
||||||
|
return errors.Wrapf(err, "info.Labels")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func readInfo(info *content.Info, bkt *bolt.Bucket) error {
|
func readInfo(info *content.Info, bkt *bolt.Bucket) error {
|
||||||
if err := boltutil.ReadTimestamps(bkt, &info.CreatedAt, &info.UpdatedAt); err != nil {
|
if err := boltutil.ReadTimestamps(bkt, &info.CreatedAt, &info.UpdatedAt); err != nil {
|
||||||
return err
|
return err
|
||||||
|
19
vendor/github.com/containerd/containerd/metadata/images.go
generated
vendored
19
vendor/github.com/containerd/containerd/metadata/images.go
generated
vendored
@ -11,6 +11,7 @@ import (
|
|||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
"github.com/containerd/containerd/filters"
|
"github.com/containerd/containerd/filters"
|
||||||
"github.com/containerd/containerd/images"
|
"github.com/containerd/containerd/images"
|
||||||
|
"github.com/containerd/containerd/labels"
|
||||||
"github.com/containerd/containerd/metadata/boltutil"
|
"github.com/containerd/containerd/metadata/boltutil"
|
||||||
"github.com/containerd/containerd/namespaces"
|
"github.com/containerd/containerd/namespaces"
|
||||||
digest "github.com/opencontainers/go-digest"
|
digest "github.com/opencontainers/go-digest"
|
||||||
@ -101,6 +102,10 @@ func (s *imageStore) Create(ctx context.Context, image images.Image) (images.Ima
|
|||||||
return images.Image{}, errors.Wrapf(errdefs.ErrInvalidArgument, "image name is required for create")
|
return images.Image{}, errors.Wrapf(errdefs.ErrInvalidArgument, "image name is required for create")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := validateImage(&image); err != nil {
|
||||||
|
return images.Image{}, err
|
||||||
|
}
|
||||||
|
|
||||||
return image, withImagesBucket(s.tx, namespace, func(bkt *bolt.Bucket) error {
|
return image, withImagesBucket(s.tx, namespace, func(bkt *bolt.Bucket) error {
|
||||||
ibkt, err := bkt.CreateBucket([]byte(image.Name))
|
ibkt, err := bkt.CreateBucket([]byte(image.Name))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -170,6 +175,10 @@ func (s *imageStore) Update(ctx context.Context, image images.Image, fieldpaths
|
|||||||
updated = image
|
updated = image
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := validateImage(&image); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
updated.CreatedAt = createdat
|
updated.CreatedAt = createdat
|
||||||
updated.UpdatedAt = time.Now().UTC()
|
updated.UpdatedAt = time.Now().UTC()
|
||||||
return writeImage(ibkt, &updated)
|
return writeImage(ibkt, &updated)
|
||||||
@ -191,6 +200,16 @@ func (s *imageStore) Delete(ctx context.Context, name string) error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func validateImage(image *images.Image) error {
|
||||||
|
for k, v := range image.Labels {
|
||||||
|
if err := labels.Validate(k, v); err != nil {
|
||||||
|
return errors.Wrapf(err, "image.Labels")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func readImage(image *images.Image, bkt *bolt.Bucket) error {
|
func readImage(image *images.Image, bkt *bolt.Bucket) error {
|
||||||
if err := boltutil.ReadTimestamps(bkt, &image.CreatedAt, &image.UpdatedAt); err != nil {
|
if err := boltutil.ReadTimestamps(bkt, &image.CreatedAt, &image.UpdatedAt); err != nil {
|
||||||
return err
|
return err
|
||||||
|
11
vendor/github.com/containerd/containerd/metadata/namespaces.go
generated
vendored
11
vendor/github.com/containerd/containerd/metadata/namespaces.go
generated
vendored
@ -5,6 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
|
l "github.com/containerd/containerd/labels"
|
||||||
"github.com/containerd/containerd/namespaces"
|
"github.com/containerd/containerd/namespaces"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
@ -27,6 +28,12 @@ func (s *namespaceStore) Create(ctx context.Context, namespace string, labels ma
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for k, v := range labels {
|
||||||
|
if err := l.Validate(k, v); err != nil {
|
||||||
|
return errors.Wrapf(err, "namespace.Labels")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// provides the already exists error.
|
// provides the already exists error.
|
||||||
bkt, err := topbkt.CreateBucket([]byte(namespace))
|
bkt, err := topbkt.CreateBucket([]byte(namespace))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -70,6 +77,10 @@ func (s *namespaceStore) Labels(ctx context.Context, namespace string) (map[stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *namespaceStore) SetLabel(ctx context.Context, namespace, key, value string) error {
|
func (s *namespaceStore) SetLabel(ctx context.Context, namespace, key, value string) error {
|
||||||
|
if err := l.Validate(key, value); err != nil {
|
||||||
|
return errors.Wrapf(err, "namespace.Labels")
|
||||||
|
}
|
||||||
|
|
||||||
return withNamespacesLabelsBucket(s.tx, namespace, func(bkt *bolt.Bucket) error {
|
return withNamespacesLabelsBucket(s.tx, namespace, func(bkt *bolt.Bucket) error {
|
||||||
if value == "" {
|
if value == "" {
|
||||||
return bkt.Delete([]byte(key))
|
return bkt.Delete([]byte(key))
|
||||||
|
22
vendor/github.com/containerd/containerd/metadata/snapshot.go
generated
vendored
22
vendor/github.com/containerd/containerd/metadata/snapshot.go
generated
vendored
@ -8,6 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
|
"github.com/containerd/containerd/labels"
|
||||||
"github.com/containerd/containerd/metadata/boltutil"
|
"github.com/containerd/containerd/metadata/boltutil"
|
||||||
"github.com/containerd/containerd/mount"
|
"github.com/containerd/containerd/mount"
|
||||||
"github.com/containerd/containerd/namespaces"
|
"github.com/containerd/containerd/namespaces"
|
||||||
@ -180,6 +181,9 @@ func (s *snapshotter) Update(ctx context.Context, info snapshot.Info, fieldpaths
|
|||||||
} else {
|
} else {
|
||||||
local.Labels = info.Labels
|
local.Labels = info.Labels
|
||||||
}
|
}
|
||||||
|
if err := validateSnapshot(&local); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
local.Updated = time.Now().UTC()
|
local.Updated = time.Now().UTC()
|
||||||
|
|
||||||
if err := boltutil.WriteTimestamps(sbkt, local.Created, local.Updated); err != nil {
|
if err := boltutil.WriteTimestamps(sbkt, local.Created, local.Updated); err != nil {
|
||||||
@ -257,6 +261,10 @@ func (s *snapshotter) createSnapshot(ctx context.Context, key, parent string, re
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := validateSnapshot(&base); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
var m []mount.Mount
|
var m []mount.Mount
|
||||||
if err := update(ctx, s.db, func(tx *bolt.Tx) error {
|
if err := update(ctx, s.db, func(tx *bolt.Tx) error {
|
||||||
bkt, err := createSnapshotterBucket(tx, ns, s.name)
|
bkt, err := createSnapshotterBucket(tx, ns, s.name)
|
||||||
@ -328,6 +336,10 @@ func (s *snapshotter) Commit(ctx context.Context, name, key string, opts ...snap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := validateSnapshot(&base); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return update(ctx, s.db, func(tx *bolt.Tx) error {
|
return update(ctx, s.db, func(tx *bolt.Tx) error {
|
||||||
bkt := getSnapshotterBucket(tx, ns, s.name)
|
bkt := getSnapshotterBucket(tx, ns, s.name)
|
||||||
if bkt == nil {
|
if bkt == nil {
|
||||||
@ -502,3 +514,13 @@ func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapsho
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func validateSnapshot(info *snapshot.Info) error {
|
||||||
|
for k, v := range info.Labels {
|
||||||
|
if err := labels.Validate(k, v); err != nil {
|
||||||
|
return errors.Wrapf(err, "info.Labels")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
56
vendor/github.com/containerd/containerd/process.go
generated
vendored
56
vendor/github.com/containerd/containerd/process.go
generated
vendored
@ -6,11 +6,8 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
eventsapi "github.com/containerd/containerd/api/services/events/v1"
|
|
||||||
"github.com/containerd/containerd/api/services/tasks/v1"
|
"github.com/containerd/containerd/api/services/tasks/v1"
|
||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
"github.com/containerd/containerd/runtime"
|
|
||||||
"github.com/containerd/typeurl"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -121,54 +118,25 @@ func (p *process) Kill(ctx context.Context, s syscall.Signal, opts ...KillOpts)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *process) Wait(ctx context.Context) (<-chan ExitStatus, error) {
|
func (p *process) Wait(ctx context.Context) (<-chan ExitStatus, error) {
|
||||||
cancellable, cancel := context.WithCancel(ctx)
|
c := make(chan ExitStatus, 1)
|
||||||
eventstream, err := p.task.client.EventService().Subscribe(cancellable, &eventsapi.SubscribeRequest{
|
go func() {
|
||||||
Filters: []string{"topic==" + runtime.TaskExitEventTopic},
|
r, err := p.task.client.TaskService().Wait(ctx, &tasks.WaitRequest{
|
||||||
|
ContainerID: p.task.id,
|
||||||
|
ExecID: p.id,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cancel()
|
c <- ExitStatus{
|
||||||
return nil, err
|
code: UnknownExitStatus,
|
||||||
|
err: err,
|
||||||
}
|
}
|
||||||
// first check if the task has exited
|
|
||||||
status, err := p.Status(ctx)
|
|
||||||
if err != nil {
|
|
||||||
cancel()
|
|
||||||
return nil, errdefs.FromGRPC(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
chStatus := make(chan ExitStatus, 1)
|
|
||||||
if status.Status == Stopped {
|
|
||||||
cancel()
|
|
||||||
chStatus <- ExitStatus{code: status.ExitStatus, exitedAt: status.ExitTime}
|
|
||||||
return chStatus, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
go func() {
|
|
||||||
defer cancel()
|
|
||||||
chStatus <- ExitStatus{} // signal that the goroutine is running
|
|
||||||
for {
|
|
||||||
evt, err := eventstream.Recv()
|
|
||||||
if err != nil {
|
|
||||||
chStatus <- ExitStatus{code: UnknownExitStatus, err: err}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if typeurl.Is(evt.Event, &eventsapi.TaskExit{}) {
|
c <- ExitStatus{
|
||||||
v, err := typeurl.UnmarshalAny(evt.Event)
|
code: r.ExitStatus,
|
||||||
if err != nil {
|
exitedAt: r.ExitedAt,
|
||||||
chStatus <- ExitStatus{code: UnknownExitStatus, err: err}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
e := v.(*eventsapi.TaskExit)
|
|
||||||
if e.ID == p.id && e.ContainerID == p.task.id {
|
|
||||||
chStatus <- ExitStatus{code: e.ExitStatus, exitedAt: e.ExitedAt}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
return c, nil
|
||||||
<-chStatus // wait for the goroutine to be running
|
|
||||||
return chStatus, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *process) CloseIO(ctx context.Context, opts ...IOCloserOpts) error {
|
func (p *process) CloseIO(ctx context.Context, opts ...IOCloserOpts) error {
|
||||||
|
27
vendor/github.com/containerd/containerd/remotes/docker/fetcher.go
generated
vendored
27
vendor/github.com/containerd/containerd/remotes/docker/fetcher.go
generated
vendored
@ -7,6 +7,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/containerd/containerd/errdefs"
|
||||||
"github.com/containerd/containerd/images"
|
"github.com/containerd/containerd/images"
|
||||||
"github.com/containerd/containerd/log"
|
"github.com/containerd/containerd/log"
|
||||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
@ -26,7 +27,7 @@ func (r dockerFetcher) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.R
|
|||||||
},
|
},
|
||||||
))
|
))
|
||||||
|
|
||||||
paths, err := getV2URLPaths(desc)
|
urls, err := r.getV2URLPaths(ctx, desc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -36,9 +37,7 @@ func (r dockerFetcher) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.R
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, path := range paths {
|
for _, u := range urls {
|
||||||
u := r.url(path)
|
|
||||||
|
|
||||||
req, err := http.NewRequest(http.MethodGet, u, nil)
|
req, err := http.NewRequest(http.MethodGet, u, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -51,34 +50,44 @@ func (r dockerFetcher) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.R
|
|||||||
}
|
}
|
||||||
|
|
||||||
if resp.StatusCode > 299 {
|
if resp.StatusCode > 299 {
|
||||||
|
resp.Body.Close()
|
||||||
if resp.StatusCode == http.StatusNotFound {
|
if resp.StatusCode == http.StatusNotFound {
|
||||||
continue // try one of the other urls.
|
continue // try one of the other urls.
|
||||||
}
|
}
|
||||||
resp.Body.Close()
|
|
||||||
return nil, errors.Errorf("unexpected status code %v: %v", u, resp.Status)
|
return nil, errors.Errorf("unexpected status code %v: %v", u, resp.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
return resp.Body, nil
|
return resp.Body, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, errors.New("not found")
|
return nil, errors.Wrapf(errdefs.ErrNotFound,
|
||||||
|
"could not fetch content descriptor %v (%v) from remote",
|
||||||
|
desc.Digest, desc.MediaType)
|
||||||
}
|
}
|
||||||
|
|
||||||
// getV2URLPaths generates the candidate urls paths for the object based on the
|
// getV2URLPaths generates the candidate urls paths for the object based on the
|
||||||
// set of hints and the provided object id. URLs are returned in the order of
|
// set of hints and the provided object id. URLs are returned in the order of
|
||||||
// most to least likely succeed.
|
// most to least likely succeed.
|
||||||
func getV2URLPaths(desc ocispec.Descriptor) ([]string, error) {
|
func (r *dockerFetcher) getV2URLPaths(ctx context.Context, desc ocispec.Descriptor) ([]string, error) {
|
||||||
var urls []string
|
var urls []string
|
||||||
|
|
||||||
|
if len(desc.URLs) > 0 {
|
||||||
|
// handle fetch via external urls.
|
||||||
|
for _, u := range desc.URLs {
|
||||||
|
log.G(ctx).WithField("url", u).Debug("adding alternative url")
|
||||||
|
urls = append(urls, u)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch desc.MediaType {
|
switch desc.MediaType {
|
||||||
case images.MediaTypeDockerSchema2Manifest, images.MediaTypeDockerSchema2ManifestList,
|
case images.MediaTypeDockerSchema2Manifest, images.MediaTypeDockerSchema2ManifestList,
|
||||||
images.MediaTypeDockerSchema1Manifest,
|
images.MediaTypeDockerSchema1Manifest,
|
||||||
ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex:
|
ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex:
|
||||||
urls = append(urls, path.Join("manifests", desc.Digest.String()))
|
urls = append(urls, r.url(path.Join("manifests", desc.Digest.String())))
|
||||||
}
|
}
|
||||||
|
|
||||||
// always fallback to attempting to get the object out of the blobs store.
|
// always fallback to attempting to get the object out of the blobs store.
|
||||||
urls = append(urls, path.Join("blobs", desc.Digest.String()))
|
urls = append(urls, r.url(path.Join("blobs", desc.Digest.String())))
|
||||||
|
|
||||||
return urls, nil
|
return urls, nil
|
||||||
}
|
}
|
||||||
|
1
vendor/github.com/containerd/containerd/remotes/handlers.go
generated
vendored
1
vendor/github.com/containerd/containerd/remotes/handlers.go
generated
vendored
@ -27,6 +27,7 @@ func MakeRefKey(ctx context.Context, desc ocispec.Descriptor) string {
|
|||||||
case images.MediaTypeDockerSchema2ManifestList, ocispec.MediaTypeImageIndex:
|
case images.MediaTypeDockerSchema2ManifestList, ocispec.MediaTypeImageIndex:
|
||||||
return "index-" + desc.Digest.String()
|
return "index-" + desc.Digest.String()
|
||||||
case images.MediaTypeDockerSchema2Layer, images.MediaTypeDockerSchema2LayerGzip,
|
case images.MediaTypeDockerSchema2Layer, images.MediaTypeDockerSchema2LayerGzip,
|
||||||
|
images.MediaTypeDockerSchema2LayerForeign, images.MediaTypeDockerSchema2LayerForeignGzip,
|
||||||
ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerGzip,
|
ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerGzip,
|
||||||
ocispec.MediaTypeImageLayerNonDistributable, ocispec.MediaTypeImageLayerNonDistributableGzip:
|
ocispec.MediaTypeImageLayerNonDistributable, ocispec.MediaTypeImageLayerNonDistributableGzip:
|
||||||
return "layer-" + desc.Digest.String()
|
return "layer-" + desc.Digest.String()
|
||||||
|
15
vendor/github.com/containerd/containerd/runtime/events.go
generated
vendored
15
vendor/github.com/containerd/containerd/runtime/events.go
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
package runtime
|
|
||||||
|
|
||||||
const (
|
|
||||||
TaskCreateEventTopic = "/tasks/create"
|
|
||||||
TaskStartEventTopic = "/tasks/start"
|
|
||||||
TaskOOMEventTopic = "/tasks/oom"
|
|
||||||
TaskExitEventTopic = "/tasks/exit"
|
|
||||||
TaskDeleteEventTopic = "/tasks/delete"
|
|
||||||
TaskExecAddedEventTopic = "/tasks/exec-added"
|
|
||||||
TaskExecStartedEventTopic = "/tasks/exec-started"
|
|
||||||
TaskPausedEventTopic = "/tasks/paused"
|
|
||||||
TaskResumedEventTopic = "/tasks/resumed"
|
|
||||||
TaskCheckpointedEventTopic = "/tasks/checkpointed"
|
|
||||||
TaskUnknownTopic = "/tasks/?"
|
|
||||||
)
|
|
52
vendor/github.com/containerd/containerd/runtime/monitor.go
generated
vendored
52
vendor/github.com/containerd/containerd/runtime/monitor.go
generated
vendored
@ -1,52 +0,0 @@
|
|||||||
package runtime
|
|
||||||
|
|
||||||
// TaskMonitor provides an interface for monitoring of containers within containerd
|
|
||||||
type TaskMonitor interface {
|
|
||||||
// Monitor adds the provided container to the monitor
|
|
||||||
Monitor(Task) error
|
|
||||||
// Stop stops and removes the provided container from the monitor
|
|
||||||
Stop(Task) error
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewMultiTaskMonitor(monitors ...TaskMonitor) TaskMonitor {
|
|
||||||
return &multiTaskMonitor{
|
|
||||||
monitors: monitors,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewNoopMonitor() TaskMonitor {
|
|
||||||
return &noopTaskMonitor{}
|
|
||||||
}
|
|
||||||
|
|
||||||
type noopTaskMonitor struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (mm *noopTaskMonitor) Monitor(c Task) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (mm *noopTaskMonitor) Stop(c Task) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type multiTaskMonitor struct {
|
|
||||||
monitors []TaskMonitor
|
|
||||||
}
|
|
||||||
|
|
||||||
func (mm *multiTaskMonitor) Monitor(c Task) error {
|
|
||||||
for _, m := range mm.monitors {
|
|
||||||
if err := m.Monitor(c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (mm *multiTaskMonitor) Stop(c Task) error {
|
|
||||||
for _, m := range mm.monitors {
|
|
||||||
if err := m.Stop(c); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
51
vendor/github.com/containerd/containerd/runtime/runtime.go
generated
vendored
51
vendor/github.com/containerd/containerd/runtime/runtime.go
generated
vendored
@ -1,51 +0,0 @@
|
|||||||
package runtime
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/containerd/containerd/mount"
|
|
||||||
"github.com/gogo/protobuf/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
type IO struct {
|
|
||||||
Stdin string
|
|
||||||
Stdout string
|
|
||||||
Stderr string
|
|
||||||
Terminal bool
|
|
||||||
}
|
|
||||||
|
|
||||||
type CreateOpts struct {
|
|
||||||
// Spec is the OCI runtime spec
|
|
||||||
Spec *types.Any
|
|
||||||
// Rootfs mounts to perform to gain access to the container's filesystem
|
|
||||||
Rootfs []mount.Mount
|
|
||||||
// IO for the container's main process
|
|
||||||
IO IO
|
|
||||||
// Checkpoint digest to restore container state
|
|
||||||
Checkpoint string
|
|
||||||
// Options for the runtime and container
|
|
||||||
Options *types.Any
|
|
||||||
}
|
|
||||||
|
|
||||||
type Exit struct {
|
|
||||||
Pid uint32
|
|
||||||
Status uint32
|
|
||||||
Timestamp time.Time
|
|
||||||
}
|
|
||||||
|
|
||||||
// Runtime is responsible for the creation of containers for a certain platform,
|
|
||||||
// arch, or custom usage.
|
|
||||||
type Runtime interface {
|
|
||||||
// ID of the runtime
|
|
||||||
ID() string
|
|
||||||
// Create creates a task with the provided id and options.
|
|
||||||
Create(ctx context.Context, id string, opts CreateOpts) (Task, error)
|
|
||||||
// Get returns a task.
|
|
||||||
Get(context.Context, string) (Task, error)
|
|
||||||
// Tasks returns all the current tasks for the runtime.
|
|
||||||
// Any container runs at most one task at a time.
|
|
||||||
Tasks(context.Context) ([]Task, error)
|
|
||||||
// Delete removes the task in the runtime.
|
|
||||||
Delete(context.Context, Task) (*Exit, error)
|
|
||||||
}
|
|
92
vendor/github.com/containerd/containerd/runtime/task.go
generated
vendored
92
vendor/github.com/containerd/containerd/runtime/task.go
generated
vendored
@ -1,92 +0,0 @@
|
|||||||
package runtime
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gogo/protobuf/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
type TaskInfo struct {
|
|
||||||
ID string
|
|
||||||
Runtime string
|
|
||||||
Spec []byte
|
|
||||||
Namespace string
|
|
||||||
}
|
|
||||||
|
|
||||||
type Process interface {
|
|
||||||
ID() string
|
|
||||||
// State returns the process state
|
|
||||||
State(context.Context) (State, error)
|
|
||||||
// Kill signals a container
|
|
||||||
Kill(context.Context, uint32, bool) error
|
|
||||||
// Pty resizes the processes pty/console
|
|
||||||
ResizePty(context.Context, ConsoleSize) error
|
|
||||||
// CloseStdin closes the processes stdin
|
|
||||||
CloseIO(context.Context) error
|
|
||||||
// Start the container's user defined process
|
|
||||||
Start(context.Context) error
|
|
||||||
}
|
|
||||||
|
|
||||||
type Task interface {
|
|
||||||
Process
|
|
||||||
|
|
||||||
// Information of the container
|
|
||||||
Info() TaskInfo
|
|
||||||
// Pause pauses the container process
|
|
||||||
Pause(context.Context) error
|
|
||||||
// Resume unpauses the container process
|
|
||||||
Resume(context.Context) error
|
|
||||||
// Exec adds a process into the container
|
|
||||||
Exec(context.Context, string, ExecOpts) (Process, error)
|
|
||||||
// Pids returns all pids
|
|
||||||
Pids(context.Context) ([]uint32, error)
|
|
||||||
// Checkpoint checkpoints a container to an image with live system data
|
|
||||||
Checkpoint(context.Context, string, *types.Any) error
|
|
||||||
// DeleteProcess deletes a specific exec process via its id
|
|
||||||
DeleteProcess(context.Context, string) (*Exit, error)
|
|
||||||
// Update sets the provided resources to a running task
|
|
||||||
Update(context.Context, *types.Any) error
|
|
||||||
// Process returns a process within the task for the provided id
|
|
||||||
Process(context.Context, string) (Process, error)
|
|
||||||
// Metrics returns runtime specific metrics for a task
|
|
||||||
Metrics(context.Context) (interface{}, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
type ExecOpts struct {
|
|
||||||
Spec *types.Any
|
|
||||||
IO IO
|
|
||||||
}
|
|
||||||
|
|
||||||
type ConsoleSize struct {
|
|
||||||
Width uint32
|
|
||||||
Height uint32
|
|
||||||
}
|
|
||||||
|
|
||||||
type Status int
|
|
||||||
|
|
||||||
const (
|
|
||||||
CreatedStatus Status = iota + 1
|
|
||||||
RunningStatus
|
|
||||||
StoppedStatus
|
|
||||||
DeletedStatus
|
|
||||||
PausedStatus
|
|
||||||
PausingStatus
|
|
||||||
)
|
|
||||||
|
|
||||||
type State struct {
|
|
||||||
// Status is the current status of the container
|
|
||||||
Status Status
|
|
||||||
// Pid is the main process id for the container
|
|
||||||
Pid uint32
|
|
||||||
// ExitStatus of the process
|
|
||||||
// Only valid if the Status is Stopped
|
|
||||||
ExitStatus uint32
|
|
||||||
// ExitedAt is the time at which the process exited
|
|
||||||
// Only valid if the Status is Stopped
|
|
||||||
ExitedAt time.Time
|
|
||||||
Stdin string
|
|
||||||
Stdout string
|
|
||||||
Stderr string
|
|
||||||
Terminal bool
|
|
||||||
}
|
|
95
vendor/github.com/containerd/containerd/runtime/task_list.go
generated
vendored
95
vendor/github.com/containerd/containerd/runtime/task_list.go
generated
vendored
@ -1,95 +0,0 @@
|
|||||||
package runtime
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"sync"
|
|
||||||
|
|
||||||
"github.com/containerd/containerd/namespaces"
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
ErrTaskNotExists = errors.New("task does not exist")
|
|
||||||
ErrTaskAlreadyExists = errors.New("task already exists")
|
|
||||||
)
|
|
||||||
|
|
||||||
func NewTaskList() *TaskList {
|
|
||||||
return &TaskList{
|
|
||||||
tasks: make(map[string]map[string]Task),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type TaskList struct {
|
|
||||||
mu sync.Mutex
|
|
||||||
tasks map[string]map[string]Task
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *TaskList) Get(ctx context.Context, id string) (Task, error) {
|
|
||||||
l.mu.Lock()
|
|
||||||
defer l.mu.Unlock()
|
|
||||||
namespace, err := namespaces.NamespaceRequired(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
tasks, ok := l.tasks[namespace]
|
|
||||||
if !ok {
|
|
||||||
return nil, ErrTaskNotExists
|
|
||||||
}
|
|
||||||
t, ok := tasks[id]
|
|
||||||
if !ok {
|
|
||||||
return nil, ErrTaskNotExists
|
|
||||||
}
|
|
||||||
return t, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *TaskList) GetAll(ctx context.Context) ([]Task, error) {
|
|
||||||
namespace, err := namespaces.NamespaceRequired(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
var o []Task
|
|
||||||
tasks, ok := l.tasks[namespace]
|
|
||||||
if !ok {
|
|
||||||
return o, nil
|
|
||||||
}
|
|
||||||
for _, t := range tasks {
|
|
||||||
o = append(o, t)
|
|
||||||
}
|
|
||||||
return o, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *TaskList) Add(ctx context.Context, t Task) error {
|
|
||||||
namespace, err := namespaces.NamespaceRequired(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return l.AddWithNamespace(namespace, t)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *TaskList) AddWithNamespace(namespace string, t Task) error {
|
|
||||||
l.mu.Lock()
|
|
||||||
defer l.mu.Unlock()
|
|
||||||
|
|
||||||
id := t.ID()
|
|
||||||
if _, ok := l.tasks[namespace]; !ok {
|
|
||||||
l.tasks[namespace] = make(map[string]Task)
|
|
||||||
}
|
|
||||||
if _, ok := l.tasks[namespace][id]; ok {
|
|
||||||
return errors.Wrap(ErrTaskAlreadyExists, id)
|
|
||||||
}
|
|
||||||
l.tasks[namespace][id] = t
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *TaskList) Delete(ctx context.Context, t Task) {
|
|
||||||
l.mu.Lock()
|
|
||||||
defer l.mu.Unlock()
|
|
||||||
namespace, err := namespaces.NamespaceRequired(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
tasks, ok := l.tasks[namespace]
|
|
||||||
if ok {
|
|
||||||
delete(tasks, t.ID())
|
|
||||||
}
|
|
||||||
}
|
|
18
vendor/github.com/containerd/containerd/runtime/typeurl.go
generated
vendored
18
vendor/github.com/containerd/containerd/runtime/typeurl.go
generated
vendored
@ -1,18 +0,0 @@
|
|||||||
package runtime
|
|
||||||
|
|
||||||
import (
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/containerd/typeurl"
|
|
||||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
const prefix = "types.containerd.io"
|
|
||||||
// register TypeUrls for commonly marshaled external types
|
|
||||||
major := strconv.Itoa(specs.VersionMajor)
|
|
||||||
typeurl.Register(&specs.Spec{}, prefix, "opencontainers/runtime-spec", major, "Spec")
|
|
||||||
typeurl.Register(&specs.Process{}, prefix, "opencontainers/runtime-spec", major, "Process")
|
|
||||||
typeurl.Register(&specs.LinuxResources{}, prefix, "opencontainers/runtime-spec", major, "LinuxResources")
|
|
||||||
typeurl.Register(&specs.WindowsResources{}, prefix, "opencontainers/runtime-spec", major, "WindowsResources")
|
|
||||||
}
|
|
2
vendor/github.com/containerd/containerd/services/content/service.go
generated
vendored
2
vendor/github.com/containerd/containerd/services/content/service.go
generated
vendored
@ -354,7 +354,7 @@ func (s *Service) Write(session api.Content_WriteServer) (err error) {
|
|||||||
// 2. Compress inline.
|
// 2. Compress inline.
|
||||||
// 3. Validate digest and size (maybe).
|
// 3. Validate digest and size (maybe).
|
||||||
//
|
//
|
||||||
// Supporting these two paths is quite awkward but it let's both API
|
// Supporting these two paths is quite awkward but it lets both API
|
||||||
// users use the same writer style for each with a minimum of overhead.
|
// users use the same writer style for each with a minimum of overhead.
|
||||||
if req.Expected != "" {
|
if req.Expected != "" {
|
||||||
if expected != "" && expected != req.Expected {
|
if expected != "" && expected != req.Expected {
|
||||||
|
82
vendor/github.com/containerd/containerd/task.go
generated
vendored
82
vendor/github.com/containerd/containerd/task.go
generated
vendored
@ -12,7 +12,6 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
eventsapi "github.com/containerd/containerd/api/services/events/v1"
|
|
||||||
"github.com/containerd/containerd/api/services/tasks/v1"
|
"github.com/containerd/containerd/api/services/tasks/v1"
|
||||||
"github.com/containerd/containerd/api/types"
|
"github.com/containerd/containerd/api/types"
|
||||||
"github.com/containerd/containerd/content"
|
"github.com/containerd/containerd/content"
|
||||||
@ -20,7 +19,6 @@ import (
|
|||||||
"github.com/containerd/containerd/mount"
|
"github.com/containerd/containerd/mount"
|
||||||
"github.com/containerd/containerd/plugin"
|
"github.com/containerd/containerd/plugin"
|
||||||
"github.com/containerd/containerd/rootfs"
|
"github.com/containerd/containerd/rootfs"
|
||||||
"github.com/containerd/containerd/runtime"
|
|
||||||
"github.com/containerd/typeurl"
|
"github.com/containerd/typeurl"
|
||||||
digest "github.com/opencontainers/go-digest"
|
digest "github.com/opencontainers/go-digest"
|
||||||
"github.com/opencontainers/image-spec/specs-go/v1"
|
"github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
@ -136,7 +134,6 @@ type task struct {
|
|||||||
pid uint32
|
pid uint32
|
||||||
|
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
deferred *tasks.CreateTaskRequest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pid returns the pid or process id for the task
|
// Pid returns the pid or process id for the task
|
||||||
@ -145,28 +142,15 @@ func (t *task) Pid() uint32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *task) Start(ctx context.Context) error {
|
func (t *task) Start(ctx context.Context) error {
|
||||||
t.mu.Lock()
|
r, err := t.client.TaskService().Start(ctx, &tasks.StartRequest{
|
||||||
deferred := t.deferred
|
|
||||||
t.mu.Unlock()
|
|
||||||
if deferred != nil {
|
|
||||||
response, err := t.client.TaskService().Create(ctx, deferred)
|
|
||||||
t.mu.Lock()
|
|
||||||
t.deferred = nil
|
|
||||||
t.mu.Unlock()
|
|
||||||
if err != nil {
|
|
||||||
t.io.Close()
|
|
||||||
return errdefs.FromGRPC(err)
|
|
||||||
}
|
|
||||||
t.pid = response.Pid
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
_, err := t.client.TaskService().Start(ctx, &tasks.StartRequest{
|
|
||||||
ContainerID: t.id,
|
ContainerID: t.id,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.io.Close()
|
t.io.Close()
|
||||||
}
|
|
||||||
return errdefs.FromGRPC(err)
|
return errdefs.FromGRPC(err)
|
||||||
|
}
|
||||||
|
t.pid = r.Pid
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *task) Kill(ctx context.Context, s syscall.Signal, opts ...KillOpts) error {
|
func (t *task) Kill(ctx context.Context, s syscall.Signal, opts ...KillOpts) error {
|
||||||
@ -216,60 +200,24 @@ func (t *task) Status(ctx context.Context) (Status, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *task) Wait(ctx context.Context) (<-chan ExitStatus, error) {
|
func (t *task) Wait(ctx context.Context) (<-chan ExitStatus, error) {
|
||||||
cancellable, cancel := context.WithCancel(ctx)
|
c := make(chan ExitStatus, 1)
|
||||||
eventstream, err := t.client.EventService().Subscribe(cancellable, &eventsapi.SubscribeRequest{
|
go func() {
|
||||||
Filters: []string{"topic==" + runtime.TaskExitEventTopic},
|
r, err := t.client.TaskService().Wait(ctx, &tasks.WaitRequest{
|
||||||
|
ContainerID: t.id,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cancel()
|
c <- ExitStatus{
|
||||||
return nil, errdefs.FromGRPC(err)
|
code: UnknownExitStatus,
|
||||||
|
err: err,
|
||||||
}
|
}
|
||||||
|
|
||||||
chStatus := make(chan ExitStatus, 1)
|
|
||||||
|
|
||||||
t.mu.Lock()
|
|
||||||
checkpoint := t.deferred != nil
|
|
||||||
t.mu.Unlock()
|
|
||||||
if !checkpoint {
|
|
||||||
// first check if the task has exited
|
|
||||||
status, err := t.Status(ctx)
|
|
||||||
if err != nil {
|
|
||||||
cancel()
|
|
||||||
return nil, errdefs.FromGRPC(err)
|
|
||||||
}
|
|
||||||
if status.Status == Stopped {
|
|
||||||
cancel()
|
|
||||||
chStatus <- ExitStatus{code: status.ExitStatus, exitedAt: status.ExitTime}
|
|
||||||
return chStatus, nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
go func() {
|
|
||||||
defer cancel()
|
|
||||||
chStatus <- ExitStatus{} // signal that goroutine is running
|
|
||||||
for {
|
|
||||||
evt, err := eventstream.Recv()
|
|
||||||
if err != nil {
|
|
||||||
chStatus <- ExitStatus{code: UnknownExitStatus, err: errdefs.FromGRPC(err)}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if typeurl.Is(evt.Event, &eventsapi.TaskExit{}) {
|
c <- ExitStatus{
|
||||||
v, err := typeurl.UnmarshalAny(evt.Event)
|
code: r.ExitStatus,
|
||||||
if err != nil {
|
exitedAt: r.ExitedAt,
|
||||||
chStatus <- ExitStatus{code: UnknownExitStatus, err: err}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
e := v.(*eventsapi.TaskExit)
|
|
||||||
if e.ContainerID == t.id && e.Pid == t.pid {
|
|
||||||
chStatus <- ExitStatus{code: e.ExitStatus, exitedAt: e.ExitedAt}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
return c, nil
|
||||||
<-chStatus // wait for the goroutine to be running
|
|
||||||
return chStatus, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete deletes the task and its runtime state
|
// Delete deletes the task and its runtime state
|
||||||
|
Loading…
Reference in New Issue
Block a user