XenServer: the cron job shouldn't print debug text into stderr

one cron job attempts to print debug text into stderr; so the file
of /root/dead.letter gets created and its size grows continuously.
It could eventually threaten dom0 disk space. Maybe there are two
solutions: one is to redirect the output to a specific log file;
and rotate log files in the script. And the other one is simply
to redirect the output /dev/null. By considering the function of
this cron job and the printed contents are straight and simple,
this patch set goes with the later solution.

Change-Id: I4875e5e3837e6f0249e314c6c5f408c79145c6c1
Closes-Bug: 1503966
This commit is contained in:
jianghua wang 2015-10-08 06:40:21 +01:00
parent d1ddc5396a
commit 797668ba77

View File

@ -79,7 +79,7 @@ function configure_nova_hypervisor {
# Create a cron job that will rotate guest logs
$ssh_dom0 crontab - << CRONTAB
* * * * * /root/rotate_xen_guest_logs.sh
* * * * * /root/rotate_xen_guest_logs.sh >/dev/null 2>&1
CRONTAB
# Create directories for kernels and images