Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cns/service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ func init() {
// Wait until receiving a signal.
select {
case sig := <-sigCh:
log.Errorf("caught exit signal %v, exiting", sig)
logger.Errorf("caught exit signal %v, exiting", sig)
case err := <-rootErrCh:
log.Errorf("unhandled error %v, exiting", err)
logger.Errorf("unhandled error %v, exiting", err)
}
cancel()
}()
Expand Down Expand Up @@ -428,7 +428,7 @@ func sendRegisterNodeRequest(ctx context.Context, httpClient httpDoer, httpRestS
var body bytes.Buffer
err := json.NewEncoder(&body).Encode(nodeRegisterRequest)
if err != nil {
log.Errorf("[Azure CNS] Failed to register node while encoding json failed with non-retryable err %v", err)
logger.Errorf("[Azure CNS] Failed to register node while encoding json failed with non-retryable err %v", err)
return errors.Wrap(retry.Unrecoverable(err), "failed to sendRegisterNodeRequest")
}

Expand All @@ -454,7 +454,7 @@ func sendRegisterNodeRequest(ctx context.Context, httpClient httpDoer, httpRestS
var req cns.SetOrchestratorTypeRequest
err = json.NewDecoder(response.Body).Decode(&req)
if err != nil {
log.Errorf("[Azure CNS] decoding Node Register response json failed with err %v", err)
logger.Errorf("[Azure CNS] decoding Node Register response json failed with err %v", err)
return errors.Wrap(err, "failed to sendRegisterNodeRequest")
}
httpRestService.SetNodeOrchestrator(&req)
Expand All @@ -469,7 +469,7 @@ func startTelemetryService(ctx context.Context) {
tb := telemetry.NewTelemetryBuffer(nil)
err := tb.CreateAITelemetryHandle(config, false, false, false)
if err != nil {
log.Errorf("AI telemetry handle creation failed..:%w", err)
logger.Errorf("[Azure CNS] AI telemetry handle creation failed: %v", err)
return
}

Expand All @@ -478,9 +478,9 @@ func startTelemetryService(ctx context.Context) {
tbtemp.Cleanup(telemetry.FdName)

err = tb.StartServer()
log.Printf("Telemetry service for CNI started")
logger.Printf("[Azure CNS] Telemetry service for CNI started")
if err != nil {
log.Errorf("Telemetry service failed to start: %w", err)
logger.Errorf("[Azure CNS] Telemetry service failed to start: %v", err)
return
}
tb.PushData(ctx)
Expand Down Expand Up @@ -1484,7 +1484,7 @@ func InitializeCRDState(ctx context.Context, httpRestService cns.HTTPService, cn
// this false and the NNC Reconciler stuck/failed, log and retry.
nncReadyCtx, cancel := context.WithTimeout(ctx, 15*time.Minute) //nolint // it will time out and not leak
if started, err := nncReconciler.Started(nncReadyCtx); !started {
log.Errorf("NNC reconciler has not started, does the NNC exist? err: %v", err)
logger.Errorf("NNC reconciler has not started, does the NNC exist? err: %v", err)
nncReconcilerStartFailures.Inc()
continue
}
Expand Down
Loading