@@ -195,7 +195,7 @@ func (service *HTTPRestService) syncHostNCVersion(ctx context.Context, channelMo
195195 // For prefix-on-NIC SwiftV2 NIC scenario, the NC details is published to different path in NMAgent and call to NMA here creates error. So Skipping nma check, synchost version logic.
196196 ncStatus := service .state .ContainerStatus [idx ]
197197 if mac := ncStatus .CreateNetworkContainerRequest .NetworkInterfaceInfo .MACAddress ; mac != "" {
198- logger .Printf ("NC %s has MAC address for prefix on nic swiftv2 scenario, skipping syncHostNCVersion" , ncStatus .ID )
198+ logger .Printf ("NC %s has MAC address for prefix on nic swiftv2 prefix on NIC scenario, skipping syncHostNCVersion" , ncStatus .ID )
199199 continue
200200 }
201201 // Will open a separate PR to convert all the NC version related variable to int. Change from string to int is a pain.
@@ -377,6 +377,7 @@ func (service *HTTPRestService) ReconcileIPAssignment(podInfoByIP map[string]cns
377377}
378378
379379func (service * HTTPRestService ) CreateNCs (ncReqs []* cns.CreateNetworkContainerRequest ) types.ResponseCode {
380+ logger .Printf ("Creating network containers for nc requests: [%+v]" , ncReqs )
380381 for _ , ncReq := range ncReqs {
381382 returnCode := service .CreateOrUpdateNetworkContainerInternal (ncReq )
382383 if returnCode != types .Success {
@@ -566,6 +567,7 @@ func (service *HTTPRestService) MustEnsureNoStaleNCs(validNCIDs []string) {
566567
567568// This API will be called by CNS RequestController on CRD update.
568569func (service * HTTPRestService ) CreateOrUpdateNetworkContainerInternal (req * cns.CreateNetworkContainerRequest ) types.ResponseCode {
570+ logger .Printf ("[Azure CNS] CreateOrUpdateNetworkContainerInternal called for network container %s" , req .NetworkContainerid )
569571 if req .NetworkContainerid == "" {
570572 logger .Errorf ("[Azure CNS] Error. NetworkContainerid is empty" )
571573 return types .NetworkContainerNotSpecified
@@ -627,8 +629,9 @@ func (service *HTTPRestService) CreateOrUpdateNetworkContainerInternal(req *cns.
627629 } else {
628630 logger .Errorf (returnMessage )
629631 }
630-
632+ logger . Printf (( "service.Options[common.OptProgramSNATIPTables]: %v" ), service . Options [ common . OptProgramSNATIPTables ])
631633 if service .Options [common .OptProgramSNATIPTables ] == true {
634+ logger .Printf ("inside if block" )
632635 returnCode , returnMessage = service .programSNATRules (req )
633636 if returnCode != 0 {
634637 logger .Errorf (returnMessage )
0 commit comments