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 <danny@dcantah.dev>
This commit is contained in:
		| @@ -29,6 +29,7 @@ import ( | |||||||
|  |  | ||||||
| 	"github.com/containerd/ttrpc" | 	"github.com/containerd/ttrpc" | ||||||
| 	"github.com/hashicorp/go-multierror" | 	"github.com/hashicorp/go-multierror" | ||||||
|  | 	"github.com/sirupsen/logrus" | ||||||
| 	"google.golang.org/grpc" | 	"google.golang.org/grpc" | ||||||
| 	"google.golang.org/grpc/credentials/insecure" | 	"google.golang.org/grpc/credentials/insecure" | ||||||
|  |  | ||||||
| @@ -220,6 +221,11 @@ func makeConnection(ctx context.Context, address string, onClose func()) (_ io.C | |||||||
| 		params.Protocol = "ttrpc" | 		params.Protocol = "ttrpc" | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	log.G(ctx).WithFields(logrus.Fields{ | ||||||
|  | 		"address":  params.Address, | ||||||
|  | 		"protocol": params.Protocol, | ||||||
|  | 	}).Debug("shim bootstrap parameters") | ||||||
|  |  | ||||||
| 	switch strings.ToLower(params.Protocol) { | 	switch strings.ToLower(params.Protocol) { | ||||||
| 	case "ttrpc": | 	case "ttrpc": | ||||||
| 		conn, err := client.Connect(params.Address, client.AnonReconnectDialer) | 		conn, err := client.Connect(params.Address, client.AnonReconnectDialer) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Danny Canter
					Danny Canter