Skip to content

Commit 800785e

Browse files
chore: address comments
1 parent a78a6b1 commit 800785e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cns/restserver/nodesubnet.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ func (service *HTTPRestService) UpdateIPsForNodeSubnet(secondaryIPs []netip.Addr
2929

3030
logger.Debugf("IP change processed successfully")
3131

32-
// saved NC successfully, generate conflist to indicate CNS is ready
33-
go service.MustGenerateCNIConflistOnce()
32+
// saved NC successfully. UpdateIPsForNodeSubnet is called only when IPs are fetched from NMAgent.
33+
// We now have IPs to serve IPAM requests. Generate conflist to indicate CNS is ready
34+
service.MustGenerateCNIConflistOnce()
3435
return nil
3536
}
3637

cns/service/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,8 @@ func main() {
10461046
}
10471047

10481048
if config.ChannelMode == cns.AzureHost {
1049+
// at this point, rest service is running, and any pending async deletes have been submitted to the rest
1050+
// service. We can now start serving new requests.
10491051
httpRemoteRestService.StartNodeSubnet(rootCtx)
10501052
}
10511053

0 commit comments

Comments
 (0)