@@ -594,11 +594,12 @@ func newAWSCloud2(cfg config.CloudConfig, awsServices Services, provider config.
594594 }
595595
596596 ec2 , err := awsServices .Compute (ctx , regionName )
597- klog .InfoS ("Created ec2, " , ec2 , "nil check: " , (ec2 == nil ))
597+ klog .InfoS ("[debug] Created ec2, " , ec2 , "nil check: " , (ec2 == nil ))
598598 if err != nil {
599599 return nil , fmt .Errorf ("error creating AWS EC2 client: %v" , err )
600600 }
601601
602+ klog .InfoS ("[debug] Created ec2, " , ec2 , "nil check: " , (ec2 == nil ))
602603 ec2v2 , err := services .NewEc2SdkV2 (ctx , regionName , credentialsV2 )
603604 if err != nil {
604605 return nil , fmt .Errorf ("error creating AWS EC2v2 client: %v" , err )
@@ -630,6 +631,7 @@ func newAWSCloud2(cfg config.CloudConfig, awsServices Services, provider config.
630631 createTagsBatcher : newCreateTagsBatcher (ctx , ec2 ),
631632 deleteTagsBatcher : newDeleteTagsBatcher (ctx , ec2 ),
632633 }
634+ klog .InfoS ("[debug] Created cloud, ec2:" , ec2 )
633635 awsCloud .instanceCache .cloud = awsCloud
634636 awsCloud .zoneCache .cloud = awsCloud
635637 awsCloud .instanceTopologyManager = resourcemanagers .NewInstanceTopologyManager (ec2v2 , & cfg )
@@ -646,7 +648,9 @@ func newAWSCloud2(cfg config.CloudConfig, awsServices Services, provider config.
646648 }
647649 awsCloud .vpcID = cfg .Global .VPC
648650 } else {
651+ klog .InfoS ("[debug] calling buildSelfAWSInstance" , awsCloud .ec2 )
649652 selfAWSInstance , err := awsCloud .buildSelfAWSInstance (ctx )
653+ klog .InfoS ("[debug] done calling buildSelfAWSInstance" , awsCloud .ec2 )
650654 if err != nil {
651655 return nil , err
652656 }
@@ -1117,7 +1121,9 @@ func (c *Cloud) buildSelfAWSInstance(ctx context.Context) (*awsInstance, error)
11171121 // information from the instance returned by the EC2 API - it is a
11181122 // single API call to get all the information, and it means we don't
11191123 // have two code paths.
1124+ klog .InfoS ("[debug] calling getInstanceByID" , c .ec2 )
11201125 instance , err := c .getInstanceByID (ctx , instanceID )
1126+ klog .InfoS ("[debug] done calling getInstanceByID" , c .ec2 )
11211127 if err != nil {
11221128 return nil , fmt .Errorf ("error finding instance %s: %q" , instanceID , err )
11231129 }
@@ -3126,7 +3132,9 @@ func (c *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, serv
31263132
31273133// Returns the instance with the specified ID
31283134func (c * Cloud ) getInstanceByID (ctx context.Context , instanceID string ) (* ec2types.Instance , error ) {
3135+ klog .InfoS ("[debug] calling getInstancesByIDs" , c .ec2 )
31293136 instances , err := c .getInstancesByIDs (ctx , []string {instanceID })
3137+ klog .InfoS ("[debug] done calling getInstancesByIDs" , c .ec2 )
31303138 if err != nil {
31313139 return nil , err
31323140 }
@@ -3151,7 +3159,9 @@ func (c *Cloud) getInstancesByIDs(ctx context.Context, instanceIDs []string) (ma
31513159 InstanceIds : instanceIDs ,
31523160 }
31533161
3162+ klog .InfoS ("[debug] calling DescribeInstances" , c .ec2 )
31543163 instances , err := c .ec2 .DescribeInstances (ctx , request )
3164+ klog .InfoS ("[debug] done calling DescribeInstances" , c .ec2 )
31553165 if err != nil {
31563166 return nil , err
31573167 }
0 commit comments