Daily cron job doesn't report failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
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:
/etc/cron.
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,
Changed in apt (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
summary: |
- Daily cron job doesn't report faliures + Daily cron job doesn't report failures |
tags: | added: patch |
Oh and another thing which would be useful to disable when running the cron script by hand is the random sleep