Closed ottocho closed 4 years ago
@ottocho , has this been reviewed by anyone from AWS yet?
I'm suspecting that the service start command suffers from something similar as well, where the agent describes the status as active (exited)
and I have to explicitly restart the service to get the status as active (running)
.
Platform : Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-1057-aws x86_64) Instance Type : t2.nano System Information (with a running agent) :
System information as of Sun Mar 15 05:42:45 UTC 2020
System load: 0.0 Processes: 94
Usage of /: 23.4% of 7.69GB Users logged in: 0
Memory usage: 56% IP address for eth0: xxx.xx.xx.xxx
Swap usage: 0%
@mbad0la Hi! no, it's not reviewed yet.
My issue was: because of disk full the pid file was empty, and thus pid
was parsed as 0
. Remove the empty file fixed.
Thanks for the contribution! There will be a resolution to this issue in our upcoming release.
This issue is resolved by Release v1.2.1 https://github.com/aws/aws-codedeploy-agent/pull/271
Issue #228 , if available:
Description of changes:
When the pid file is empty,
find_pid
returns 0 because ruby parses empty to zero.Check if pid is great then 0 before using
process_running?
to check the process. Put the pid-checking outside functionfind_pid
because: empty pid file is actually a polluted state, so the pid file should be reset byclean_stale_pid
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.