From 87a8833fa5c517b468ae89f15871515425160146 Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Tue, 25 Apr 2017 13:40:11 +0800 Subject: [PATCH] CRI: clarify the behavior of PodSandboxStatus and ContainerStatus --- pkg/kubelet/api/v1alpha1/runtime/api.pb.go | 12 ++++++++---- pkg/kubelet/api/v1alpha1/runtime/api.proto | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pkg/kubelet/api/v1alpha1/runtime/api.pb.go b/pkg/kubelet/api/v1alpha1/runtime/api.pb.go index 2af5f19702d..08af4f39b46 100644 --- a/pkg/kubelet/api/v1alpha1/runtime/api.pb.go +++ b/pkg/kubelet/api/v1alpha1/runtime/api.pb.go @@ -2937,7 +2937,8 @@ type RuntimeServiceClient interface { // This call is idempotent, and must not return an error if the sandbox has // already been removed. RemovePodSandbox(ctx context.Context, in *RemovePodSandboxRequest, opts ...grpc.CallOption) (*RemovePodSandboxResponse, error) - // PodSandboxStatus returns the status of the PodSandbox. + // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not + // present, returns an error. PodSandboxStatus(ctx context.Context, in *PodSandboxStatusRequest, opts ...grpc.CallOption) (*PodSandboxStatusResponse, error) // ListPodSandbox returns a list of PodSandboxes. ListPodSandbox(ctx context.Context, in *ListPodSandboxRequest, opts ...grpc.CallOption) (*ListPodSandboxResponse, error) @@ -2957,7 +2958,8 @@ type RuntimeServiceClient interface { RemoveContainer(ctx context.Context, in *RemoveContainerRequest, opts ...grpc.CallOption) (*RemoveContainerResponse, error) // ListContainers lists all containers by filters. ListContainers(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) - // ContainerStatus returns status of the container. + // ContainerStatus returns status of the container. If the container is not + // present, returns an error. ContainerStatus(ctx context.Context, in *ContainerStatusRequest, opts ...grpc.CallOption) (*ContainerStatusResponse, error) // ExecSync runs a command in a container synchronously. ExecSync(ctx context.Context, in *ExecSyncRequest, opts ...grpc.CallOption) (*ExecSyncResponse, error) @@ -3166,7 +3168,8 @@ type RuntimeServiceServer interface { // This call is idempotent, and must not return an error if the sandbox has // already been removed. RemovePodSandbox(context.Context, *RemovePodSandboxRequest) (*RemovePodSandboxResponse, error) - // PodSandboxStatus returns the status of the PodSandbox. + // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not + // present, returns an error. PodSandboxStatus(context.Context, *PodSandboxStatusRequest) (*PodSandboxStatusResponse, error) // ListPodSandbox returns a list of PodSandboxes. ListPodSandbox(context.Context, *ListPodSandboxRequest) (*ListPodSandboxResponse, error) @@ -3186,7 +3189,8 @@ type RuntimeServiceServer interface { RemoveContainer(context.Context, *RemoveContainerRequest) (*RemoveContainerResponse, error) // ListContainers lists all containers by filters. ListContainers(context.Context, *ListContainersRequest) (*ListContainersResponse, error) - // ContainerStatus returns status of the container. + // ContainerStatus returns status of the container. If the container is not + // present, returns an error. ContainerStatus(context.Context, *ContainerStatusRequest) (*ContainerStatusResponse, error) // ExecSync runs a command in a container synchronously. ExecSync(context.Context, *ExecSyncRequest) (*ExecSyncResponse, error) diff --git a/pkg/kubelet/api/v1alpha1/runtime/api.proto b/pkg/kubelet/api/v1alpha1/runtime/api.proto index 8d8b510b34a..633a322793d 100644 --- a/pkg/kubelet/api/v1alpha1/runtime/api.proto +++ b/pkg/kubelet/api/v1alpha1/runtime/api.proto @@ -36,7 +36,8 @@ service RuntimeService { // This call is idempotent, and must not return an error if the sandbox has // already been removed. rpc RemovePodSandbox(RemovePodSandboxRequest) returns (RemovePodSandboxResponse) {} - // PodSandboxStatus returns the status of the PodSandbox. + // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not + // present, returns an error. rpc PodSandboxStatus(PodSandboxStatusRequest) returns (PodSandboxStatusResponse) {} // ListPodSandbox returns a list of PodSandboxes. rpc ListPodSandbox(ListPodSandboxRequest) returns (ListPodSandboxResponse) {} @@ -57,7 +58,8 @@ service RuntimeService { rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse) {} // ListContainers lists all containers by filters. rpc ListContainers(ListContainersRequest) returns (ListContainersResponse) {} - // ContainerStatus returns status of the container. + // ContainerStatus returns status of the container. If the container is not + // present, returns an error. rpc ContainerStatus(ContainerStatusRequest) returns (ContainerStatusResponse) {} // ExecSync runs a command in a container synchronously.