Skip to content

Commit 61784dc

Browse files
add log for a gatway error scenario
1 parent e9cb405 commit 61784dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

azure-ipam/ipconfig/ipconfig.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/netip"
88

99
"github.com/Azure/azure-container-networking/cns"
10+
"github.com/Azure/azure-container-networking/cns/logger"
1011
cniSkel "github.com/containernetworking/cni/pkg/skel"
1112
cniTypes "github.com/containernetworking/cni/pkg/types"
1213
"github.com/pkg/errors"
@@ -90,6 +91,8 @@ func ProcessIPConfigsResp(resp *cns.IPConfigsResponse) (*[]netip.Prefix, *[]net.
9091

9192
if gatewayIP != nil {
9293
gatewaysIPs[i] = gatewayIP
94+
} else {
95+
logger.Printf("gatewayIP is nil or gateway ip parse failed for pod ip %s", resp.PodIPInfo[i].PodIPConfig.IPAddress)
9396
}
9497
}
9598

0 commit comments

Comments
 (0)