diff options
-rwxr-xr-x | iurt2 | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -321,8 +321,12 @@ if (!-d "$config->{local_upload}/iurt/$run{distro_tag}/") { mkdir "$local_spool/log" } } -# perform some cleaning before running to have some more space -system(qq|find $local_spool/log/ -name "*.log" \\( -size +$config->{log_size_limit} -or -mtime +$config->{log_size_date} \\) -exec rm -f {} \\;|); +# perform some cleaning before running to have some more space, rsync to the server too in case previous iurt crashed +if ($config->{rsync_to} && !$run{no_rsync}) { + # remove some old and very big log files not to saturate the server + system(qq|find $local_spool/log/ -name "*.log" \\( -size +$config->{log_size_limit} -or -mtime +$config->{log_size_date} \\) -exec rm -f {} \\;|); + system("rsync --delete -alHPe 'ssh -c arcfour' $local_spool/log/ $config->{rsync_to}/$run{distro_tag}/$run{my_arch}/log/"); +} if (!dump_rpmmacros("$chroot/home/builder/.rpmmacros")) { print "ERROR iurt: could not dump rpm macros to $chroot/home/builder/.rpmmacros, trying to rebuild the chroot"; @@ -933,7 +937,7 @@ sub perform_command { my (@stat) = stat $logfile; if ($stat[7] > $size_limit) { print {$run{LOG}} "WARNING: killing current command because of log size exceeding limit ($stat[7] > $config->{log_size_limit})\n"; - kill 14, $parent_pid; + kill 14, "-$parent_pid"; exit } $tot_time += sleep 30; |