Ironically, 12 years later in 22.04, /usr/lib/apt/apt.systemd.daily doesn't seem to indicate success or failure to systemd either, which means you can't use e.g. journalctl -p err as a "one stop shop" to find things that are failing on system :(
** Bug watch added: Debian Bug tracker #778878 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778878 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/691050 Title: Daily cron job doesn't report failures Status in apt package in Ubuntu: Confirmed Bug description: Binary package hint: apt Hi I'm using unattended-upgrades in a lucid vm, setup for security updates to be installed automatically. I realized recently that this stopped working for some time, but I didn't get any error whatsoever: there were available security updates when I would launch aptitude, but they would not get installed overnight anymore. To find out what was going on, I've set APT::Periodic::Verbose 2; in the apt config; I got this output in the next day's cron: /etc/cron.daily/apt: verbose level 2 sleeping for 537 seconds apt-key net-update (success) download updated metadata (error) download upgradable (not run) unattended-upgrade (not run) check_stamp: interval=0 autoclean (not run) aged: ctime <30 and mtime <30 and ctime>2 and mtime>2 end remove by archive size: size=508 < 512000 (I found it hard to force a run, there is no flag to e.g. ignore the timestamp checks and force this cron job to do what it would do nightly; you have to edit it and disable a bunch of tests, but then it's not obvious that the right thing is being changed etc.) The problem was that one of the APT repository I was tracking had gone away, it had been removed, resulting in apt-get update failing to complete: E: Some index files failed to download, they have been ignored, or old ones used instead. but this went on unnoticed for weeks. I think this cron job should report failures by: - outputting something meaningful to stderr when an error condition appears - returning with a non-zero exit status when some error condition occurs and ideally, it would be possible to run it manually during day, even if it ran overnight, perhaps a "force" flag allowing to ignore timestamp checks? Cheers, To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/691050/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp