[Touch-packages] [Bug 1824088] Re: unattended upgrade ran one day after schedule

2020-04-01 Thread Carl Winbäck
Awesome work Magnus. Well done!

Since the bug is related to APT, is Debian then considered the upstream
of this source?

Would it be appropriate to also file a bug in their bug tracker? If so,
I can arrange that.

-- 
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/1824088

Title:
  unattended upgrade ran one day after schedule

Status in apt package in Ubuntu:
  Confirmed

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/apt/history.log* and I saw that worked as intended up
  until this week. Upgrades ran as expected on 2019-03-11 and
  2019-03-25, which where both Mondays.

  The schedule was set with the line 'APT::Periodic::Unattended-Upgrade
  "14";' in the file /etc/apt/apt.conf.d/20auto-upgrades.

  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://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
   *** 1.2.29ubuntu0.1 500
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
  100 /var/lib/dpkg/status
   1.2.10ubuntu1 500
  500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

  unattended-upgrades:
Installed: 0.90ubuntu0.10
Candidate: 0.90ubuntu0.10
Version table:
   *** 0.90ubuntu0.10 500
  500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
  500 http://security.ubuntu.com/ubuntu xenial-security/main i386 
Packages
  100 /var/lib/dpkg/status
   0.90 500
  500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
  500 http://se.archive.ubuntu.com/ubuntu xenial/main i386 Packages

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: apt 1.2.29ubuntu0.1
  ProcVersionSignature: Ubuntu 4.4.0-142.168-generic 4.4.167
  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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1824088/+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


[Touch-packages] [Bug 1824088] Re: unattended upgrade ran one day after schedule

2020-03-31 Thread Carl Winbäck
How about this idea?

What if we add this line to the beginning of
usr/lib/apt/apt.systemd.daily:

export TZ="UTC0"

(I got this idea from the GNU Coreutils manual. See
https://www.gnu.org/software/coreutils/manual/html_node/Relative-items-
in-date-strings.html)

-- 
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/1824088

Title:
  unattended upgrade ran one day after schedule

Status in apt package in Ubuntu:
  Confirmed

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/apt/history.log* and I saw that worked as intended up
  until this week. Upgrades ran as expected on 2019-03-11 and
  2019-03-25, which where both Mondays.

  The schedule was set with the line 'APT::Periodic::Unattended-Upgrade
  "14";' in the file /etc/apt/apt.conf.d/20auto-upgrades.

  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://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
   *** 1.2.29ubuntu0.1 500
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
  100 /var/lib/dpkg/status
   1.2.10ubuntu1 500
  500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

  unattended-upgrades:
Installed: 0.90ubuntu0.10
Candidate: 0.90ubuntu0.10
Version table:
   *** 0.90ubuntu0.10 500
  500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
  500 http://security.ubuntu.com/ubuntu xenial-security/main i386 
Packages
  100 /var/lib/dpkg/status
   0.90 500
  500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
  500 http://se.archive.ubuntu.com/ubuntu xenial/main i386 Packages

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: apt 1.2.29ubuntu0.1
  ProcVersionSignature: Ubuntu 4.4.0-142.168-generic 4.4.167
  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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1824088/+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


[Touch-packages] [Bug 1824088] Re: unattended upgrade ran one day after schedule

2020-03-31 Thread Carl Winbäck
If we look at lines 131 and 132 in /usr/lib/apt/apt.systemd.daily, we
will se the following:

interval="${interval%d}"
interval=$((interval*60*60*24))

I’m not 100% certain but I think that this time logic is what cause the
bug to occur, in accordance with what Magnus has pointed out in his
comments.

(It’s possible that lines 122-130 are also relevant.)

Any ideas on how to modify the code in order to avoid this bug?

-- 
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/1824088

Title:
  unattended upgrade ran one day after schedule

Status in apt package in Ubuntu:
  Confirmed

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/apt/history.log* and I saw that worked as intended up
  until this week. Upgrades ran as expected on 2019-03-11 and
  2019-03-25, which where both Mondays.

  The schedule was set with the line 'APT::Periodic::Unattended-Upgrade
  "14";' in the file /etc/apt/apt.conf.d/20auto-upgrades.

  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://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
   *** 1.2.29ubuntu0.1 500
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
  100 /var/lib/dpkg/status
   1.2.10ubuntu1 500
  500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

  unattended-upgrades:
Installed: 0.90ubuntu0.10
Candidate: 0.90ubuntu0.10
Version table:
   *** 0.90ubuntu0.10 500
  500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
  500 http://security.ubuntu.com/ubuntu xenial-security/main i386 
Packages
  100 /var/lib/dpkg/status
   0.90 500
  500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
  500 http://se.archive.ubuntu.com/ubuntu xenial/main i386 Packages

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: apt 1.2.29ubuntu0.1
  ProcVersionSignature: Ubuntu 4.4.0-142.168-generic 4.4.167
  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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1824088/+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


[Touch-packages] [Bug 1824088] Re: unattended upgrade ran one day after schedule

2019-04-10 Thread Carl Winbäck
** Attachment added: "Log data from apt"
   
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1824088/+attachment/5254618/+files/history.txt

-- 
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/1824088

Title:
  unattended upgrade ran one day after schedule

Status in apt package in Ubuntu:
  New

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/apt/history.log* and I saw that worked as intended up
  until this week. Upgrades ran as expected on 2019-03-11 and
  2019-03-25, which where both Mondays.

  The schedule was set with the line 'APT::Periodic::Unattended-Upgrade
  "14";' in the file /etc/apt/apt.conf.d/20auto-upgrades.

  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://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
   *** 1.2.29ubuntu0.1 500
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
  100 /var/lib/dpkg/status
   1.2.10ubuntu1 500
  500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

  unattended-upgrades:
Installed: 0.90ubuntu0.10
Candidate: 0.90ubuntu0.10
Version table:
   *** 0.90ubuntu0.10 500
  500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
  500 http://security.ubuntu.com/ubuntu xenial-security/main i386 
Packages
  100 /var/lib/dpkg/status
   0.90 500
  500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
  500 http://se.archive.ubuntu.com/ubuntu xenial/main i386 Packages

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: apt 1.2.29ubuntu0.1
  ProcVersionSignature: Ubuntu 4.4.0-142.168-generic 4.4.167
  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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1824088/+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


[Touch-packages] [Bug 1824088] [NEW] unattended upgrade ran one day after schedule

2019-04-10 Thread Carl Winbäck
Public bug reported:

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/apt/history.log* and I saw that worked as intended up until
this week. Upgrades ran as expected on 2019-03-11 and 2019-03-25, which
where both Mondays.

The schedule was set with the line 'APT::Periodic::Unattended-Upgrade
"14";' in the file /etc/apt/apt.conf.d/20auto-upgrades.

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://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
 *** 1.2.29ubuntu0.1 500
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
100 /var/lib/dpkg/status
 1.2.10ubuntu1 500
500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

unattended-upgrades:
  Installed: 0.90ubuntu0.10
  Candidate: 0.90ubuntu0.10
  Version table:
 *** 0.90ubuntu0.10 500
500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main i386 
Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
100 /var/lib/dpkg/status
 0.90 500
500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://se.archive.ubuntu.com/ubuntu xenial/main i386 Packages

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apt 1.2.29ubuntu0.1
ProcVersionSignature: Ubuntu 4.4.0-142.168-generic 4.4.167
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)

** Affects: apt (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: amd64 apport-bug xenial

** Attachment added: "Log data from apt"
   
https://bugs.launchpad.net/bugs/1824088/+attachment/5254614/+files/history.txt

** Attachment removed: "Log data from apt"
   
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1824088/+attachment/5254614/+files/history.txt

-- 
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/1824088

Title:
  unattended upgrade ran one day after schedule

Status in apt package in Ubuntu:
  New

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/apt/history.log* and I saw that worked as intended up
  until this week. Upgrades ran as expected on 2019-03-11 and
  2019-03-25, which where both Mondays.

  The schedule was set with the line 'APT::Periodic::Unattended-Upgrade
  "14";' in the file /etc/apt/apt.conf.d/20auto-upgrades.

  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://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
   *** 1.2.29ubuntu0.1 500
  500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
  100 /var/lib/dpkg/status
   1.2.10ubuntu1 500
  500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

  unattended-upgrades:
Installed: 0.90ubuntu0.10
Candidate: 0.90ubuntu0.10
Version table:
   *** 0.90ubuntu0.10 500
  500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  500