[wip] Troubleshoot tests by dwoz · Pull Request #68727 · saltstack/salt
dwoz
changed the base branch from
master
to
3007.x
Add defensive code to handle the case where state_queue.lock or job_queue.lock exist as directories instead of files. This situation has been observed in CI tests, though the root cause is unclear. The fix: - Changes the check from os.path.isfile() to os.path.exists() - Handles three cases: file (expected), directory (unexpected), other - Uses shutil.rmtree() to remove directories - Adds warning logging when a directory is found to aid debugging - Improves error handling with specific log messages This allows the minion to recover from corrupted lock state and continue operating, while logging information to help identify the underlying cause.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters