agent: add grpc interface for stat and resize operations

Add GetVolumeStats and ResizeVolume APIs for the runtime to query stat
and resize fs in the guest.

Fixes: #3454

Signed-off-by: Feng Wang <feng.wang@databricks.com>
This commit is contained in:
Feng Wang
2022-01-14 13:16:10 -08:00
parent e9b5a25502
commit 4e00c2377c
11 changed files with 2461 additions and 191 deletions

View File

@@ -12,6 +12,7 @@ option go_package = "github.com/kata-containers/kata-containers/src/runtime/virt
package grpc;
import "oci.proto";
import "csi.proto";
import "types.proto";
import "google/protobuf/empty.proto";
@@ -65,6 +66,8 @@ service AgentService {
rpc CopyFile(CopyFileRequest) returns (google.protobuf.Empty);
rpc GetOOMEvent(GetOOMEventRequest) returns (OOMEvent);
rpc AddSwap(AddSwapRequest) returns (google.protobuf.Empty);
rpc GetVolumeStats(VolumeStatsRequest) returns (VolumeStatsResponse);
rpc ResizeVolume(ResizeVolumeRequest) returns (google.protobuf.Empty);
}
message CreateContainerRequest {
@@ -505,3 +508,14 @@ message GetMetricsRequest {}
message Metrics {
string metrics = 1;
}
message VolumeStatsRequest {
// The volume path on the guest outside the container
string volume_guest_path = 1;
}
message ResizeVolumeRequest {
// Full VM guest path of the volume (outside the container)
string volume_guest_path = 1;
uint64 size = 2;
}