diff --git a/runtime/v2/binary.go b/runtime/v2/binary.go index f77bcea71..288a2f965 100644 --- a/runtime/v2/binary.go +++ b/runtime/v2/binary.go @@ -134,7 +134,7 @@ func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ return nil, err } - conn, err := makeConnection(ctx, params, onCloseWithShimLog) + conn, err := makeConnection(ctx, b.bundle.ID, params, onCloseWithShimLog) if err != nil { return nil, err } diff --git a/runtime/v2/shim.go b/runtime/v2/shim.go index d747a8786..ed776a71c 100644 --- a/runtime/v2/shim.go +++ b/runtime/v2/shim.go @@ -101,9 +101,9 @@ func loadShim(ctx context.Context, bundle *Bundle, onClose func()) (_ ShimInstan return nil, fmt.Errorf("failed to read boostrap.json when restoring bundle %q: %w", bundle.ID, err) } - conn, err := makeConnection(ctx, params, onCloseWithShimLog) + conn, err := makeConnection(ctx, bundle.ID, params, onCloseWithShimLog) if err != nil { - return nil, err + return nil, fmt.Errorf("unable to make connection: %w", err) } defer func() { @@ -246,11 +246,12 @@ func readBootstrapParams(path string) (client.BootstrapParams, error) { // makeConnection creates a new TTRPC or GRPC connection object from address. // address can be either a socket path for TTRPC or JSON serialized BootstrapParams. -func makeConnection(ctx context.Context, params client.BootstrapParams, onClose func()) (_ io.Closer, retErr error) { +func makeConnection(ctx context.Context, id string, params client.BootstrapParams, onClose func()) (_ io.Closer, retErr error) { log.G(ctx).WithFields(log.Fields{ "address": params.Address, "protocol": params.Protocol, - }).Debug("shim bootstrap parameters") + "version": params.Version, + }).Infof("connecting to shim %s", id) switch strings.ToLower(params.Protocol) { case "ttrpc": diff --git a/runtime/v2/shim_load.go b/runtime/v2/shim_load.go index 5556e6c4d..980dba264 100644 --- a/runtime/v2/shim_load.go +++ b/runtime/v2/shim_load.go @@ -150,6 +150,7 @@ func (m *ShimManager) loadShims(ctx context.Context) error { m.shims.Delete(ctx, id) }) if err != nil { + log.G(ctx).WithError(err).Errorf("unable to load shim %q", id) cleanupAfterDeadShim(ctx, id, m.shims, m.events, binaryCall) continue }