severity 636463 wishlist
thanks

Hi Tim

This is certainly an interesting problem. The patch is a good start but
as we can foresee problems already now we need to find out a solution
to that before it is applied.

There is also one other problem. It is just a very limited number of
files that are actually installed during the initial install when
postcreate.sh is executing. Actually on my computer it was only anacron
that hold a file in that directory (that I have not created myself or installed
post initial install).

All other applications will have the same problem as before.

I can see two solutions:
1) postcreate.sh go through only the files that are actually created
 on initial install and touch them in a similar way as your patch.
2) A new tool is introduced that should be run by the system administrator.

Do you have any opinion about this?

Best regards,

// Ola

On Wed, Aug 03, 2011 at 11:25:28AM +0100, Tim Small wrote:
> Package: vzctl
> Version: 3.0.24-12
> Severity: normal
> Tags: patch
> 
> I sent this a few months ago, but it seems to have been eaten by a
> faulty MTA setup :-(.
> 
> With multiple Debian VEs installed on a host, load spikes occur
> corresponding with cron job execution.
> 
> On investigation, it appeared that /etc/vz/dists/scripts/postcreate.sh
> randomises run-times of entries in /etc/crontab, but doesn't touch stuff
> under /etc/cron.d/
> 
> I'm not entirely sure that this patch is the correct answer (maybe it'll
> break things like rsnapshot - which needs to have it's entries run in the
> originally-specified order) - but it is at least a start...
> 
> Tim.
> 
> -- System Information:
> Debian Release: 6.0.2
>   APT prefers stable
>   APT policy: (500, 'stable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 2.6.32-5-openvz-amd64 (SMP w/8 CPU cores)
> Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages vzctl depends on:
> ii  iproute                       20100519-3 networking and traffic control 
> too
> ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared 
> lib
> ii  vzquota                       3.0.12-3   server virtualization solution - 
> q
> 
> Versions of packages vzctl recommends:
> ii  rsync                         3.0.7-2    fast remote file copy program 
> (lik
> 
> vzctl suggests no packages.
> 
> -- Configuration Files:
> /etc/vz/cron/vz changed [not included]
> /etc/vz/dists/scripts/debian-set_hostname.sh changed [not included]
> /etc/vz/vz.conf changed [not included]
> 
> -- no debconf information
> 
> *** /tmp/openvz-postcreate-randomize-cron.d-too.patch
> --- postcreate.sh.old 2010-09-14 06:07:31.000000000 +0100
> +++ /etc/vz/dists/scripts/postcreate.sh       2011-08-03 09:27:22.490356610 
> +0100
> @@ -24,12 +24,12 @@
>  
>  function randcrontab()
>  {
> -     file=${VE_ROOT}"/etc/crontab"
> +     for file in ${VE_ROOT}/etc/cron.d/* ${VE_ROOT}/etc/crontab
> +     do
> +             [ -f "${file}" ] || return 0
>  
> -     [ -f "${file}" ] || return 0
> -
> -     /bin/cp -fp ${file} ${file}.$$
> -     cat ${file} | awk '
> +             /bin/cp -fp ${file} ${file}.$$
> +             cat ${file} | awk '
>  BEGIN { srand(); }
>  {
>       if ($0 ~ /^[ \t]*#/ || $0 ~ /^[ \t]+*$/) {
> @@ -61,8 +61,9 @@
>       }
>       print line;
>  }
> -' > ${file}.$$ && /bin/mv -f ${file}.$$ ${file}
> -     /bin/rm -f ${file}.$$ 2>/dev/null
> +             ' > ${file}.$$ && /bin/mv -f ${file}.$$ ${file}
> +             /bin/rm -f ${file}.$$ 2>/dev/null
> +     done
>  }
>  
>  function disableroot()
> 
> 
> 

-- 
 --------------------- Ola Lundqvist ---------------------------
/  o...@debian.org                     Annebergsslingan 37      \
|  o...@inguza.com                      654 65 KARLSTAD          |
|  http://inguza.com/                  +46 (0)70-332 1551       |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---------------------------------------------------------------



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to