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

Cleanup SERVERENGINE_SOCKETMANAGER socket files usually found in /tmp #316

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

danlenar
Copy link
Contributor

@danlenar danlenar commented Apr 16, 2022

Fixes #105

Every time kube-fluentd-operator validates a fluentd config, it leaves behind a SERVERENGINE_SOCKETMANAGER socket file in /tmp.

ls -ltr /tmp
srwx------. 1 root root    0 Apr 16 00:03 SERVERENGINE_SOCKETMANAGER_2022-04-16T00:03:45Z_11491
srwx------. 1 root root    0 Apr 16 00:03 SERVERENGINE_SOCKETMANAGER_2022-04-16T00:03:46Z_11495
srwx------. 1 root root    0 Apr 16 00:03 SERVERENGINE_SOCKETMANAGER_2022-04-16T00:03:48Z_11499
srwx------. 1 root root    0 Apr 16 00:03 SERVERENGINE_SOCKETMANAGER_2022-04-16T00:03:49Z_11503
srwx------. 1 root root    0 Apr 16 00:03 SERVERENGINE_SOCKETMANAGER_2022-04-16T00:03:50Z_11505

The fix is to have just_exit plugin cleanup resources when it exists, so the socket files are not lingering.

The just_exit plugin can call Fluent::Supervisor.cleanup_resource, which should do the cleanup.
https://github.com/fluent/fluentd/blob/6927305ddf3d989aced39172599c9aeb5e697471/lib/fluent/supervisor.rb#L587

Signed-off-by: Daniel Lenar <dlenar@vailsys.com>
@javiercri javiercri merged commit 6efa674 into vmware:master Apr 26, 2022
@javiercri
Copy link
Contributor

Thanks for the contribution @danlenar !

javiercri pushed a commit that referenced this pull request May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fluentd-reloader operator eats all inodes on kubernetes worker node
2 participants