From 979a744122f1030bb6b9830f46d6f5d1a9311f71 Mon Sep 17 00:00:00 2001 From: Danny Canter Date: Thu, 16 Feb 2023 17:21:27 -0800 Subject: [PATCH] runtime/v2: Log BootstrapParams Recent work added the ability to use grpc for shims, it'd be nice to have a debug (or info perhaps) log to show what protocol and addr the shim sent over. Signed-off-by: Danny Canter --- runtime/v2/shim.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime/v2/shim.go b/runtime/v2/shim.go index cc1cf62f1..0fc94e80e 100644 --- a/runtime/v2/shim.go +++ b/runtime/v2/shim.go @@ -29,6 +29,7 @@ import ( "github.com/containerd/ttrpc" "github.com/hashicorp/go-multierror" + "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -220,6 +221,11 @@ func makeConnection(ctx context.Context, address string, onClose func()) (_ io.C params.Protocol = "ttrpc" } + log.G(ctx).WithFields(logrus.Fields{ + "address": params.Address, + "protocol": params.Protocol, + }).Debug("shim bootstrap parameters") + switch strings.ToLower(params.Protocol) { case "ttrpc": conn, err := client.Connect(params.Address, client.AnonReconnectDialer)