Skip to content

Fix beacon delete not closing beacon modules#68898

Open
dwoz wants to merge 1 commit intosaltstack:3007.xfrom
dwoz:fix/delete-beacon-close-3007
Open

Fix beacon delete not closing beacon modules#68898
dwoz wants to merge 1 commit intosaltstack:3007.xfrom
dwoz:fix/delete-beacon-close-3007

Conversation

@dwoz
Copy link
Copy Markdown
Contributor

@dwoz dwoz commented Apr 5, 2026

When beacons.delete is called, the beacon is removed from opts but the beacon module's close() function is never called. This leaves resources like inotify file descriptors and notifier threads active, causing CPU spin that never recovers.

Add _close_beacon() and close_beacons() methods to the Beacon class. Call _close_beacon() from delete_beacon() before removing the beacon from opts, and call close_beacons() from Minion.beacons_refresh() before replacing the Beacon instance.

Fixes #66449

What does this PR do?

What issues does this PR fix or reference?

Fixes

Previous Behavior

Remove this section if not relevant

New Behavior

Remove this section if not relevant

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

When beacons.delete is called, the beacon is removed from opts but the
beacon module's close() function is never called. This leaves resources
like inotify file descriptors and notifier threads active, causing CPU
spin that never recovers.

Add _close_beacon() and close_beacons() methods to the Beacon class.
Call _close_beacon() from delete_beacon() before removing the beacon
from opts, and call close_beacons() from Minion.beacons_refresh()
before replacing the Beacon instance.

Fixes saltstack#66449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant