Skip to content

Commit 9cc4ec6

Browse files
fix: make linter happy
1 parent db4166e commit 9cc4ec6

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

cns/restserver/nodesubnet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ func (service *HTTPRestService) UpdateIPsForNodeSubnet(secondaryIPs []netip.Addr
2626
if code != types.Success {
2727
logger.Debugf("Error in processing IP change")
2828
return errors.Errorf("failed to save fetched ips. code: %d, message %s", code, msg)
29-
} else {
30-
logger.Debugf("IP change processed successfully")
3129
}
3230

31+
logger.Debugf("IP change processed successfully")
32+
3333
// saved NC successfully, generate conflist to indicate CNS is ready
3434
go service.MustGenerateCNIConflistOnce()
3535
return nil

cns/restserver/restserver.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"github.com/Azure/azure-container-networking/cns/types/bounded"
2020
"github.com/Azure/azure-container-networking/cns/wireserver"
2121
acn "github.com/Azure/azure-container-networking/common"
22-
"github.com/Azure/azure-container-networking/nmagent"
2322
nma "github.com/Azure/azure-container-networking/nmagent"
2423
"github.com/Azure/azure-container-networking/store"
2524
"github.com/pkg/errors"
@@ -42,7 +41,7 @@ type nmagentClient interface {
4241
SupportedAPIs(context.Context) ([]string, error)
4342
GetNCVersionList(context.Context) (nma.NCVersionList, error)
4443
GetHomeAz(context.Context) (nma.AzResponse, error)
45-
GetInterfaceIPInfo(ctx context.Context) (nmagent.Interfaces, error)
44+
GetInterfaceIPInfo(ctx context.Context) (nma.Interfaces, error)
4645
}
4746

4847
type wireserverProxy interface {

cns/service/main.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,13 +883,18 @@ func main() {
883883
cns.GlobalPodInfoScheme = cns.InfraIDPodInfoScheme
884884
}
885885

886-
podInfoByIPProvider, err := getPodInfoByIPProvider(rootCtx, cnsconfig, httpRemoteRestService, nil, "")
886+
var podInfoByIPProvider cns.PodInfoByIPProvider
887+
podInfoByIPProvider, err = getPodInfoByIPProvider(rootCtx, cnsconfig, httpRemoteRestService, nil, "")
887888
if err != nil {
888889
logger.Errorf("[Azure CNS] Failed to get PodInfoByIPProvider: %v", err)
889890
return
890891
}
891892

892-
httpRemoteRestService.InitializeNodeSubnet(rootCtx, podInfoByIPProvider)
893+
err = httpRemoteRestService.InitializeNodeSubnet(rootCtx, podInfoByIPProvider)
894+
if err != nil {
895+
logger.Errorf("[Azure CNS] Failed to initialize node subnet: %v", err)
896+
return
897+
}
893898
}
894899

895900
// Initialize multi-tenant controller if the CNS is running in MultiTenantCRD mode.

0 commit comments

Comments
 (0)