Merge pull request #1177 from jterry75/togrpc_errors
Return gRPC errors from instrumentedService
This commit is contained in:
commit
98c266fb86
@ -23,6 +23,7 @@ import (
|
|||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
|
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
|
||||||
|
|
||||||
|
"github.com/containerd/containerd/errdefs"
|
||||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||||
"github.com/containerd/cri/pkg/log"
|
"github.com/containerd/cri/pkg/log"
|
||||||
)
|
)
|
||||||
@ -59,7 +60,8 @@ func (in *instrumentedService) RunPodSandbox(ctx context.Context, r *runtime.Run
|
|||||||
logrus.Infof("RunPodSandbox for %+v returns sandbox id %q", r.GetConfig().GetMetadata(), res.GetPodSandboxId())
|
logrus.Infof("RunPodSandbox for %+v returns sandbox id %q", r.GetConfig().GetMetadata(), res.GetPodSandboxId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.RunPodSandbox(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.RunPodSandbox(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ListPodSandbox(ctx context.Context, r *runtime.ListPodSandboxRequest) (res *runtime.ListPodSandboxResponse, err error) {
|
func (in *instrumentedService) ListPodSandbox(ctx context.Context, r *runtime.ListPodSandboxRequest) (res *runtime.ListPodSandboxResponse, err error) {
|
||||||
@ -74,7 +76,8 @@ func (in *instrumentedService) ListPodSandbox(ctx context.Context, r *runtime.Li
|
|||||||
log.Tracef("ListPodSandbox returns pod sandboxes %+v", res.GetItems())
|
log.Tracef("ListPodSandbox returns pod sandboxes %+v", res.GetItems())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ListPodSandbox(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ListPodSandbox(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) PodSandboxStatus(ctx context.Context, r *runtime.PodSandboxStatusRequest) (res *runtime.PodSandboxStatusResponse, err error) {
|
func (in *instrumentedService) PodSandboxStatus(ctx context.Context, r *runtime.PodSandboxStatusRequest) (res *runtime.PodSandboxStatusResponse, err error) {
|
||||||
@ -89,7 +92,8 @@ func (in *instrumentedService) PodSandboxStatus(ctx context.Context, r *runtime.
|
|||||||
log.Tracef("PodSandboxStatus for %q returns status %+v", r.GetPodSandboxId(), res.GetStatus())
|
log.Tracef("PodSandboxStatus for %q returns status %+v", r.GetPodSandboxId(), res.GetStatus())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.PodSandboxStatus(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.PodSandboxStatus(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) StopPodSandbox(ctx context.Context, r *runtime.StopPodSandboxRequest) (_ *runtime.StopPodSandboxResponse, err error) {
|
func (in *instrumentedService) StopPodSandbox(ctx context.Context, r *runtime.StopPodSandboxRequest) (_ *runtime.StopPodSandboxResponse, err error) {
|
||||||
@ -104,7 +108,8 @@ func (in *instrumentedService) StopPodSandbox(ctx context.Context, r *runtime.St
|
|||||||
logrus.Infof("StopPodSandbox for %q returns successfully", r.GetPodSandboxId())
|
logrus.Infof("StopPodSandbox for %q returns successfully", r.GetPodSandboxId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.StopPodSandbox(ctrdutil.WithNamespace(ctx), r)
|
res, err := in.c.StopPodSandbox(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodSandboxRequest) (_ *runtime.RemovePodSandboxResponse, err error) {
|
func (in *instrumentedService) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodSandboxRequest) (_ *runtime.RemovePodSandboxResponse, err error) {
|
||||||
@ -119,7 +124,8 @@ func (in *instrumentedService) RemovePodSandbox(ctx context.Context, r *runtime.
|
|||||||
logrus.Infof("RemovePodSandbox %q returns successfully", r.GetPodSandboxId())
|
logrus.Infof("RemovePodSandbox %q returns successfully", r.GetPodSandboxId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.RemovePodSandbox(ctrdutil.WithNamespace(ctx), r)
|
res, err := in.c.RemovePodSandbox(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) PortForward(ctx context.Context, r *runtime.PortForwardRequest) (res *runtime.PortForwardResponse, err error) {
|
func (in *instrumentedService) PortForward(ctx context.Context, r *runtime.PortForwardRequest) (res *runtime.PortForwardResponse, err error) {
|
||||||
@ -134,7 +140,8 @@ func (in *instrumentedService) PortForward(ctx context.Context, r *runtime.PortF
|
|||||||
logrus.Infof("Portforward for %q returns URL %q", r.GetPodSandboxId(), res.GetUrl())
|
logrus.Infof("Portforward for %q returns URL %q", r.GetPodSandboxId(), res.GetUrl())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.PortForward(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.PortForward(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) CreateContainer(ctx context.Context, r *runtime.CreateContainerRequest) (res *runtime.CreateContainerResponse, err error) {
|
func (in *instrumentedService) CreateContainer(ctx context.Context, r *runtime.CreateContainerRequest) (res *runtime.CreateContainerResponse, err error) {
|
||||||
@ -152,7 +159,8 @@ func (in *instrumentedService) CreateContainer(ctx context.Context, r *runtime.C
|
|||||||
r.GetPodSandboxId(), r.GetConfig().GetMetadata(), res.GetContainerId())
|
r.GetPodSandboxId(), r.GetConfig().GetMetadata(), res.GetContainerId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.CreateContainer(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.CreateContainer(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) StartContainer(ctx context.Context, r *runtime.StartContainerRequest) (_ *runtime.StartContainerResponse, err error) {
|
func (in *instrumentedService) StartContainer(ctx context.Context, r *runtime.StartContainerRequest) (_ *runtime.StartContainerResponse, err error) {
|
||||||
@ -167,7 +175,8 @@ func (in *instrumentedService) StartContainer(ctx context.Context, r *runtime.St
|
|||||||
logrus.Infof("StartContainer for %q returns successfully", r.GetContainerId())
|
logrus.Infof("StartContainer for %q returns successfully", r.GetContainerId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.StartContainer(ctrdutil.WithNamespace(ctx), r)
|
res, err := in.c.StartContainer(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ListContainers(ctx context.Context, r *runtime.ListContainersRequest) (res *runtime.ListContainersResponse, err error) {
|
func (in *instrumentedService) ListContainers(ctx context.Context, r *runtime.ListContainersRequest) (res *runtime.ListContainersResponse, err error) {
|
||||||
@ -183,7 +192,8 @@ func (in *instrumentedService) ListContainers(ctx context.Context, r *runtime.Li
|
|||||||
r.GetFilter(), res.GetContainers())
|
r.GetFilter(), res.GetContainers())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ListContainers(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ListContainers(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ContainerStatus(ctx context.Context, r *runtime.ContainerStatusRequest) (res *runtime.ContainerStatusResponse, err error) {
|
func (in *instrumentedService) ContainerStatus(ctx context.Context, r *runtime.ContainerStatusRequest) (res *runtime.ContainerStatusResponse, err error) {
|
||||||
@ -198,7 +208,8 @@ func (in *instrumentedService) ContainerStatus(ctx context.Context, r *runtime.C
|
|||||||
log.Tracef("ContainerStatus for %q returns status %+v", r.GetContainerId(), res.GetStatus())
|
log.Tracef("ContainerStatus for %q returns status %+v", r.GetContainerId(), res.GetStatus())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ContainerStatus(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ContainerStatus(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) StopContainer(ctx context.Context, r *runtime.StopContainerRequest) (res *runtime.StopContainerResponse, err error) {
|
func (in *instrumentedService) StopContainer(ctx context.Context, r *runtime.StopContainerRequest) (res *runtime.StopContainerResponse, err error) {
|
||||||
@ -213,7 +224,8 @@ func (in *instrumentedService) StopContainer(ctx context.Context, r *runtime.Sto
|
|||||||
logrus.Infof("StopContainer for %q returns successfully", r.GetContainerId())
|
logrus.Infof("StopContainer for %q returns successfully", r.GetContainerId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.StopContainer(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.StopContainer(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) RemoveContainer(ctx context.Context, r *runtime.RemoveContainerRequest) (res *runtime.RemoveContainerResponse, err error) {
|
func (in *instrumentedService) RemoveContainer(ctx context.Context, r *runtime.RemoveContainerRequest) (res *runtime.RemoveContainerResponse, err error) {
|
||||||
@ -228,7 +240,8 @@ func (in *instrumentedService) RemoveContainer(ctx context.Context, r *runtime.R
|
|||||||
logrus.Infof("RemoveContainer for %q returns successfully", r.GetContainerId())
|
logrus.Infof("RemoveContainer for %q returns successfully", r.GetContainerId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.RemoveContainer(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.RemoveContainer(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ExecSync(ctx context.Context, r *runtime.ExecSyncRequest) (res *runtime.ExecSyncResponse, err error) {
|
func (in *instrumentedService) ExecSync(ctx context.Context, r *runtime.ExecSyncRequest) (res *runtime.ExecSyncResponse, err error) {
|
||||||
@ -245,7 +258,8 @@ func (in *instrumentedService) ExecSync(ctx context.Context, r *runtime.ExecSync
|
|||||||
res.GetStdout(), res.GetStderr())
|
res.GetStdout(), res.GetStderr())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ExecSync(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ExecSync(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) Exec(ctx context.Context, r *runtime.ExecRequest) (res *runtime.ExecResponse, err error) {
|
func (in *instrumentedService) Exec(ctx context.Context, r *runtime.ExecRequest) (res *runtime.ExecResponse, err error) {
|
||||||
@ -261,7 +275,8 @@ func (in *instrumentedService) Exec(ctx context.Context, r *runtime.ExecRequest)
|
|||||||
logrus.Infof("Exec for %q returns URL %q", r.GetContainerId(), res.GetUrl())
|
logrus.Infof("Exec for %q returns URL %q", r.GetContainerId(), res.GetUrl())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.Exec(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.Exec(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) Attach(ctx context.Context, r *runtime.AttachRequest) (res *runtime.AttachResponse, err error) {
|
func (in *instrumentedService) Attach(ctx context.Context, r *runtime.AttachRequest) (res *runtime.AttachResponse, err error) {
|
||||||
@ -276,7 +291,8 @@ func (in *instrumentedService) Attach(ctx context.Context, r *runtime.AttachRequ
|
|||||||
logrus.Infof("Attach for %q returns URL %q", r.GetContainerId(), res.Url)
|
logrus.Infof("Attach for %q returns URL %q", r.GetContainerId(), res.Url)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.Attach(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.Attach(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) UpdateContainerResources(ctx context.Context, r *runtime.UpdateContainerResourcesRequest) (res *runtime.UpdateContainerResourcesResponse, err error) {
|
func (in *instrumentedService) UpdateContainerResources(ctx context.Context, r *runtime.UpdateContainerResourcesRequest) (res *runtime.UpdateContainerResourcesResponse, err error) {
|
||||||
@ -291,7 +307,8 @@ func (in *instrumentedService) UpdateContainerResources(ctx context.Context, r *
|
|||||||
logrus.Infof("UpdateContainerResources for %q returns successfully", r.GetContainerId())
|
logrus.Infof("UpdateContainerResources for %q returns successfully", r.GetContainerId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.UpdateContainerResources(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.UpdateContainerResources(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) PullImage(ctx context.Context, r *runtime.PullImageRequest) (res *runtime.PullImageResponse, err error) {
|
func (in *instrumentedService) PullImage(ctx context.Context, r *runtime.PullImageRequest) (res *runtime.PullImageResponse, err error) {
|
||||||
@ -307,7 +324,8 @@ func (in *instrumentedService) PullImage(ctx context.Context, r *runtime.PullIma
|
|||||||
r.GetImage().GetImage(), res.GetImageRef())
|
r.GetImage().GetImage(), res.GetImageRef())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.PullImage(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.PullImage(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ListImages(ctx context.Context, r *runtime.ListImagesRequest) (res *runtime.ListImagesResponse, err error) {
|
func (in *instrumentedService) ListImages(ctx context.Context, r *runtime.ListImagesRequest) (res *runtime.ListImagesResponse, err error) {
|
||||||
@ -323,7 +341,8 @@ func (in *instrumentedService) ListImages(ctx context.Context, r *runtime.ListIm
|
|||||||
r.GetFilter(), res.GetImages())
|
r.GetFilter(), res.GetImages())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ListImages(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ListImages(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ImageStatus(ctx context.Context, r *runtime.ImageStatusRequest) (res *runtime.ImageStatusResponse, err error) {
|
func (in *instrumentedService) ImageStatus(ctx context.Context, r *runtime.ImageStatusRequest) (res *runtime.ImageStatusResponse, err error) {
|
||||||
@ -339,7 +358,8 @@ func (in *instrumentedService) ImageStatus(ctx context.Context, r *runtime.Image
|
|||||||
r.GetImage().GetImage(), res.GetImage())
|
r.GetImage().GetImage(), res.GetImage())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ImageStatus(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ImageStatus(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) RemoveImage(ctx context.Context, r *runtime.RemoveImageRequest) (_ *runtime.RemoveImageResponse, err error) {
|
func (in *instrumentedService) RemoveImage(ctx context.Context, r *runtime.RemoveImageRequest) (_ *runtime.RemoveImageResponse, err error) {
|
||||||
@ -354,7 +374,8 @@ func (in *instrumentedService) RemoveImage(ctx context.Context, r *runtime.Remov
|
|||||||
logrus.Infof("RemoveImage %q returns successfully", r.GetImage().GetImage())
|
logrus.Infof("RemoveImage %q returns successfully", r.GetImage().GetImage())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.RemoveImage(ctrdutil.WithNamespace(ctx), r)
|
res, err := in.c.RemoveImage(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ImageFsInfo(ctx context.Context, r *runtime.ImageFsInfoRequest) (res *runtime.ImageFsInfoResponse, err error) {
|
func (in *instrumentedService) ImageFsInfo(ctx context.Context, r *runtime.ImageFsInfoRequest) (res *runtime.ImageFsInfoResponse, err error) {
|
||||||
@ -369,7 +390,8 @@ func (in *instrumentedService) ImageFsInfo(ctx context.Context, r *runtime.Image
|
|||||||
logrus.Debugf("ImageFsInfo returns filesystem info %+v", res.ImageFilesystems)
|
logrus.Debugf("ImageFsInfo returns filesystem info %+v", res.ImageFilesystems)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ImageFsInfo(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ImageFsInfo(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ContainerStats(ctx context.Context, r *runtime.ContainerStatsRequest) (res *runtime.ContainerStatsResponse, err error) {
|
func (in *instrumentedService) ContainerStats(ctx context.Context, r *runtime.ContainerStatsRequest) (res *runtime.ContainerStatsResponse, err error) {
|
||||||
@ -384,7 +406,8 @@ func (in *instrumentedService) ContainerStats(ctx context.Context, r *runtime.Co
|
|||||||
logrus.Debugf("ContainerStats for %q returns stats %+v", r.GetContainerId(), res.GetStats())
|
logrus.Debugf("ContainerStats for %q returns stats %+v", r.GetContainerId(), res.GetStats())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ContainerStats(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ContainerStats(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ListContainerStats(ctx context.Context, r *runtime.ListContainerStatsRequest) (res *runtime.ListContainerStatsResponse, err error) {
|
func (in *instrumentedService) ListContainerStats(ctx context.Context, r *runtime.ListContainerStatsRequest) (res *runtime.ListContainerStatsResponse, err error) {
|
||||||
@ -399,7 +422,8 @@ func (in *instrumentedService) ListContainerStats(ctx context.Context, r *runtim
|
|||||||
log.Tracef("ListContainerStats returns stats %+v", res.GetStats())
|
log.Tracef("ListContainerStats returns stats %+v", res.GetStats())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ListContainerStats(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ListContainerStats(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) Status(ctx context.Context, r *runtime.StatusRequest) (res *runtime.StatusResponse, err error) {
|
func (in *instrumentedService) Status(ctx context.Context, r *runtime.StatusRequest) (res *runtime.StatusResponse, err error) {
|
||||||
@ -414,7 +438,8 @@ func (in *instrumentedService) Status(ctx context.Context, r *runtime.StatusRequ
|
|||||||
log.Tracef("Status returns status %+v", res.GetStatus())
|
log.Tracef("Status returns status %+v", res.GetStatus())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.Status(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.Status(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) Version(ctx context.Context, r *runtime.VersionRequest) (res *runtime.VersionResponse, err error) {
|
func (in *instrumentedService) Version(ctx context.Context, r *runtime.VersionRequest) (res *runtime.VersionResponse, err error) {
|
||||||
@ -429,7 +454,8 @@ func (in *instrumentedService) Version(ctx context.Context, r *runtime.VersionRe
|
|||||||
log.Tracef("Version returns %+v", res)
|
log.Tracef("Version returns %+v", res)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.Version(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.Version(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) UpdateRuntimeConfig(ctx context.Context, r *runtime.UpdateRuntimeConfigRequest) (res *runtime.UpdateRuntimeConfigResponse, err error) {
|
func (in *instrumentedService) UpdateRuntimeConfig(ctx context.Context, r *runtime.UpdateRuntimeConfigRequest) (res *runtime.UpdateRuntimeConfigResponse, err error) {
|
||||||
@ -444,7 +470,8 @@ func (in *instrumentedService) UpdateRuntimeConfig(ctx context.Context, r *runti
|
|||||||
logrus.Debug("UpdateRuntimeConfig returns returns successfully")
|
logrus.Debug("UpdateRuntimeConfig returns returns successfully")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.UpdateRuntimeConfig(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.UpdateRuntimeConfig(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (in *instrumentedService) ReopenContainerLog(ctx context.Context, r *runtime.ReopenContainerLogRequest) (res *runtime.ReopenContainerLogResponse, err error) {
|
func (in *instrumentedService) ReopenContainerLog(ctx context.Context, r *runtime.ReopenContainerLogRequest) (res *runtime.ReopenContainerLogResponse, err error) {
|
||||||
@ -459,5 +486,6 @@ func (in *instrumentedService) ReopenContainerLog(ctx context.Context, r *runtim
|
|||||||
logrus.Debugf("ReopenContainerLog for %q returns successfully", r.GetContainerId())
|
logrus.Debugf("ReopenContainerLog for %q returns successfully", r.GetContainerId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return in.c.ReopenContainerLog(ctrdutil.WithNamespace(ctx), r)
|
res, err = in.c.ReopenContainerLog(ctrdutil.WithNamespace(ctx), r)
|
||||||
|
return res, errdefs.ToGRPC(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user