LGTM, thanks!

| ubuntu@juju-87625f-hloeung-66:~$ cp /etc/cron.weekly/update-notifier-common ~/
| ubuntu@juju-87625f-hloeung-66:~$ sudo apt-get update
| ...
| Get:8 http://us.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages 
[104 kB]
| ...
| ubuntu@juju-87625f-hloeung-66:~$ sudo apt-get install update-notifier-common
| ubuntu@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@juju-87625f-hloeung-66:~$ sudo /etc/cron.weekly/update-notifier-common
| ubuntu@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@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@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
Bugs, which is subscribed to 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

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


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to