Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runlogwatch.sh fix CPU usage and partial files
Currently runlogwatch.sh runs in a tight loop when there are no files, consuming CPU. Also there have been reports of truncated logs being outputted which would be explained by ironic not writing these files atomically [1]. This change improves this script by: - moving the sleep to the top of the loop so it is called on every iteration - change the file glob to a `find` command which includes `-mmin +0.1` so the file is only processed when it is at least 6 seconds old [1] https://opendev.org/openstack/ironic/src/branch/master/ironic/drivers/utils.py#L315-L316 Signed-off-by: Steve Baker <sbaker@redhat.com>
- Loading branch information