From d7ddfe58388a1779b1145492f08631b6ffa32e4d Mon Sep 17 00:00:00 2001 From: jigisha620 Date: Wed, 23 Oct 2024 17:27:44 -0700 Subject: [PATCH] Adding logs to instance provider create --- pkg/providers/instance/instance.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/providers/instance/instance.go b/pkg/providers/instance/instance.go index 54799c00d123..ffdd907e96a7 100644 --- a/pkg/providers/instance/instance.go +++ b/pkg/providers/instance/instance.go @@ -97,6 +97,7 @@ func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.EC2NodeClass } instanceTypes, err := cloudprovider.InstanceTypes(instanceTypes).Truncate(schedulingRequirements, maxInstanceTypes) if err != nil { + log.FromContext(ctx).Error(err, "truncating instance types") return nil, fmt.Errorf("truncating instance types, %w", err) } tags := getTags(ctx, nodeClass, nodeClaim) @@ -107,6 +108,7 @@ func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.EC2NodeClass fleetInstance, err = p.launchInstance(ctx, nodeClass, nodeClaim, instanceTypes, tags) } if err != nil { + log.FromContext(ctx).Error(err, "launching instance") return nil, err } efaEnabled := lo.Contains(lo.Keys(nodeClaim.Spec.Resources.Requests), v1.ResourceEFA)