salt
salt copied to clipboard
[3006.x] - Handling GitFS locking issue and resource loss due to SIGTERM not clearing up
What does this PR do?
Resolves missing unlock issue with GitFS, that is, lock but no unlock. Also ensure that when a process is SIGTERM, it cleans up and releases resources held, namely lock files.
Process generated lGitFS lock files, but failed to clear the lock files, and when the process was finally SIGTERM (due to connection being closed by sseapi remote end, 14 minutes later), failed to clean up any resources allocated, namely the GitFS lock files.
What issues does this PR fix or reference?
Fixes:https://github.com/saltstack/salt/issues/65816
Previous Behavior
Process left GitFs lock files present which had to be cleaned up by hand.
New Behavior
Process no longer leaves GitFs lock files present, and checks when terminated (SIGTERM) and cleans up any GitFS lock files which it generated.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
- [ ] Docs
- [ ] Changelog - https://docs.saltproject.io/en/master/topics/development/changelog.html
- [ ] Tests written/updated
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.
Blocked waiting for Windows tests to be fixed on PRs - not related to this PR
@s0undt3ch @dwoz Can you re-review, refactored the objectionable code in SIGTERM handling