[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
Thu Aug 26 00:45:14 UTC 2021
LGTM, thanks!
| ubuntu at juju-87625f-hloeung-66:~$ cp /etc/cron.weekly/update-notifier-common ~/
| ubuntu at juju-87625f-hloeung-66:~$ sudo apt-get update
| ...
| Get:8 http://us.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages [104 kB]
| ...
| ubuntu at juju-87625f-hloeung-66:~$ sudo apt-get install update-notifier-common
| ubuntu at juju-87625f-hloeung-66:~$ diff -Naurp ~/update-notifier-common /etc/cron.weekly/update-notifier-common
| --- /home/ubuntu/update-notifier-common 2021-08-26 00:27:43.687383953 +0000
| +++ /etc/cron.weekly/update-notifier-common 2021-08-23 22:33:23.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-66:~$ sudo /etc/cron.weekly/update-notifier-common
| ubuntu at juju-87625f-hloeung-66:~$ ps afxuww | grep sleep
| root 22110 0.0 0.0 7932 740 pts/0 S 00:29 0:00 \_ sleep 767
| ubuntu at juju-87625f-hloeung-66:~$ ls -la /var/lib/ubuntu-release-upgrader/release-upgrade-available
| -rw-r--r-- 1 root root 80 Aug 26 00:27 /var/lib/ubuntu-release-upgrader/release-upgrade-available
| ubuntu at juju-87625f-hloeung-66:~$ New release '20.04.2 LTS' available.
| Run 'do-release-upgrade' to upgrade to it.
|
The additional output from the end is when it ran, LP:1940011 is to see
if we can silence that to reduce weekly cron spam.
** Tags removed: verification-needed verification-needed-bionic
** Tags added: verification-done verification-done-bionic
** Changed in: update-notifier (Ubuntu Bionic)
Importance: Undecided => High
--
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 Bionic:
Fix Committed
Status in update-notifier source package in Focal:
Fix Released
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