-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deal with stale daemon PID files during stop attempts (#2795)
In some circumstances, the circus PID file which stores the PID of the running circus process, can be corrupted or not deleted properly, causing calls to `is_daemon_running` to return a false positive. This situation can arise if a system is shut down suddenly and so the process is killed but the PID file is not deleted in time. Alternatively, another process or the user may have meddled with the PID file in some way, corrupting it. Here, we implement a function that checks for stale PID files by checking whether the PID contained in the PID file matches a valid running `verdi `process. If it does not, a warning is emitted and the PID file is deleted. This function is called when `verdi daemon stop` is called, making it function as a hard reset in a situation of a stale PID. Co-authored-by: Giovanni Pizzi <[email protected]>
- Loading branch information
Showing
2 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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