Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
On Tue, Mar 19, 2013 at 7:48 AM, Michael Vogt wrote: > On Mon, Mar 18, 2013 at 02:33:28PM +0100, Arturo Moral wrote: > > Well, after upgrading, unattended-upgrades was launched daily as it > should > > be. The only problem then was that it didn't perform any package upgrade > > even when there were things to upgrade. > > After checking the /var/log/unattended-upgrades/unattended-upgrades.log, > I > > spotted the problem: > > Thanks for this update. > No problem, Michael. > > > Initial blacklisted packages: > [..] > > The origin used by these packages is Raspbian, not Debian, so I updated > my > > /etc/apt/apt.conf.d/50unattended-upgrades file and changed all Debian > > references by Raspbian and the problem seems to be solved by now. > > This sounds like the raspbian pi people may want to provide a default > config for unattended-upgrades so that it works out-of-the-box for > them too. Would you mind submiting a bugreport to them? I'm happy to > help them with how to customize unattended-upgrades and carry their > config in my upstream branch. > Here is the bug report I filled for this issue [1]. Cheers, ;) [1] https://bugs.launchpad.net/raspbian/+bug/1157486 > > Cheers, > Michael > > > Thanks all of you for your support. > > > > ♥ > > > > > > On Tue, Mar 12, 2013 at 6:39 PM, Arturo Moral wrote: > > > > > I just upgraded to version 0.79.5 (current in wheezy). > > > > > > I replaced my old "/etc/apt/apt.conf.d/50unattended-upgrades" config > file > > > by the new one and modified some lines: > > > > > > // Automatically upgrade packages from these origin patterns > > > Unattended-Upgrade::Origins-Pattern { > > > // Archive or Suite based matching: > > > // Note that this will silently match a different release after > > > // migration to the specified archive (e.g. testing becomes the > > > // new stable). > > > "o=Debian,a=testing"; > > > "o=Debian,a=testing-updates"; > > > // "o=Debian,a=proposed-updates"; > > > "origin=Debian,archive=testing,label=Debian-Security"; > > > > > > }; > > > > > > // List of packages to not update > > > Unattended-Upgrade::Package-Blacklist { > > > //"vim"; > > > //"libc6"; > > > //"libc6-dev"; > > > //"libc6-i686"; > > > }; > > > > > > // This option allows you to control if on a unclean dpkg exit > > > // unattended-upgrades will automatically run > > > // dpkg --force-confold --configure -a > > > // The default is true, to ensure updates keep getting installed > > > //Unattended-Upgrade::AutoFixInterruptedDpkg "false"; > > > > > > // Split the upgrade into the smallest possible chunks so that > > > // they can be interrupted with SIGUSR1. This makes the upgrade > > > // a bit slower but it has the benefit that shutdown while a upgrade > > > // is running is possible (with a small delay) > > > //Unattended-Upgrade::MinimalSteps "true"; > > > > > > // Install all unattended-upgrades when the machine is shuting down > > > // instead of doing it in the background while the machine is running > > > // This will (obviously) make shutdown slower > > > //Unattended-Upgrade::InstallOnShutdown "true"; > > > > > > // Send email to this address for problems or packages upgrades > > > // If empty or unset then no email is sent, make sure that you > > > // have a working mail setup on your system. A package that provides > > > // 'mailx' must be installed. E.g. "u...@example.com" > > > //Unattended-Upgrade::Mail "root"; > > > > > > // Set this value to "true" to get emails only on errors. Default > > > // is to always send a mail if Unattended-Upgrade::Mail is set > > > //Unattended-Upgrade::MailOnlyOnError "true"; > > > > > > // Do automatic removal of new unused dependencies after the upgrade > > > // (equivalent to apt-get autoremove) > > > Unattended-Upgrade::Remove-Unused-Dependencies "true"; > > > > > > // Automatically reboot *WITHOUT CONFIRMATION* if a > > > // the file /var/run/reboot-required is found after the upgrade > > > Unattended-Upgrade::Automatic-Reboot "true"; > > > > > &g
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
Well, after upgrading, unattended-upgrades was launched daily as it should be. The only problem then was that it didn't perform any package upgrade even when there were things to upgrade. After checking the /var/log/unattended-upgrades/unattended-upgrades.log, I spotted the problem: Initial blacklisted packages: Starting unattended upgrades script Allowed origins are: ['o=Debian,a=testing', 'o=Debian,a=testing-updates', 'o=Debian,a=proposed-updates', 'origin=Debian,archive=testing,label=Debian-Security'] Checking: idle3 ([""]) Checking: krb5-locales ([""]) Checking: libavahi-client3 ([""]) Checking: libavahi-common-data ([""]) Checking: libavahi-common3 ([""]) Checking: libavahi-glib1 ([""]) Checking: libgssapi-krb5-2 ([""]) Checking: libgstreamer-plugins-base0.10-0 ([""]) Checking: libk5crypto3 ([""]) Checking: libkrb5-3 ([""]) Checking: libkrb5support0 ([""]) Checking: libsystemd-login0 ([""]) Checking: perl ([""]) Checking: perl-base ([""]) Checking: perl-modules ([""]) Checking: python3 ([""]) Checking: python3-minimal ([""]) pkgs that look like they should be upgraded: Fetched 0 B in 0s (0 B/s) fetch.run() result: 0 blacklist: [] Packages that are auto removed: '' InstCount=0 DelCount=0 BrokenCout=0 No packages found that can be upgraded unattended The origin used by these packages is Raspbian, not Debian, so I updated my /etc/apt/apt.conf.d/50unattended-upgrades file and changed all Debian references by Raspbian and the problem seems to be solved by now. Thanks all of you for your support. ♥ On Tue, Mar 12, 2013 at 6:39 PM, Arturo Moral wrote: > I just upgraded to version 0.79.5 (current in wheezy). > > I replaced my old "/etc/apt/apt.conf.d/50unattended-upgrades" config file > by the new one and modified some lines: > > // Automatically upgrade packages from these origin patterns > Unattended-Upgrade::Origins-Pattern { > // Archive or Suite based matching: > // Note that this will silently match a different release after > // migration to the specified archive (e.g. testing becomes the > // new stable). > "o=Debian,a=testing"; > "o=Debian,a=testing-updates"; > // "o=Debian,a=proposed-updates"; > "origin=Debian,archive=testing,label=Debian-Security"; > > }; > > // List of packages to not update > Unattended-Upgrade::Package-Blacklist { > //"vim"; > //"libc6"; > //"libc6-dev"; > //"libc6-i686"; > }; > > // This option allows you to control if on a unclean dpkg exit > // unattended-upgrades will automatically run > // dpkg --force-confold --configure -a > // The default is true, to ensure updates keep getting installed > //Unattended-Upgrade::AutoFixInterruptedDpkg "false"; > > // Split the upgrade into the smallest possible chunks so that > // they can be interrupted with SIGUSR1. This makes the upgrade > // a bit slower but it has the benefit that shutdown while a upgrade > // is running is possible (with a small delay) > //Unattended-Upgrade::MinimalSteps "true"; > > // Install all unattended-upgrades when the machine is shuting down > // instead of doing it in the background while the machine is running > // This will (obviously) make shutdown slower > //Unattended-Upgrade::InstallOnShutdown "true"; > > // Send email to this address for problems or packages upgrades > // If empty or unset then no email is sent, make sure that you > // have a working mail setup on your system. A package that provides > // 'mailx' must be installed. E.g. "u...@example.com" > //Unattended-Upgrade::Mail "root"; > > // Set this value to "true" to get emails only on errors. Default > // is to always send a mail if Unattended-Upgrade::Mail is set > //Unattended-Upgrade::MailOnlyOnError "true"; > > // Do automatic removal of new unused dependencies after the upgrade > // (equivalent to apt-get autoremove) > Unattended-Upgrade::Remove-Unused-Dependencies "true"; > > // Automatically reboot *WITHOUT CONFIRMATION* if a > // the file /var/run/reboot-required is found after the upgrade > Unattended-Upgrade::Automatic-Reboot "true"; > > > // Use apt bandwidth limit feature, this example limits the download > // speed to 70kb/sec > //Acquire::http::Dl-Limit "70"; > > > Let's see how things go now. > > Love. > > On Sat, Mar 9, 2013 at 2:06 PM, Arturo Moral wrote: > >> On Sat, Mar 9, 2013 at 1:42 PM,
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
I just upgraded to version 0.79.5 (current in wheezy). I replaced my old "/etc/apt/apt.conf.d/50unattended-upgrades" config file by the new one and modified some lines: // Automatically upgrade packages from these origin patterns Unattended-Upgrade::Origins-Pattern { // Archive or Suite based matching: // Note that this will silently match a different release after // migration to the specified archive (e.g. testing becomes the // new stable). "o=Debian,a=testing"; "o=Debian,a=testing-updates"; // "o=Debian,a=proposed-updates"; "origin=Debian,archive=testing,label=Debian-Security"; }; // List of packages to not update Unattended-Upgrade::Package-Blacklist { //"vim"; //"libc6"; //"libc6-dev"; //"libc6-i686"; }; // This option allows you to control if on a unclean dpkg exit // unattended-upgrades will automatically run // dpkg --force-confold --configure -a // The default is true, to ensure updates keep getting installed //Unattended-Upgrade::AutoFixInterruptedDpkg "false"; // Split the upgrade into the smallest possible chunks so that // they can be interrupted with SIGUSR1. This makes the upgrade // a bit slower but it has the benefit that shutdown while a upgrade // is running is possible (with a small delay) //Unattended-Upgrade::MinimalSteps "true"; // Install all unattended-upgrades when the machine is shuting down // instead of doing it in the background while the machine is running // This will (obviously) make shutdown slower //Unattended-Upgrade::InstallOnShutdown "true"; // Send email to this address for problems or packages upgrades // If empty or unset then no email is sent, make sure that you // have a working mail setup on your system. A package that provides // 'mailx' must be installed. E.g. "u...@example.com" //Unattended-Upgrade::Mail "root"; // Set this value to "true" to get emails only on errors. Default // is to always send a mail if Unattended-Upgrade::Mail is set //Unattended-Upgrade::MailOnlyOnError "true"; // Do automatic removal of new unused dependencies after the upgrade // (equivalent to apt-get autoremove) Unattended-Upgrade::Remove-Unused-Dependencies "true"; // Automatically reboot *WITHOUT CONFIRMATION* if a // the file /var/run/reboot-required is found after the upgrade Unattended-Upgrade::Automatic-Reboot "true"; // Use apt bandwidth limit feature, this example limits the download // speed to 70kb/sec //Acquire::http::Dl-Limit "70"; Let's see how things go now. Love. On Sat, Mar 9, 2013 at 2:06 PM, Arturo Moral wrote: > On Sat, Mar 9, 2013 at 1:42 PM, Steven Chamberlain wrote: > >> Hi, >> > > Hello, Steven, > > >> >> Today could you please re-check: >> >> # cat /var/spool/anacron/cron.daily >> > 20130308 > > >> >> # grep anacron /var/log/syslog.1 >> > Mar 7 12:54:22 raspi anacron[1939]: Job `cron.daily' terminated > Mar 7 12:54:22 raspi anacron[1939]: Normal exit (1 job run) > Mar 7 21:25:01 raspi /USR/SBIN/CRON[32538]: (root) CMD (test -x > /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) > Mar 8 00:10:23 raspi anacron[1920]: Anacron 2.3 started on 2013-03-08 > Mar 8 00:10:23 raspi anacron[1920]: Will run job `cron.daily' in 5 min. > Mar 8 00:10:23 raspi anacron[1920]: Jobs will be executed sequentially > Mar 8 11:27:42 raspi anacron[1920]: Job `cron.daily' started > Mar 8 11:27:42 raspi anacron[4741]: Updated timestamp for job > `cron.daily' to 2013-03-08 > > # grep anacron /var/log/syslog > Mar 8 11:27:51 raspi anacron[1920]: Job `cron.daily' terminated > Mar 8 11:27:51 raspi anacron[1920]: Normal exit (1 job run) > Mar 8 21:25:01 raspi /USR/SBIN/CRON[24741]: (root) CMD (test -x > /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) > Mar 8 23:32:17 raspi anacron[1920]: Anacron 2.3 started on 2013-03-08 > Mar 8 23:32:17 raspi anacron[1920]: Normal exit (0 jobs run) > > or: >> # zgrep anacron /var/log/syslog.1.gz >> > >> # tail /var/log/unattended-upgrades/unattended-upgrades.log >> > 2013-03-08 11:49:15,488 DEBUG fetch.run() result: 0 > 2013-03-08 11:49:15,490 DEBUG blacklist: [] > 2013-03-08 11:49:35,734 INFO Packages that are auto removed: '' > 2013-03-08 11:49:35,736 DEBUG InstCount=0 DelCount=0 BrokenCout=0 > 2013-03-08 11:49:35,741 INFO No packages found that can be upgraded > unattended > 2013-03-08 12:18:00,782 INFO Initial blacklisted packages: > 2013-03-08 12:18:00,786 INFO Starting unattended upgrades script > 2013-03-08 12:18:00,801 INFO Allowed origins are:
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
On Sat, Mar 9, 2013 at 1:42 PM, Steven Chamberlain wrote: > Hi, > Hello, Steven, > > Today could you please re-check: > > # cat /var/spool/anacron/cron.daily > 20130308 > > # grep anacron /var/log/syslog.1 > Mar 7 12:54:22 raspi anacron[1939]: Job `cron.daily' terminated Mar 7 12:54:22 raspi anacron[1939]: Normal exit (1 job run) Mar 7 21:25:01 raspi /USR/SBIN/CRON[32538]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) Mar 8 00:10:23 raspi anacron[1920]: Anacron 2.3 started on 2013-03-08 Mar 8 00:10:23 raspi anacron[1920]: Will run job `cron.daily' in 5 min. Mar 8 00:10:23 raspi anacron[1920]: Jobs will be executed sequentially Mar 8 11:27:42 raspi anacron[1920]: Job `cron.daily' started Mar 8 11:27:42 raspi anacron[4741]: Updated timestamp for job `cron.daily' to 2013-03-08 # grep anacron /var/log/syslog Mar 8 11:27:51 raspi anacron[1920]: Job `cron.daily' terminated Mar 8 11:27:51 raspi anacron[1920]: Normal exit (1 job run) Mar 8 21:25:01 raspi /USR/SBIN/CRON[24741]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) Mar 8 23:32:17 raspi anacron[1920]: Anacron 2.3 started on 2013-03-08 Mar 8 23:32:17 raspi anacron[1920]: Normal exit (0 jobs run) or: > # zgrep anacron /var/log/syslog.1.gz > > # tail /var/log/unattended-upgrades/unattended-upgrades.log > 2013-03-08 11:49:15,488 DEBUG fetch.run() result: 0 2013-03-08 11:49:15,490 DEBUG blacklist: [] 2013-03-08 11:49:35,734 INFO Packages that are auto removed: '' 2013-03-08 11:49:35,736 DEBUG InstCount=0 DelCount=0 BrokenCout=0 2013-03-08 11:49:35,741 INFO No packages found that can be upgraded unattended 2013-03-08 12:18:00,782 INFO Initial blacklisted packages: 2013-03-08 12:18:00,786 INFO Starting unattended upgrades script 2013-03-08 12:18:00,801 INFO Allowed origins are: ['o=Debian,n=wheezy', 'o=Debian,n=wheezy-updates', 'o=Debian,n=wheezy-proposed-updates', 'o=Debian,n=wheezy,l=Debian-Security'] 2013-03-08 12:19:22,738 INFO Packages that are auto removed: '' 2013-03-08 12:19:22,742 INFO No packages found that can be upgraded unattended All the entries in this log correspond to manual runs from yesterday's "--dry-run" tests. > > Thanks! > No problem at all. Thank you for keeping an eye on this. Cheers. > Regards, > -- > Steven Chamberlain > ste...@pyro.eu.org >
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
On Sat, Mar 9, 2013 at 12:21 AM, Steven Chamberlain wrote: > On 08/03/13 17:37, Arturo Moral wrote: > > [...] I should see a log > > file inside /var/log/unattended-upgrades/ with details on every day's > > check [...] > > I agree. On a wheezy/sid system using regular cron (not anacron) I get > exactly this each day from unattended-upgrades 0.79.4 when there are no > updates to install: > > /var/log/unattended-upgrades/unattended-upgrades.log : > > 2013-03-08 06:26:39,208 INFO Initial blacklisted packages: > > 2013-03-08 06:26:39,225 INFO Starting unattended upgrades script > > 2013-03-08 06:26:39,225 INFO Allowed origins are: ['o=Debian,a=testing', > 'origin=Debian,archive=testing,label=Debian-Security'] > > 2013-03-08 06:26:41,758 INFO No packages found that can be upgraded > unattended > > In addition, I get a separate dpkg log only if there were any packages > to actually update. > > > I don't think your issue is due to configuration, but here is mine > anyway for reference: > > /etc/apt/apt.conf.d/02periodic : > > APT::Periodic::Enable "1"; > > APT::Periodic::Unattended-Upgrade "1"; > > APT::Periodic::AutocleanInterval "1"; > > APT::Periodic::Update-Package-Lists "1"; > > // I already 'randomise' the hour/minute of cron.daily on my hosts > > APT::Periodic::RandomSleep "60"; > My "Periodic" configuration parameters live under "/etc/apt/apt.conf.d/20auto-upgrades", which was created by unattended-upgrades on installation, but I don't think that this affects the way they work. > > /etc/apt/apt.conf.d/50unattended-upgrades : > > Unattended-Upgrade::Origins-Pattern { > > "o=Debian,a=testing"; > > "origin=Debian,archive=testing,label=Debian-Security"; > > }; > > Unattended-Upgrade::Package-Blacklist { > > }; > > Unattended-Upgrade::Mail "root@localhost"; > > Regards, > -- > Steven Chamberlain > ste...@pyro.eu.org >
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
Hey, Teodor, On Fri, Mar 8, 2013 at 6:09 PM, Teodor MICU wrote: > control: -1 severity normal > > 2013/3/8 Arturo Moral : > >> This config was removed in version 0.79.5 and might not work at all: > > > > I'm currently using 0.79.4, therefore the config change does not affect > me, > > right? > > You should not use it, 0.79.5 will migrate to testing on the following > days. > I'm using it because it's the current version in testing. It's not a personal choice and I will be happy upgrading to 0.79.5 when that time comes. > > > Anyway, my main issue is that the unattended upgrades don't run. If it > would > > be only a config file problem, they would run but with no upgradable > > candidates. > > You didn't show that u-a doesn't work. From what we've seen so far it > works as expected, maybe you need to investigate why Cron doesn't > run?! > So far, cron is doing its job with the rest of the jobs. I did not find any reference about tweaking cron in unattended-upgrades documentation for making the package works. For me, if unattended-upgrades is not doing its daily check after being enabled and well configured, the package does not work properly. If I missed a final step after installing, enabling and configuring for making it work autonomously, please let me know. > > Do you know for sure that there are packages to be upgraded? Running > "apt-get upgrade" will tell you. If "apt-get" doesn't find packages to > be upgraded, neither does u-a. > I've been doing the upgrades manually and there were several packages to upgrade since I installed and "enabled" unattended-upgrades. Anyway, I'm not having any issue on what updates or what doesn't. I should see a log file inside /var//log/unattended-upgrades/ with details on every day's check but the file didn't exist until I ran a --dry-run days after enabling. > > Cheers >
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
On Fri, Mar 8, 2013 at 4:49 PM, Steven Chamberlain wrote: > On 16:27, Arturo Moral wrote: > > # grep -i daily /var/log/syslog > > Mar 8 11:27:51 raspi anacron[1920]: Job `cron.daily' terminated > > The log was probably rotated at that point. Is there anythikng more of > interest in the preceding log, e.g. syslog.1 or syslog.1.gz? > Here are all the "daily" occurrences inside syslog, syslog.1 and syslog.2.gz: Mar 4 21:25:01 raspi /USR/SBIN/CRON[20013]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) Mar 5 00:30:24 raspi anacron[1781]: Will run job `cron.daily' in 5 min. Mar 5 10:16:35 raspi anacron[1781]: Job `cron.daily' started Mar 5 10:16:36 raspi anacron[2631]: Updated timestamp for job `cron.daily' to 2013-03-05 Mar 5 10:28:38 raspi anacron[1781]: Job `cron.daily' terminated Mar 5 21:25:01 raspi /USR/SBIN/CRON[21063]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) Mar 6 21:25:01 raspi /USR/SBIN/CRON[23904]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) Mar 7 00:28:24 raspi anacron[1939]: Will run job `cron.daily' in 5 min. Mar 7 12:47:32 raspi anacron[1939]: Job `cron.daily' started Mar 7 12:47:32 raspi anacron[3205]: Updated timestamp for job `cron.daily' to 2013-03-07 Mar 7 12:54:22 raspi anacron[1939]: Job `cron.daily' terminated Mar 7 21:25:01 raspi /USR/SBIN/CRON[32538]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) Mar 8 00:10:23 raspi anacron[1920]: Will run job `cron.daily' in 5 min. Mar 8 11:27:42 raspi anacron[1920]: Job `cron.daily' started Mar 8 11:27:42 raspi anacron[4741]: Updated timestamp for job `cron.daily' to 2013-03-08 Mar 8 11:27:51 raspi anacron[1920]: Job `cron.daily' terminated > > Thanks, > Thank you for your quick responses, Steven. For me, everything seems to be working properly. I can't spot the problem. Cheers. > Regards, > -- > Steven Chamberlain > ste...@pyro.eu.org >
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
On Fri, Mar 8, 2013 at 4:15 PM, Steven Chamberlain wrote: > On 08/03/13 15:08, Arturo Moral wrote: > > # cat /var/spool/anacron/cron.daily > > 20130308 > > This means 'cron' was working properly, and it updated the timestamp in > that file. > > What about the file /etc/cron.d/anacron ? Is it there, what are its > contents? # /etc/cron.d/anacron: crontab entries for the anacron package SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 30 7* * * roottest -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron start >/dev/null > Also: > > $ ls -al /usr/sbin/anacron /etc/init.d/anacron /usr/bin/on_ac_power > ls: cannot access /usr/bin/on_ac_power: No such file or directory -rwxr-xr-x 1 root root 2,0K may 21 2012 /etc/init.d/anacron -rwxr-xr-x 1 root root 30K jun 2 2012 /usr/sbin/anacron > > > > # grep daily /var/log/cron.log.1 > > > > The file /var/log/cron.log.1 does not exist. > > Thank you. On my system (with rsyslogd) that would be created by > logrotate from cron.daily... What about this file instead? > > # grep daily /var/log/cron.log > That file doesn't exist either. I use to check cron outputs in /var/log/syslog so I ran: # grep -i daily /var/log/syslog Mar 8 11:27:51 raspi anacron[1920]: Job `cron.daily' terminated > > Thanks. > Regards, > -- > Steven Chamberlain > ste...@pyro.eu.org >
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
On Fri, Mar 8, 2013 at 3:20 PM, Steven Chamberlain wrote: > Hi g0to, > Hello, Steven! > > This looks to be an anacron issue, and /etc/cron.daily/apt not running > automatically. Please could you take a look at: > > # cat /var/spool/anacron/cron.daily > 20130308 > # grep daily /var/log/cron.log.1 > The file /var/log/cron.log.1 does not exist. > # ps aux | grep cron | grep -v grep > root 1962 0.0 0.4 4368 952 ?Ss 11:22 0:00 /usr/sbin/cron > Thanks! > Cheers, mate. Regards, g0to. > Regards, > -- > Steven Chamberlain > ste...@pyro.eu.org >
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
Hi, Teodor, On Fri, Mar 8, 2013 at 7:50 AM, Teodor MICU wrote: > 2013/3/7 g0to : > > -- Configuration Files: > > /etc/apt/apt.conf.d/50unattended-upgrades changed: > > // Automatically upgrade packages from these origin patterns > > Unattended-Upgrade::Origins-Pattern { > > // Codename based matching: > > // This will follow the migration of a release through different > > // archives (e.g. from testing to stable and later oldstable). > > "o=Debian,n=wheezy"; > > "o=Debian,n=wheezy-updates"; > > "o=Debian,n=wheezy-proposed-updates"; > > "o=Debian,n=wheezy,l=Debian-Security"; > > This config was removed in version 0.79.5 and might not work at all: > > - remove codename based matching example as this needs a newer >python-apt than available in wheezy, thanks to Russell Stuart > I'm currently using 0.79.4, therefore the config change does not affect me, right? > > > // Archive or Suite based matching: > > // Note that this will silently match a different release after > > // migration to the specified archive (e.g. testing becomes the > > // new stable). > > // "o=Debian,a=stable"; > > // "o=Debian,a=stable-updates"; > > // "o=Debian,a=proposed-updates"; > > // "origin=Debian,archive=stable,label=Debian-Security"; > > }; > > Usually this is what you need to enable, plus an extra line if you are > using "testing" or "unstable". > Anyway, my main issue is that the unattended upgrades don't run. If it would be only a config file problem, they would run but with no upgradable candidates. Please, correct me if I'm wrong and thanks for your input. Cheers. > > Cheers >
Bug#702509: unattended-upgrades: does not run autonomously, even after it was enabled
On Fri, Mar 8, 2013 at 6:50 AM, Michael Vogt wrote: > On Thu, Mar 07, 2013 at 04:43:03PM +0100, g0to wrote: > > Package: unattended-upgrades > > Version: 0.79.4 > > Severity: grave > > Tags: security > > Justification: renders package unusable > > Thanks for your bugreport. > > > after trying to make it run by myself and googling and make a few > questions here[1] and there[2], I've decided to contact you to report what > seems to be a lack of functionality of the package. > > > > Following the instructions in > "/usr/share/doc/unattended-upgrades/README", after installing the package, > I enabled it > > > > sudo dpkg-reconfigure -plow unattended-upgrades > > > > uncommented the proper lines in > "/etc/apt/apt.conf.d/50unattended-upgrades" (below) and waited for it to > unattendedly keeps my system update. But that didn't happen. > > After checking the logs in "/var/log/unattended-upgrades/" and > "/var/log/apt/history.log" for several days, no activity was recorded there. > > I also tried running it in the "--dry-run" way and it "dry worked" with > no errors. > > > > I've tagged the bug like a security issue because someone could trust > the security updates of their system after installing and enabling the > package and don't check if it's working after a long, and potentially > insecure, time. > > > > Thank you for your time and for your job maintaining the package. > > The way you enabled it should work so I would need some additional > information from you to figure out what is going on. Could you please > send me the output of: > $ apt-config dump|grep Periodic > APT::Periodic ""; APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1"; > > and then the debug output that: > $ sudo unattended-upgrade --debug --dry-run > /tmp/un.output 2&>1 > This will generate a file /tmp/un.output that I need too. > I think that you had a typo at the end of your line. This is the output of running $ sudo unattended-upgrade --debug --dry-run > /tmp/un.output 2>&1 Initial blacklisted packages: Starting unattended upgrades script Allowed origins are: ['o=Debian,n=wheezy', 'o=Debian,n=wheezy-updates', 'o=Debian,n=wheezy-proposed-updates', 'o=Debian,n=wheezy,l=Debian-Security'] pkgs that look like they should be upgraded: Fetched 0 B in 0s (0 B/s) fetch.run() result: 0 blacklist: [] Packages that are auto removed: '' InstCount=0 DelCount=0 BrokenCout=0 No packages found that can be upgraded unattended > and finally the file: > /var/log/unattended-upgrades/unattended-upgrades.log > Note that this file didn't exist until I ran the line above (the --dry-run). Here's its content: 2013-03-08 11:48:08,316 INFO Initial blacklisted packages: 2013-03-08 11:48:08,322 INFO Starting unattended upgrades script 2013-03-08 11:48:08,328 INFO Allowed origins are: ['o=Debian,n=wheezy', 'o=Debian,n=wheezy-updates', 'o=Debian,n=wheezy-proposed-updates', 'o=Debian,n=wheezy,l=Debian-Security'] 2013-03-08 11:49:15,411 DEBUG pkgs that look like they should be upgraded: 2013-03-08 11:49:15,488 DEBUG fetch.run() result: 0 2013-03-08 11:49:15,490 DEBUG blacklist: [] 2013-03-08 11:49:35,734 INFO Packages that are auto removed: '' 2013-03-08 11:49:35,736 DEBUG InstCount=0 DelCount=0 BrokenCout=0 2013-03-08 11:49:35,741 INFO No packages found that can be upgraded unattended > > That hopefully gives me enough information to figure out what is going > on. I suspect for some reason the script is not run in your cron which > is strange. It hooks into /etc/cron.daily/apt, you can also run: > $ sudo sh -x /etc/cron.daily/apt > + test -r /var/lib/apt/extended_states + cd /var/backups + cmp -s apt.extended_states.0 /var/lib/apt/extended_states + which apt-config + AutoAptEnable=1 + apt-config shell AutoAptEnable APT::Periodic::Enable + eval + [ 1 -eq 0 ] + VERBOSE=0 + apt-config shell VERBOSE APT::Periodic::Verbose + eval + debug_echo verbose level 0 + [ 0 -ge 1 ] + [ 0 -le 2 ] + XSTDOUT=>/dev/null + XSTDERR=2>/dev/null + XAPTOPT=-qq + XUUPOPT= + [ 0 -ge 3 ] + check_power + which on_ac_power + return 0 + which apt-get + eval apt-get check -f -qq 2>/dev/null + apt-get check -f -qq + date +%s + now=1362740095 + UpdateInterval=0 + apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists + eval UpdateInterval='1' + UpdateInterval=1 + DownloadUpgradeableInterval=0 + apt-config shell DownloadUpgradeableInterval APT::Periodic::Download-Upgradeable-Packages + eval + UnattendedUpgradeInterval=0 + apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade + eval UnattendedUpgradeInterval='1' + UnattendedUpgradeInterval=1 + AutocleanInterval=0 + apt-config shell AutocleanInterval APT::Periodic::AutocleanInterval + eval + BackupArchiveInterval=0 + apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterval + eval + Debdelta=1 + apt-config shell Debdelta APT::Periodic::Download-Upgradeable-Packages-Debdelta + eval + [ 1 -eq 0 ] + do_cache_backup 0 + BackupArchiveInterval=0 + [ 0 -eq