systemd shutdown writes non-error message to stderr - causes email to be sent despite 'MailOnlyOnError'

Bug #1583537 reported by Graham Clinch
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
unattended-upgrades (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Calling unattended-upgrade from cron with an Unattended-Upgrade::Automatic-Reboot-Time of "+5". This causes unattended-upgrades to run:

'/sbin/shutdown -r +5'

Systemd's shutdown writes an acknowledgement message to stderr:

Shutdown scheduled for Wed 2016-05-18 04:37:49 BST, use 'shutdown -c' to cancel.

Which cron picks up and emails - but I don't really want to know.

Is there any scope for unattended-upgrades to gobble shutdown's stderr message?

Or, perhaps this should be logged against systemd, since the shutdown message isn't really an obvious candidate for stderr?

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: unattended-upgrades 0.90
ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Thu May 19 11:14:14 2016
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: unattended-upgrades
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Graham Clinch (g-clinch) wrote :
Revision history for this message
Timo (timo-1) wrote :

I also noticed this bug recently. I find it very annoying to get system emails now whenever unattended-upgrades is scheduling a reboot. It should either be fixed in systemd (why are they writing an info message to stderr?) - or if it can't be fixed there, at least unattended-upgrades should redirect the output of the shutdown command to avoid these messages.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unattended-upgrades (Ubuntu):
status: New → Confirmed
Changed in unattended-upgrades (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Balint Reczey (rbalint) wrote :

I agree that it should be fixed in u-u. Patches are welcome.

Changed in unattended-upgrades (Ubuntu):
importance: Medium → Wishlist
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.