Reduce cron spam from weekly update-notifier-common

Bug #1940011 reported by Haw Loeung
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
New
Undecided
Unassigned
Xenial
New
Undecided
Unassigned
Bionic
New
Undecided
Unassigned
Focal
New
Undecided
Unassigned
Jammy
New
Undecided
Unassigned
Kinetic
New
Undecided
Unassigned
update-notifier (Ubuntu)
New
Low
Unassigned
Xenial
New
Undecided
Unassigned
Bionic
New
Undecided
Unassigned
Focal
New
Undecided
Unassigned
Jammy
New
Low
Unassigned
Kinetic
New
Low
Unassigned

Bug Description

Hi,

We get these cron spam weekly:

| Received: by mysystem.mydomain.local (Postfix)
| id B19E32E806B; Sun, 15 Aug 2021 06:47:03 +0000 (UTC)
| Delivered-To: <email address hidden>
| Received: by mysystem.mydomain.local (Postfix, from userid 0)
| id 9DD002E8075; Sun, 15 Aug 2021 06:47:03 +0000 (UTC)
| From: Cron Daemon <email address hidden>
| To: <email address hidden>
| Subject: Cron <root@mysystem> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
| MIME-Version: 1.0
| Content-Type: text/plain; charset=UTF-8
| Content-Transfer-Encoding: 8bit
| X-Cron-Env: <SHELL=/bin/sh>
| X-Cron-Env: <PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin>
| X-Cron-Env: <HOME=/root>
| X-Cron-Env: <LOGNAME=root>
| Message-Id: <email address hidden>
| Date: Sun, 15 Aug 2021 06:47:03 +0000 (UTC)
|
| /etc/cron.weekly/update-notifier-common:
| New release '18.04.5 LTS' available.
| Run 'do-release-upgrade' to upgrade to it.

This is output from /etc/cron.weekly/update-notifier-common calling /usr/lib/ubuntu-release-upgrader/release-upgrade-motd

That's fine for when you have a system or two, but probably not when you manage many. Any chance the cron job can be updated so stdout is silenced? So:

| # Check to see whether there is a new version of Ubuntu available
| /usr/lib/ubuntu-release-upgrader/release-upgrade-motd > /dev/null

Thanks

Tags: fr-1814
tags: added: rls-ii-incoming
tags: removed: rls-ii-incoming
Revision history for this message
Brian Murray (brian-murray) wrote :

I think part of the point of having the cronjob is to mail the system administrator and let them know that a new release of Ubuntu is available. That being said I do feel like sending the email every week until the system upgraded is a bit much. I'd be happy to hear about any clever ideas for avoiding that.

Mathew Hodson (mhodson)
Changed in update-notifier (Ubuntu):
importance: Undecided → Low
Revision history for this message
Haw Loeung (hloeung) wrote : Re: [Bug 1940011] Re: Reduce cron spam from weekly update-notifier-common

On Thu, Sep 02, 2021 at 05:39:23PM -0000, Brian Murray wrote:
> I think part of the point of having the cronjob is to mail the system
> administrator and let them know that a new release of Ubuntu is
> available. That being said I do feel like sending the email every week
> until the system upgraded is a bit much. I'd be happy to hear about any
> clever ideas for avoiding that.

Maybe email once per new release of Ubuntu (including point
releases). Create a flag on disk when notifed for said release.

If we wanted to, create the flag on /run, so that a reboot resets it
all.

Unfortunately, this is made worse with the shift to replacing services
with juju deployments where environments contain multiple units each
trying to email about a new release.

Thanks!

tags: added: rls-ii-incoming
tags: added: rls-jj-incoming
removed: rls-ii-incoming
tags: added: fr-1814
Revision history for this message
Dave Jones (waveform) wrote :

One method that wouldn't require fs storage would be to only notify for a certain number of days post-release (as limited by something like ubuntu-distro-info --stable --days=release > -30) which would (on the currently weekly schedule) limit a release to sending 4-5 emails?

tags: removed: rls-jj-incoming
Haw Loeung (hloeung)
no longer affects: ubuntu-release-upgrader (Ubuntu Trusty)
no longer affects: update-notifier (Ubuntu Trusty)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers