[Bug 1836475] Re: [SRU] update-notifier-common weekly cron job runs at the same time for all computers across the globe

Haw Loeung 1836475 at bugs.launchpad.net
Fri Aug 13 05:59:51 UTC 2021


Looks good to me:

| ubuntu at juju-87625f-hloeung-100:/etc/apt$ sudo apt-get install update-notifier-common
| Reading package lists... Done
| Building dependency tree
| Reading state information... Done
| The following packages were automatically installed and are no longer required:
|   dnsmasq-base kpartx libfl2 libidn11 libsgutils2-2 liburcu6 sg3-utils sg3-utils-udev
| Use 'sudo apt autoremove' to remove them.
| The following packages will be upgraded:
|   update-notifier-common
| 1 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
| Need to get 133 kB of archives.
| After this operation, 0 B of additional disk space will be used.
| Get:1 http://us.archive.ubuntu.com/ubuntu focal-proposed/main amd64 update-notifier-common all 3.192.30.9 [133 kB]
| Fetched 133 kB in 0s (3458 kB/s)
| (Reading database ... 130802 files and directories currently installed.)
| Preparing to unpack .../update-notifier-common_3.192.30.9_all.deb ...
| Unpacking update-notifier-common (3.192.30.9) over (3.192.30.8) ...
| Setting up update-notifier-common (3.192.30.9) ...
| Installing new version of config file /etc/cron.weekly/update-notifier-common ...

Comparing it with the old backup copy:

| ubuntu at juju-87625f-hloeung-100:/etc/apt$ diff -Naurp ~/update-notifier-common /etc/cron.weekly/update-notifier-common
| --- /home/ubuntu/update-notifier-common 2021-08-13 05:55:55.859177053 +0000
| +++ /etc/cron.weekly/update-notifier-common     2021-08-05 14:01:11.000000000 +0000
| @@ -4,5 +4,12 @@ set -e
|
|  [ -x /usr/lib/ubuntu-release-upgrader/release-upgrade-motd ] || exit 0
|
| -# Check to see whether there is a new version of Ubuntu available
| -/usr/lib/ubuntu-release-upgrader/release-upgrade-motd
| +sleep_then_check() {
| +    # Sleep for up to an hour to spread the load of checking for updates on
| +    # the Ubuntu infrastructure
| +    sleep $(shuf -i 1-3600 -n 1)
| +    # Check to see whether there is a new version of Ubuntu available
| +    /usr/lib/ubuntu-release-upgrader/release-upgrade-motd
| +}
| +
| +sleep_then_check &

| ubuntu at juju-87625f-hloeung-100:/etc/cron.weekly$ apt-cache policy update-notifier-commonupdate-notifier-common:
|   Installed: 3.192.30.9
|   Candidate: 3.192.30.9
|   Version table:
|  *** 3.192.30.9 500
|         500 http://us.archive.ubuntu.com/ubuntu focal-proposed/main amd64 Packages
|         100 /var/lib/dpkg/status
|      3.192.30.8 500
|         500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
|      3.192.30 500
|         500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages


** Tags removed: verification-needed verification-needed-focal
** Tags added: verification-done verification-done-focal

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/1836475

Title:
  [SRU] update-notifier-common weekly cron job runs at the same time for
  all computers across the globe

Status in update-notifier package in Ubuntu:
  Fix Released
Status in update-notifier source package in Focal:
  Fix Committed
Status in update-notifier source package in Groovy:
  Fix Released

Bug description:
  [Impact]

  * The fix spreads access to changelogs.ubuntu.com over a full week (it was decided this was preferable to the 24h originally requested)
  * This results in reduced load on Canonical's infrastructure, of benefit to all users

  [Test Case]

  On Focal desktop and server installations:

  * sudo add-apt-repository ppa:waveform/update-notifier
  * sudo apt update
  * sudo apt install update-notifier-common
  * Ensure that /etc/cron.daily/update-notifier-common and /etc/cron.weekly/update-notifier-common have been removed
  * Ensure systemctl status update-notifier-motd.timer shows a valid timer
  * Ensure systemctl status update-notifier-download.timer shows a valid timer

  [Regression Potential]

  Low; the patch is already in active use in Groovy.

  [Original Description]

  Hi,

  /etc/cron.weekly/update-notifier-common is run at the same time on all
  machines across the globe. It's putting unnecessary stress on
  Canonical's infrastructure (changelogs.ubuntu.com, specifically).
  Could we please have this job spread out over 24h ?

  And could we please SRU this change ?

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1836475/+subscriptions




More information about the foundations-bugs mailing list