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 d5c9d90
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 569 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 d5c9d90

Please sign in to comment.