update-notifier-release upstart job logs excessively

Bug #1307747 reported by Brian Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Triaged
Medium
Unassigned
Trusty
Triaged
Medium
Unassigned

Bug Description

The update-notifier-release upstart job logs that a release upgrade is available when in fact is not.

echo "$DATE new release available"
if [ -s $FILE ]; then

An empty file is used to keep track of when a new release was last checked for so the echo, if it is kept, should be after the file is checked to see if it is zero size.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: update-notifier 0.154
ProcVersionSignature: Ubuntu 3.13.0-22.44-generic 3.13.8
Uname: Linux 3.13.0-22-generic x86_64
ApportVersion: 2.14-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Apr 14 16:28:48 2014
InstallationDate: Installed on 2014-03-06 (39 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140306)
SourcePackage: update-notifier
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Brian Murray (brian-murray) wrote :
Changed in update-notifier (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
milestone: none → trusty-updates
Revision history for this message
Brian Murray (brian-murray) wrote :

Here's some contents from a log file:

Thu Apr 3 15:52:42 PDT 2014 new release available
Fri Apr 4 09:47:44 PDT 2014 new release available
Fri Apr 4 09:47:55 PDT 2014 new release available
Fri Apr 4 10:24:37 PDT 2014 new release available

Revision history for this message
Brian Murray (brian-murray) wrote :

Actually, the frequency this is logging is really quite odd too.

Mon Apr 14 14:43:40 PDT 2014 new release available
Mon Apr 14 14:44:38 PDT 2014 new release available
Mon Apr 14 14:44:39 PDT 2014 new release available
Mon Apr 14 14:45:34 PDT 2014 new release available
Mon Apr 14 16:22:42 PDT 2014 new release available

I rebooted my system at about 14:43, and then ssh'ed into it from another system at 16:22. As noted earlier /var/lib/ubuntu-release-upgrader/release-upgrade-available is used to determine if a new release is available, that file is created by /usr/lib/ubuntu-release-upgrader/release-upgrade-motd which is called by /etc/update-motd.d/91-release-upgrade so it seems like something is wrong with release-upgrade-motd or how often it is called.

Revision history for this message
Michael Vogt (mvo) wrote :

Maybe I'm misreading this, but would:
"""
=== modified file 'debian/update-notifier-release.conf'
--- debian/update-notifier-release.conf 2013-06-03 22:40:21 +0000
+++ debian/update-notifier-release.conf 2014-04-15 06:32:33 +0000
@@ -8,9 +8,9 @@

 script
-DATE=$(date)
-echo "$DATE new release available"
 if [ -s $FILE ]; then
+ DATE=$(date)
+ echo "$DATE new release available"
     # use the --devel switch to check for a devel release
     /usr/lib/ubuntu-release-upgrader/check-new-release-gtk
 fi
"""

be enough? The /var/lib/ubuntu-release-upgrader/release-upgrade-available file serves as a "stamp" file that is used to record the last check time and as the actual information that is displayed to the user (if the file is non-empty). The debian/release-upgrade-motd runs daily to check for a new release so the file is touched daily but a new release is only there if the file is non-empty.

Revision history for this message
Brian Murray (brian-murray) wrote :

Yes, that would be enough to fix the messages appearing in the log file, but my last comment was more about why is the create event happening so often?

# release-upgrade-available is provided by /usr/lib/ubuntu-release-upgrader/release-upgrade-motd
start on (
    file FILE=/var/lib/ubuntu-release-upgrader/release-upgrade-available EVENT=create
)

I believe the intent of the release-upgrade-motd is to only check for a new release at most once per day, and based off the data in the log file (comment 3) it is being checked for more than that (or the file is being "created").

Revision history for this message
Michael Vogt (mvo) wrote :

Aha, thanks Brian. Yeah, this is indeed interessting.

Changed in update-notifier (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
milestone: none → trusty-updates
Changed in update-notifier (Ubuntu):
milestone: trusty-updates → none
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.