Skip to content

Commit c1755b0

Browse files
committed
remove logs
1 parent c3e7efc commit c1755b0

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

cni/network/invoker_cns.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -487,20 +487,6 @@ func configureSecondaryAddResult(info *IPResultInfo, addResult *IPAMAddResult, p
487487
if err != nil {
488488
return err
489489
}
490-
defaultRouteDstPrefix := network.Ipv4DefaultRouteDstPrefix
491-
ncgw := net.ParseIP(info.ncGatewayIPAddress)
492-
493-
resRoute := addResult.interfaceInfo[key].Routes
494-
if len(routes) > 0 {
495-
resRoute = append(resRoute, routes...)
496-
} else { // add default routes for secondary interfaces
497-
resRoute = append(resRoute, network.RouteInfo{
498-
Dst: defaultRouteDstPrefix,
499-
Gw: ncgw,
500-
})
501-
}
502-
503-
logger.Info("routes are now", zap.Any("routes are now", resRoute))
504490

505491
addResult.interfaceInfo[key] = network.InterfaceInfo{
506492
IPConfigs: []*network.IPConfig{
@@ -512,7 +498,7 @@ func configureSecondaryAddResult(info *IPResultInfo, addResult *IPAMAddResult, p
512498
Gateway: net.ParseIP(info.ncGatewayIPAddress),
513499
},
514500
},
515-
Routes: resRoute,
501+
Routes: routes,
516502
NICType: info.nicType,
517503
MacAddress: macAddress,
518504
SkipDefaultRoutes: info.skipDefaultRoutes,

network/endpoint_windows.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,11 @@ func (nw *network) configureHcnEndpoint(epInfo *EndpointInfo) (*hcn.HostComputeE
332332
hcnEndpoint.Policies = append(hcnEndpoint.Policies, endpointPolicy)
333333
}
334334

335-
logger.Info("epInfo.Routes are", zap.Any("epInfo.Routes", epInfo.Routes))
336335
for _, route := range epInfo.Routes {
337336
hcnRoute := hcn.Route{
338337
NextHop: route.Gw.String(),
339338
DestinationPrefix: route.Dst.String(),
340339
}
341-
logger.Info("endpoint windows", zap.Any("hcnRoute", hcnRoute))
342340

343341
hcnEndpoint.Routes = append(hcnEndpoint.Routes, hcnRoute)
344342
}
@@ -423,14 +421,14 @@ func (nw *network) createHostNCApipaEndpoint(cli apipaClient, epInfo *EndpointIn
423421

424422
// newEndpointImplHnsV2 creates a new endpoint in the network using Hnsv2
425423
func (nw *network) newEndpointImplHnsV2(cli apipaClient, epInfo *EndpointInfo) (*endpoint, error) {
426-
logger.Info("epInfo routes on newEndpointImplHnsV2", zap.Any("epInfo routes", epInfo.Routes))
427424
hcnEndpoint, err := nw.configureHcnEndpoint(epInfo)
428425
if err != nil {
429426
logger.Error("Failed to configure hcn endpoint due to", zap.Error(err))
430427
return nil, err
431428
}
432429

433430
// Create the HCN endpoint.
431+
logger.Info("Creating hcn endpoint", zap.Any("hcnEndpoint", hcnEndpoint), zap.String("computenetwork", hcnEndpoint.HostComputeNetwork), zap.Any("routes", hcnEndpoint.Routes))
434432
hnsResponse, err := Hnsv2.CreateEndpoint(hcnEndpoint)
435433
if err != nil {
436434
return nil, fmt.Errorf("Failed to create endpoint: %s due to error: %v", hcnEndpoint.Name, err)

network/network.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ func (nm *networkManager) EndpointCreate(cnsclient apipaClient, epInfos []*Endpo
317317
eps := []*endpoint{} // save endpoints for stateless
318318

319319
for _, epInfo := range epInfos {
320-
logger.Info("epInfo routes in nm endpointCreate is", zap.Any("epInfo routes in nm endpointCreate is", epInfo.Routes))
321320
logger.Info("Creating endpoint and network", zap.String("endpointInfo", epInfo.PrettyString()))
322321
// check if network exists by searching through all external interfaces for the network
323322
_, nwGetErr := nm.GetNetworkInfo(epInfo.NetworkID)

0 commit comments

Comments
 (0)