Skip to content

Commit 85eb1ad

Browse files
authored
fix: Updated the context that needs to be passed
1 parent a5efba5 commit 85eb1ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cns/restserver/internalapi.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,9 @@ func (service *HTTPRestService) SetVFForAccelnetNICs() error {
635635
}
636636

637637
// GetHomeAz - Get the Home Az for the Node where CNS is running.
638-
func (service *HTTPRestService) GetHomeAz() (homeAzResponse cns.GetHomeAzResponse) {
638+
func (service *HTTPRestService) GetHomeAz(ctx context.Context) (homeAzResponse cns.GetHomeAzResponse) {
639639
service.RLock()
640-
homeAzResponse = service.homeAzMonitor.GetHomeAz(context.TODO())
640+
homeAzResponse = service.homeAzMonitor.GetHomeAz(ctx)
641641
service.RUnlock()
642642
return
643643
}

cns/service/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ func InitializeCRDState(ctx context.Context, httpRestService cns.HTTPService, cn
13071307
if cnsconfig.EnableHomeAz {
13081308
// Create Node Network Config CRD and update the Home Az field with the cache value from the HomeAz Monitor
13091309
nnc = createBaseNNC(node)
1310-
homeAzResponse := httpRestServiceImplementation.GetHomeAz()
1310+
homeAzResponse := httpRestServiceImplementation.GetHomeAz(ctx)
13111311
nnc.Spec.AvailabilityZone = strconv.FormatUint(uint64(homeAzResponse.HomeAzResponse.HomeAz), 10)
13121312
}
13131313

0 commit comments

Comments
 (0)