Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(monitor): remove the close of monitors #3397

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion controller/monitor/disk_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ func (m *DiskMonitor) GetCollectedData() (interface{}, error) {
func (m *DiskMonitor) 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
16 changes: 0 additions & 16 deletions controller/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,22 +375,6 @@ func (nc *NodeController) syncNode(key string) (err error) {

if node.DeletionTimestamp != nil {
nc.eventRecorder.Eventf(node, corev1.EventTypeWarning, constant.EventReasonDelete, "Deleting node %v", node.Name)

if nc.diskMonitor != nil {
nc.diskMonitor.Stop()
nc.diskMonitor = nil
}

if nc.environmentCheckMonitor != nil {
nc.environmentCheckMonitor.Stop()
nc.environmentCheckMonitor = nil
}

if nc.snapshotMonitor != nil {
nc.snapshotMonitor.Stop()
nc.snapshotMonitor = nil
}

return nc.ds.RemoveFinalizerForNode(node)
}

Expand Down
Loading