@@ -298,7 +298,7 @@ func (c *CloudProvider) Create(ctx context.Context, nodeClaim *karpv1.NodeClaim)
298298 "nodeClass" , nodeClass .Name ,
299299 "region" , nodeClass .Spec .Region )
300300 c .recorder .Publish (ibmevents .NodeClaimCircuitBreakerBlocked (nodeClaim , cbErr .Error ()))
301- return nil , cloudprovider . NewInsufficientCapacityError ( fmt .Errorf ("circuit breaker blocked provisioning : %w" , cbErr ) )
301+ return nil , fmt .Errorf ("provisioning temporarily blocked by circuit breaker : %w" , cbErr )
302302 }
303303
304304 // Get the appropriate instance provider based on NodeClass configuration
@@ -311,7 +311,12 @@ func (c *CloudProvider) Create(ctx context.Context, nodeClaim *karpv1.NodeClaim)
311311
312312 node , err := instanceProvider .Create (ctx , nodeClaim )
313313 if err != nil {
314- log .Error (err , "Failed to create instance" )
314+ // Log the actual error details for better troubleshooting
315+ log .Error (err , "Failed to create instance" ,
316+ "nodeClass" , nodeClass .Name ,
317+ "region" , nodeClass .Spec .Region ,
318+ "zone" , nodeClass .Spec .Zone ,
319+ "instanceTypes" , lo .Map (compatible , func (it * cloudprovider.InstanceType , _ int ) string { return it .Name }))
315320 c .circuitBreaker .RecordFailure (nodeClass .Name , nodeClass .Spec .Region , err )
316321 return nil , fmt .Errorf ("creating instance, %w" , err )
317322 }
0 commit comments