Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm responsible for about 30 Ubuntu computers at a private K-8 school. We have only a 3Mbps internet connection serving the entire campus, and I would like to ensure that updates are done in the middle of the night - so that daytime tasks are not slowed down.

I'm using Ubuntu 10.04, and have set all computers to download and install security updates via the update manager. I have also installed cron-apt, and modified the config file to stagger the start times of the upgrades from about 10pm to 4am local time.

HOWEVER - this morning I arrived at the school at 7:30am and all the computers were busy downloading a large security based update. Needless to say, all internet activity was slowed to a crawl (for the next 2 hours), and the computer users were very very upset. This was the event I'm trying so hard to prevent.

It seems that my scheme to ensure middle of the night downloads failed, and I'm not sure why.

I've also tried some schemes using unattended-upgrades & crontab, but there always seemed to be something scheduling upgrades to occur in addition to the ones I try to force at middle of the night.

Is there a sure fire way to absolutely positively guarantee that updates will occur only at one specific time? It would be nice if the update manager just had a drop down menu to specify a designated time.

Thanks in advance for any help you can give me.

share|improve this question

2 Answers 2

Not an answer to your exact issue but a workaround that presents you with significant benefits: why don't you just use a proxy?

There are numerous options but I'd start with squid-deb-proxy. You'll need one machine to serve as the host but this could easily be one of the machines you're dealing with. Similarly it could be a separate server. Doesn't need to be powerful.

The idea is updated packages need only be downloaded once. They get cached and all the other machines download from the local cache.

You still need to stagger the update process. One machine needs to download the updates to fill the cache. You could use one machine to download the updates at night (using a simple @daily cron job -- happens at midnight). The other machines could be turned off over night (saving a lot of money) and then could just grab their updates when they like. They'd only use internal bandwidth so would fly.

Some tips on setting it up can be read here.

share|improve this answer
    
That's a great idea! Actually, my first experience with Linux was this installation of 30 units last June. At that time, someone recommended to me to use apt-proxy, but I could never get the thing to work right. The squid proxy thing looks like it is much easier to setup, so it's less likely for a novice like me to mess it up. All my computers ARE on the same subnet, so this might be a really good answer for me. I'll give it a shot. Thanks! –  user12567 Mar 17 '11 at 22:28
    
You could also double the purpose of squid to act as a general proxy to speed up all your browsing and layer on something like dansguardian to act as a content filter to stop people viewing things they're not allowed to. You can very quickly have a complete system that delivers much better speeds, keeps parents and teachers happy but can also deliver large savings through bandwidth savings (not sure if this applies) and better power management policies. –  Oli Mar 17 '11 at 22:52

Looks like you are using two independent update mechanisms: cron-apt and the Update Manager. Try disabling automatic updates in the Update Manager. If cron-apt is configured correctly, you will get a notification email each time a new update is installed.

share|improve this answer
    
Thanks for the response. I'll try it tomorrow. I currently don't have cron-apt configured to send an email. Is there a log file I can view instead? –  user12567 Mar 17 '11 at 22:05
    
Take a look at /etc/cron-apt/config, both mail notifications and logging should be configurable there. –  Adam Byrtek Mar 17 '11 at 22:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.