From 180eaf724eeca69b5e542d7761edf054b300da33 Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Tue, 9 May 2017 15:32:05 -0700 Subject: [PATCH] Don't print a warning when getting a healtcheck request Signed-off-by: Kenfe-Mickael Laventure --- cmd/containerd/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/containerd/main.go b/cmd/containerd/main.go index 9ca149ba4..c9ad9374d 100644 --- a/cmd/containerd/main.go +++ b/cmd/containerd/main.go @@ -14,6 +14,7 @@ import ( grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" gocontext "golang.org/x/net/context" "google.golang.org/grpc" + "google.golang.org/grpc/health/grpc_health_v1" "github.com/Sirupsen/logrus" "github.com/containerd/containerd" @@ -419,8 +420,10 @@ func interceptor(ctx gocontext.Context, ctx = log.WithModule(ctx, "rootfs") case imagesapi.ImagesServer: ctx = log.WithModule(ctx, "images") + case grpc_health_v1.HealthServer: + // No need to change the context default: - fmt.Printf("unknown GRPC server type: %#v\n", info.Server) + log.G(ctx).Warnf("unknown GRPC server type: %#v\n", info.Server) } return grpc_prometheus.UnaryServerInterceptor(ctx, req, info, handler) }