Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
wking committed Apr 9, 2024
1 parent 59419d1 commit 2396053
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cvo/cvo.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ func (optr *Operator) InitializeFromPayload(update *payload.Update, requiredFeat
optr.eventRecorder,
optr.clusterProfile,
)
klog.Infof("InitializeFromPayload setup configSync using NewSyncWorkerWithPreconditions: %v", optr.configSync)
}

// ownerReferenceModifier sets the owner reference to the current CV resource if no other reference exists. It also resets
Expand Down Expand Up @@ -421,6 +422,10 @@ func (optr *Operator) Run(runContext context.Context, shutdownContext context.Co
resultChannelCount++
go func() {
defer utilruntime.HandleCrash()
klog.Infof("statusInterval: %v", optr.statusInterval)
klog.Infof("optr.configSync: %v", optr.configSync)
//klog.Infof("optr.configSync.StatusCh: %s", optr.configSync.StatusCh)
klog.Infof("optr.configSync.StatusCh(): %v", optr.configSync.StatusCh())
runThrottledStatusNotifier(runContext, optr.statusInterval, 2, optr.configSync.StatusCh(), func() { optr.queue.Add(optr.queueKey()) })
resultChannel <- asyncResult{name: "status notifier"}
}()
Expand Down
4 changes: 4 additions & 0 deletions pkg/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ func (o *Options) run(ctx context.Context, controllerCtx *Context, lock resource
resultChannel <- asyncResult{name: "metrics server", error: err}
}()
}

klog.Infof("Initializing from payload")
if err := controllerCtx.InitializeFromPayload(runContext, restConfig, burstRestConfig); err != nil {
if firstError == nil {
firstError = err
Expand All @@ -249,9 +251,11 @@ func (o *Options) run(ctx context.Context, controllerCtx *Context, lock resource
resultChannel <- asyncResult{name: "payload initialization", error: firstError}
}

klog.Infof("Launching CVO.Run gorountine")
resultChannelCount++
go func() {
defer utilruntime.HandleCrash()
klog.Infof("Calling CVO.Run")
err := controllerCtx.CVO.Run(runContext, shutdownContext)
resultChannel <- asyncResult{name: "main operator", error: err}
}()
Expand Down

0 comments on commit 2396053

Please sign in to comment.