New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Debian unattended-upgrades sometimes doesn't work in OpenVZ
I noticed that on some openvz containers, Debian's unattended-upgrades don't work and some do. The ones that don't work either have a unattended-upgrades-shutdown.log (that's blank) in /var/log/var/log/unattended-upgrades or just an empty directory for /var/log/unattended-upgrades. Some VMs have 512 MB of dedicated RAM that don't work and I have ones with only 128 MB of RAM that work (so I'm pretty sure it's not a memory issue). Has anyone else experienced issue, or better yet, have a solution to the problem?
Comments
Are you sure the automatic updates are enabled? By default they are not. Run dpkg-reconfigure unattended-upgrades and see.
They should be enabled. After running apt-get install unattended-upgrades, I added
in /etc/apt/apt.conf.d/02periodic
I've used the same setup for ~20 different VMs with various providers, about 10 of them work and the other ones don't
Edit: Nothing in syslog either.
Edit2: The broken OpenVZ VMs are on different kernel verisons (so I don't think it's ovz kernel related).
Maybe check if /etc/cron.daily/apt is missing. Broken OpenVZ templates are unfortunately very common.
See: http://serverfault.com/questions/568326/how-to-recreate-etc-cron-daily-apt
I usually do dpkg-reconfigure unattended-upgrades to enable autorun, not sure if it changes something
Thanks. /etc/cron.daily/apt appears to exist in all the OpenVZ nodes, but I followed the tutorial and reconfigured one.
I'll run this as well on a different node to see if it fixes things. Thanks.
Same. It worked with OVH but then I switched to other providers and it didn't. What seems to work on all VPS's is this:
http://tech.tiq.cc/2014/08/how-to-automatically-install-updates-on-linux-debian/
Installing ALL updates (not only security) only seems to work for me if I run "unattended-upgrade" once after having configured everything.
I haven't had unattended-upgrades not work for me on the three VPSes I have running Debian.
I seem to recall apticron not working right on a couple of them, but that was due to /etc/cron.daily/apt being not set to executable.