From 797668ba77d781bf65cbf0832c69c8337603b9a4 Mon Sep 17 00:00:00 2001 From: jianghua wang Date: Thu, 8 Oct 2015 06:40:21 +0100 Subject: [PATCH] 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 --- lib/nova_plugins/hypervisor-xenserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nova_plugins/hypervisor-xenserver b/lib/nova_plugins/hypervisor-xenserver index efce383222..e097990bd3 100644 --- a/lib/nova_plugins/hypervisor-xenserver +++ b/lib/nova_plugins/hypervisor-xenserver @@ -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