Skip to content

[v14] fix: panic in external audit watcher#36301

Merged
nklaassen merged 1 commit intobranch/v14from
bot/backport-36298-branch/v14
Jan 5, 2024
Merged

[v14] fix: panic in external audit watcher#36301
nklaassen merged 1 commit intobranch/v14from
bot/backport-36298-branch/v14

Conversation

@nklaassen
Copy link
Copy Markdown
Contributor

Backport #36298 to branch/v14

changelog: Fixed potential panic after backend watcher failure.

This commit fixes a possible panic in the cluster External Audit watcher
that can occur whenever the underlying backend watcher closes
unexpectedly, and resulted in a double-close of the `initialized`
channel.

This fix here is to switch from closing an "initialized" channel
whenever a watcher is initialized, to periodically writing to a
"running" channel during the events watch loop, whenever there is a
listener waiting on the channel.
This is what some other watchers (e.g. HeadlessAuthenticationWatcher)
already do, and allow for the test to wait for the new watcher to init
after simulating a failed watcher.

Changelog: Fixed potential panic after backend watcher failure.
@nklaassen nklaassen added this pull request to the merge queue Jan 4, 2024
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 4, 2024
@nklaassen nklaassen enabled auto-merge January 4, 2024 23:50
@nklaassen nklaassen added this pull request to the merge queue Jan 4, 2024
Merged via the queue into branch/v14 with commit a60fbfa Jan 5, 2024
@nklaassen nklaassen deleted the bot/backport-36298-branch/v14 branch January 5, 2024 00:09
@camscale camscale mentioned this pull request Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants