unattended upgrade ran one day after schedule
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
I have noticed a strange behaviour in unattended upgrades. The host in question is scheduled to run upgrades on Mondays every second week. However, this week it ran upgrades on Tuesday instead (2019-04-09).
This is the first time I’ve noticed this behaviour. I checked the logs in /var/log/
The schedule was set with the line 'APT::Periodic:
Could it be daylight savings time that has caused skewing of the schedule?
The server is located in Sweden and on 2019-03-31 we switched from CET to CEST. If the time diff is calculated with hours instead of calendar days passed, perhaps the missing hour on 2019-03-31 caused the scheduler to believe that on Monday 2019-03-08, two weeks (336 hours) had not yet passed.
ADDITIONAL INFO
Description: Ubuntu 16.04.6 LTS
Release: 16.04
apt:
Installed: 1.2.29ubuntu0.1
Candidate: 1.2.31
Version table:
1.2.31 500
500 http://
*** 1.2.29ubuntu0.1 500
500 http://
100 /var/lib/
1.2.10ubuntu1 500
500 http://
unattended-
Installed: 0.90ubuntu0.10
Candidate: 0.90ubuntu0.10
Version table:
*** 0.90ubuntu0.10 500
500 http://
500 http://
500 http://
500 http://
100 /var/lib/
0.90 500
500 http://
500 http://
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apt 1.2.29ubuntu0.1
ProcVersionSign
Uname: Linux 4.4.0-142-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Wed Apr 10 09:06:49 2019
InstallationDate: Installed on 2017-12-28 (467 days ago)
InstallationMedia: Ubuntu-Server 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: patch |
Changed in apt (Ubuntu): | |
importance: | Undecided → Low |
This IS related to daylight saving.
The script: /usr/lib/ apt/apt. systemd. daily check that the script is not run twice at the same period.
The script checks the date of today and the date of the last timestamp to determine the the diff.
The interval is calculated using the number of seconds per day multiplied by number of days.
If a day in the interval has less then 24h this check fails.
This also affects the apt-daily.service that updates.
This is not only Xenial but all the way up to 20.04/Focal.