Skip to content

Commit

Permalink
fix(monitor): set monitors to nil after closing them
Browse files Browse the repository at this point in the history
Set monitors to nil after closing them, so the controller can recreate
them when the node is back.

Longhorn 10035

Signed-off-by: Derek Su <[email protected]>
(cherry picked from commit a65a6ce)
  • Loading branch information
derekbit committed Dec 23, 2024
1 parent a5dad03 commit 790b6dc
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 572 deletions.
1 change: 0 additions & 1 deletion controller/monitor/disk_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ func (m *NodeMonitor) GetCollectedData() (interface{}, error) {
func (m *NodeMonitor) run(value interface{}) error {
node, err := m.ds.GetNode(m.nodeName)
if err != nil {
logrus.WithError(err).Errorf("Failed to get longhorn node %v", m.nodeName)
return errors.Wrapf(err, "failed to get longhorn node %v", m.nodeName)
}

Expand Down
Loading

0 comments on commit 790b6dc

Please sign in to comment.