monitor: Allow httpd to restart after the sever reboot from poweroff
If a server reboots brutally, there will be a legacy httpd pid file stay in the file system, and the OS may reuse the PID that remains in that file, which will cause httpd service to fail to start even if there is no such httpd service is running. This commit implemented the following logic: 0. If there is no existing PID file, then run the httpd service directly 1. If the PID file exists and contains the PID used by another process, we delete the PID file, then restart the httpd service 2. If the PID file exists and contains the PID used by another running httpd service, we allow the httpd report the "already running" error normally
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
passed |
#611517
external
|
Cloudooo.UnitTest-Master |
00:03:54
|
||||||
passed |
#611538
external
|
ERP5.StandaloneDeploymentScriptTest-Debian.Buster |
00:42:16
|
||||||
passed |
#611524
external
|
SlapOS-Master.StandaloneDeploymentScriptTest-Debian.Buster |
00:42:56
|
||||||
passed |
#611542
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:17:10
|
||||||
passed |
#611555
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:19:27
|
||||||
passed |
#611539
external
|
SlapOS.Eggs.UnitTest-TestRunner1.Python3 |
00:19:48
|
||||||
passed |
#611528
external
|
Wendelin.StandaloneDeploymentScriptTest-Debian.Buster |
00:32:06
|
||||||