Package: bcfg2
Version: 0.9.5.7-1.1
Severity: wishlist
Hi there,
Right now all bcfg2 clients will run at the very same time in a common
scenario (i.e. from the cronjob provided) that can, in my case does,
kill the server. Maybe the cron job could do some "random" sleeping
before running the agent, just like /etc/cron.daily/apt does, i.e:
sleep `$(($(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -c"1-5") %
1800))`
Or, from /etc/cron.daily/apt:
# sleep for a random interval of time (default 30min)
# (some code taken from cron-apt, thanks)
random_sleep()
{
RandomSleep=1800
eval $(apt-config shell RandomSleep APT::Periodic::RandomSleep)
if [ $RandomSleep -eq 0 ]; then
return
fi
if [ -z "$RANDOM" ] ; then
# A fix for shells that do not have this bash feature.
RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -c"1-5")
fi
TIME=$(($RANDOM % $RandomSleep))
sleep $TIME
}
That would distribute the hourly load spike a bit ;)
Thanks,
Marc
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (900, 'testing'), (300, 'unstable'), (150, 'experimental'), (100,
'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]