Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] CRI pause/unpause container interface #2622

Closed
zhuangqh opened this issue Dec 27, 2018 · 2 comments
Closed

[feature request] CRI pause/unpause container interface #2622

zhuangqh opened this issue Dec 27, 2018 · 2 comments
Assignees
Labels
areas/cri kind/feature kind/feature-request This is a feature request from community for PouchContainer

Comments

@zhuangqh
Copy link
Contributor

Why you need it?

Under serverless situation, we may pre-allocate a batch of container which were ready to serve, waiting online. In order to reduce the cost of system resource, we stop these containers, and start them when they are required to serve.

I propose using pause container to balance the resource cost and application start-up time.

How it could be?

extend the CRI v1alpha2 interface, allow to pause/unpause a container through CRI.

service RuntimeService {
...
    // PauseContainer pauses the container.
    rpc PauseContainer(PauseContainerRequest) returns (PauseContainerResponse) {}
    // UnpauseContainer unpauses the container.
    rpc UnpauseContainer(UnpauseContainerRequest) returns (UnpauseContainerResponse) {}
...
}

message PauseContainerRequest {
    // ID of the container to pause.
    string container_id = 1;
}

message PauseContainerResponse {}

message UnpauseContainerRequest {
    // ID of the container to unpause.
    string container_id = 1;
}

message UnpauseContainerResponse {}

Other related information

CRI client interface (generated by protoc)

type RuntimeServiceClient interface {
...
	// PauseContainer pauses a container
	PauseContainer(ctx context.Context, in *PauseContainerRequest, opts ...grpc.CallOption) (*PauseContainerResponse, error)
	// UnpauseContainer unpauses a container to running
	UnpauseContainer(ctx context.Context, in *UnpauseContainerRequest, opts ...grpc.CallOption) (*UnpauseContainerResponse, error)
...
}
@pouchrobot pouchrobot added kind/feature kind/feature-request This is a feature request from community for PouchContainer labels Dec 27, 2018
@zhuangqh zhuangqh self-assigned this Dec 27, 2018
@zhuangqh
Copy link
Contributor Author

zhuangqh commented Dec 27, 2018

TODO

  • CRI interface implement
  • CRI test cover

@zhuangqh
Copy link
Contributor Author

test: alibaba-archive/cri-tools#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/cri kind/feature kind/feature-request This is a feature request from community for PouchContainer
Projects
None yet
Development

No branches or pull requests

2 participants