Describe the bug
Random failures occur when the code in amazon-cloudwatch-agent-ctl script at
|
for file in "${JSON_DIR}"/*.tmp; do |
|
mv -f "${file}" "${JSON_DIR}/$(basename "${file}" .tmp)" |
|
done |
attempts to iterate over a glob expression that does not resolve to any files.
Steps to reproduce
Unknown when or how this happens, it seems random. Most of the time it works then once every several executions it exits with that error message.
What did you expect to see?
No errors, exit code 0.
What did you see instead?
Error output:
mv: cannot stat '/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/*.tmp': No such file or directory
What version did you use?
Version: amazon-cloudwatch-agent-1.300066.0b1367-1.x86_64
What config did you use?
Config: Using defaults and appending a simple extra files config. Does not matter what the config file is, it fails only on rare occasions without changes in the config.
Environment
OS: Amazon Linux 2
Additional context
None
Describe the bug
Random failures occur when the code in amazon-cloudwatch-agent-ctl script at
amazon-cloudwatch-agent/packaging/dependencies/amazon-cloudwatch-agent-ctl
Lines 345 to 347 in 0e07319
Steps to reproduce
Unknown when or how this happens, it seems random. Most of the time it works then once every several executions it exits with that error message.
What did you expect to see?
No errors, exit code 0.
What did you see instead?
Error output:
What version did you use?
Version: amazon-cloudwatch-agent-1.300066.0b1367-1.x86_64
What config did you use?
Config: Using defaults and appending a simple extra files config. Does not matter what the config file is, it fails only on rare occasions without changes in the config.
Environment
OS: Amazon Linux 2
Additional context
None