From 032022b6a83f5a207b29bf65aeb6399a0c372fef Mon Sep 17 00:00:00 2001 From: Felix Barbeira Date: Mon, 26 Oct 2015 09:13:45 +0100 Subject: Include variable 'RandomSleep'. When the apt job starts, it will sleep for a random period between 0 and APT::Periodic::RandomSleep seconds. The default value is "1800" so that the script will stall for up to 30 minutes (1800 seconds) so that the mirror servers are not crushed by everyone running their updates all at the same time. Only set this to 0 if you use a local mirror and don't mind the load spikes. Note that while the apt job is sleeping it will cause the execution of the rest of your cron.daily jobs to be delayed. --- spec/classes/unattended_upgrades_spec.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spec') diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb index 72291d5..f361bcb 100644 --- a/spec/classes/unattended_upgrades_spec.rb +++ b/spec/classes/unattended_upgrades_spec.rb @@ -279,6 +279,7 @@ describe 'unattended_upgrades' do 'only_on_error' => true, }, :dl_limit => 70, + :random_sleep => 300, } end it { should contain_package('unattended-upgrades') } @@ -350,6 +351,8 @@ describe 'unattended_upgrades' do /APT::Periodic::AutocleanInterval "5";/ ).with_content( /APT::Periodic::Verbose "1";/ + ).with_content( + /APT::Periodic::RandomSleep "300";/ ) } -- cgit v1.2.3