Skip to content

Commit

Permalink
resolving migration issue
Browse files Browse the repository at this point in the history
  • Loading branch information
behzad-mir committed Jan 17, 2024
1 parent 5d21612 commit aa0c7d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ACN_VERSION ?= $(shell git describe --exclude "azure-ipam*" --exclude "dropgz
AZURE_IPAM_VERSION ?= $(notdir $(shell git describe --match "azure-ipam*" --tags --always))
CNI_VERSION ?= $(ACN_VERSION)
CNI_DROPGZ_VERSION ?= $(notdir $(shell git describe --match "dropgz*" --tags --always))
CNS_VERSION ?= $(ACN_VERSION)
CNS_VERSION ?= $(ACN_VERSION)-k
NPM_VERSION ?= $(ACN_VERSION)
ZAPAI_VERSION ?= $(notdir $(shell git describe --match "zapai*" --tags --always))

Expand Down
5 changes: 5 additions & 0 deletions cns/cnireconciler/podinfoprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ func cniStateToCnsEndpointState(state *api.AzureCNIState) (map[string]*restserve
}
}
endpointInfo.IfnameToIPMap[endpoint.IfName] = ipInfo
logger.Printf("writing endpoint podName from stateful CNI %v", endpoint.PodName)
logger.Printf("writing endpoint info from stateful CNI [%+v]", *endpointInfo)
endpointState[endpoint.ContainerID] = endpointInfo
}
for containerID, endpointInfo := range endpointState {
logger.Printf("writing endpoint state from stateful CNI [%+v]:[%+v]", containerID, *endpointInfo)
}
return endpointState, nil
}
4 changes: 4 additions & 0 deletions cns/service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,10 @@ func InitializeCRDState(ctx context.Context, httpRestService cns.HTTPService, cn
if err != nil {
return errors.Wrap(err, "failed to create CNI PodInfoProvider")
}
logger.Printf("writing endpoint info from stateful CNI [%+v]", endpointState)
for containerID, endpointInfo := range endpointState {
logger.Printf("writing endpoint state from stateful CNI [%+v]:[%+v]", containerID, *endpointInfo)
}
err := endpointStateStore.Write(restserver.EndpointStoreKey, endpointState)
if err != nil {
return fmt.Errorf("failed to write endpoint state to store: %w", err)
Expand Down

0 comments on commit aa0c7d5

Please sign in to comment.