Skip to content

Commit e9d8941

Browse files
committed
removed debug msgs
1 parent 60e5164 commit e9d8941

3 files changed

Lines changed: 1 addition & 21 deletions

File tree

pkg/providers/v1/aws.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -594,12 +594,10 @@ func newAWSCloud2(cfg config.CloudConfig, awsServices Services, provider config.
594594
}
595595

596596
ec2, err := awsServices.Compute(ctx, regionName, credentialsV2)
597-
klog.InfoS("[debug] Created ec2, ", ec2, "nil check: ", (ec2 == nil))
598597
if err != nil {
599598
return nil, fmt.Errorf("error creating AWS EC2 client: %v", err)
600599
}
601600

602-
klog.InfoS("[debug] Created ec2, ", ec2, "nil check: ", (ec2 == nil))
603601
ec2v2, err := services.NewEc2SdkV2(ctx, regionName, credentialsV2)
604602
if err != nil {
605603
return nil, fmt.Errorf("error creating AWS EC2v2 client: %v", err)
@@ -631,7 +629,6 @@ func newAWSCloud2(cfg config.CloudConfig, awsServices Services, provider config.
631629
createTagsBatcher: newCreateTagsBatcher(ctx, ec2),
632630
deleteTagsBatcher: newDeleteTagsBatcher(ctx, ec2),
633631
}
634-
klog.InfoS("[debug] Created cloud, ec2:", ec2)
635632
awsCloud.instanceCache.cloud = awsCloud
636633
awsCloud.zoneCache.cloud = awsCloud
637634
awsCloud.instanceTopologyManager = resourcemanagers.NewInstanceTopologyManager(ec2v2, &cfg)
@@ -648,9 +645,7 @@ func newAWSCloud2(cfg config.CloudConfig, awsServices Services, provider config.
648645
}
649646
awsCloud.vpcID = cfg.Global.VPC
650647
} else {
651-
klog.InfoS("[debug] calling buildSelfAWSInstance", awsCloud.ec2)
652648
selfAWSInstance, err := awsCloud.buildSelfAWSInstance(ctx)
653-
klog.InfoS("[debug] done calling buildSelfAWSInstance", awsCloud.ec2)
654649
if err != nil {
655650
return nil, err
656651
}
@@ -1121,9 +1116,7 @@ func (c *Cloud) buildSelfAWSInstance(ctx context.Context) (*awsInstance, error)
11211116
// information from the instance returned by the EC2 API - it is a
11221117
// single API call to get all the information, and it means we don't
11231118
// have two code paths.
1124-
klog.InfoS("[debug] calling getInstanceByID", c.ec2)
11251119
instance, err := c.getInstanceByID(ctx, instanceID)
1126-
klog.InfoS("[debug] done calling getInstanceByID", c.ec2)
11271120
if err != nil {
11281121
return nil, fmt.Errorf("error finding instance %s: %q", instanceID, err)
11291122
}
@@ -3132,9 +3125,7 @@ func (c *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, serv
31323125

31333126
// Returns the instance with the specified ID
31343127
func (c *Cloud) getInstanceByID(ctx context.Context, instanceID string) (*ec2types.Instance, error) {
3135-
klog.InfoS("[debug] calling getInstancesByIDs", c.ec2)
31363128
instances, err := c.getInstancesByIDs(ctx, []string{instanceID})
3137-
klog.InfoS("[debug] done calling getInstancesByIDs", c.ec2)
31383129
if err != nil {
31393130
return nil, err
31403131
}
@@ -3159,9 +3150,7 @@ func (c *Cloud) getInstancesByIDs(ctx context.Context, instanceIDs []string) (ma
31593150
InstanceIds: instanceIDs,
31603151
}
31613152

3162-
klog.InfoS("[debug] calling DescribeInstances", c.ec2)
31633153
instances, err := c.ec2.DescribeInstances(ctx, request)
3164-
klog.InfoS("[debug] done calling DescribeInstances", c.ec2)
31653154
if err != nil {
31663155
return nil, err
31673156
}

pkg/providers/v1/aws_sdk.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,34 +158,27 @@ func (p *awsSDKProvider) getCrossRequestRetryDelay(regionName string) *CrossRequ
158158
}
159159

160160
func (p *awsSDKProvider) Compute(ctx context.Context, regionName string, assumeRoleProvider *stscredsv2.AssumeRoleProvider) (iface.EC2, error) {
161-
klog.InfoS("[debug] [Compute] entered")
162161
cfg, err := awsConfig.LoadDefaultConfig(ctx,
163162
awsConfig.WithRegion(regionName),
164163
)
165-
klog.InfoS("[debug] [Compute] assumeRoleProvider: ", assumeRoleProvider)
166164
if assumeRoleProvider != nil {
167165
cfg.Credentials = awsv2.NewCredentialsCache(assumeRoleProvider)
168166
}
169-
klog.InfoS("[debug] [Compute] loaded config, err:", err)
170167
if err != nil {
171168
return nil, fmt.Errorf("unable to initialize AWS config: %v", err)
172169
}
173170

174171
p.AddHandlersV2(ctx, regionName, &cfg)
175-
klog.InfoS("[debug] [Compute] added handlers")
176172
var opts []func(*ec2.Options) = p.cfg.GetEC2EndpointOpts(regionName)
177173
opts = append(opts, func(o *ec2.Options) {
178174
o.Retryer = &customRetryer{
179175
retry.NewStandard(),
180176
}
181177
})
182-
klog.InfoS("[debug] [Compute] did GetEC2EndpointOpts")
183178
opts = append(opts, func(o *ec2.Options) {
184179
o.EndpointResolverV2 = p.cfg.GetCustomEC2Resolver()
185180
})
186-
klog.InfoS("[debug] [Compute] did GetCustomEC2Resolver")
187181
ec2Client := ec2.NewFromConfig(cfg, opts...)
188-
klog.InfoS("[debug] [Compute] did NewFromConfig")
189182

190183
ec2 := &awsSdkEC2{
191184
ec2: ec2Client,

pkg/providers/v1/config/config.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,13 @@ func (cfg *CloudConfig) GetRegion(metadata EC2Metadata) (string, error) {
135135
return cfg.Global.Region, nil
136136
}
137137

138-
klog.Info("Loading region from metadata service [debug] a")
138+
klog.Info("Loading region from metadata service")
139139
region, err := metadata.Region()
140-
klog.Info("[debug] Loaded region from metadata service, err:", err)
141140
if err != nil {
142141
return "", err
143142
}
144143

145144
cfg.Global.Region = region
146-
klog.Info("[debug] Loaded region from metadata service, set region to", region)
147145
return region, nil
148146
}
149147

0 commit comments

Comments
 (0)