Skip to content

Commit

Permalink
Fix error log during cluster check runner init (#20924)
Browse files Browse the repository at this point in the history
* pkg/autodiscovery/providers/clusterchecks.go

* add release note

* address comment

* Update releasenotes/notes/fix_repeating_error_log_in_clc-7950ee986a560770.yaml

Co-authored-by: Austin Lai <[email protected]>

---------

Co-authored-by: Austin Lai <[email protected]>
  • Loading branch information
zhuminyi and alai97 authored Nov 22, 2023
1 parent dbcc248 commit 7a05bb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/autodiscovery/providers/clusterchecks.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ func (c *ClusterChecksConfigProvider) heartbeatSender(ctx context.Context) {
postCtx, cancel := context.WithTimeout(ctx, postStatusTimeout)
defer cancel()
if err := c.postHeartbeat(postCtx); err == nil {
extraHeartbeatTime = currentTime
log.Infof("Sent extra heartbeat at: %v", currentTime)
} else {
log.Warnf("Unable to send extra heartbeat to Cluster Agent, err: %v", err)
}
extraHeartbeatTime = currentTime
}

case <-ctx.Done():
Expand All @@ -206,7 +206,7 @@ func (c *ClusterChecksConfigProvider) heartbeatSender(ctx context.Context) {

func (c *ClusterChecksConfigProvider) postHeartbeat(ctx context.Context) error {
if c.dcaClient == nil {
return errors.New("DCA Client not initialized by main provider, cannot post heartbeat")
return errors.New("DCA Client not initialized by main provider yet, cannot post heartbeat, wait for init completion")
}

status := types.NodeStatus{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
Fix a spewing error message ("DCA Client not initialized by main provider, cannot post heartbeat") in the cluster check runner log during CLC initialization.

0 comments on commit 7a05bb2

Please sign in to comment.