Reduce cron spam from weekly update-notifier-common

Bug #1940011 reported by Haw Loeung
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Confirmed
Undecided
Unassigned
Xenial
Confirmed
Undecided
Unassigned
Bionic
Confirmed
Undecided
Unassigned
Focal
Confirmed
Undecided
Unassigned
Jammy
Confirmed
Undecided
Unassigned
Kinetic
Won't Fix
Undecided
Unassigned
update-notifier (Ubuntu)
Confirmed
Low
Unassigned
Xenial
Confirmed
Undecided
Unassigned
Bionic
Confirmed
Undecided
Unassigned
Focal
Confirmed
Undecided
Unassigned
Jammy
Confirmed
Low
Unassigned
Kinetic
Confirmed
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)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu Focal):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu Jammy):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu Kinetic):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu Xenial):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Changed in update-notifier (Ubuntu Bionic):
status: New → Confirmed
Changed in update-notifier (Ubuntu Focal):
status: New → Confirmed
Changed in update-notifier (Ubuntu Jammy):
status: New → Confirmed
Changed in update-notifier (Ubuntu Kinetic):
status: New → Confirmed
Changed in update-notifier (Ubuntu Xenial):
status: New → Confirmed
Changed in update-notifier (Ubuntu):
status: New → Confirmed
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Ubuntu 22.10 (Kinetic Kudu) has reached end of life, so this bug will not be fixed for that specific release.

Changed in ubuntu-release-upgrader (Ubuntu Kinetic):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.