smartmontools does not use current notifier

Bug #1646886 reported by KeithG
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
smartmontools (Ubuntu)
Won't Fix
High
Unassigned
Xenial
Won't Fix
Undecided
Unassigned

Bug Description

This package is broken. The smartmon tools use commands which are no longer in 16.04.

Example:

/etc/smartmontools/run.d/10powersave-notify

#! /bin/sh

# Send message if /usr/lib/powersave/powersave-notify exists or exit silently
[ -x /usr/lib/powersave/powersave-notify ] || exit 0

/usr/lib/powersave/powersave-notify "<b>Your hard disk drive is failing!</b>
S.M.A.R.T. message:
$SMARTD_MESSAGE"

/usr/lib/powersave does not exisat nor does powersave-notify exist anywhere in 16.04 even after powersave-notify is installed. I tried to edit the script to run /usr/bin/smart-notifier whichj does exist, but the script fails with

/usr/share/smart-notifier/smart_notifier/gui.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk

I think this is a bit scary. The user will get no warnings that his disk is failing due to this error.

Changed in smartmontools (Ubuntu):
status: New → Confirmed
Changed in smartmontools (Ubuntu):
importance: Undecided → High
Changed in smartmontools (Ubuntu):
importance: High → Wishlist
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
you are right that it is a bug, but if I understand the plumbing there correctly it is not that you get no notification at all.

It is just that "this notifier" is not working/existent and should be removed or adapted.
You for example still should get mails if mailing is set up to work through /usr/bin/mail

Revision history for this message
KeithG (grider-4) wrote :

It is also a regression, isn't it? It appears that mail is set up, but it is mailed to root and it is uncommon for a user to log in as root...

Revision history for this message
Robie Basak (racb) wrote :

Let's bump this in case it turns out to be a "regression-release" regression.

Changed in smartmontools (Ubuntu):
importance: Wishlist → High
Revision history for this message
KeithG (grider-4) wrote :

Also does not work in 16.10. Same error:

$ smart-notifier
/usr/share/smart-notifier/smart_notifier/gui.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk

Revision history for this message
Miriam España Acebal (mirespace) wrote :

Hi,

I hit this very old bug while doing some clearance.

Xenial reached EOSS (End of Standard Support) so I'm afraid it can't be fixed. It is unfortunate that we were unable to resolve this defect, however, there appears to be no further action possible at this time because it's not a security bug.

On the other hand, I tried to see the smartmontools' behaviour on the current release. After installing, it deploys by default one single script (10mail) in /etc/smartmontools/run.d/ (I suppose to avoid issues like this report is). New scripts are installed from other packages there as it happens with smart-notifier (that creates 60smart-notifier when is installed).

For the comment above regarding smart-notifier, I saw this output too and there is a couple of bug reports already filed for this [bug #1673591, bug #1598896] for that different package. So please, feel free to continue there if you or anyone affected consider it necessary.

Changed in smartmontools (Ubuntu Xenial):
status: New → Won't Fix
Revision history for this message
Robie Basak (racb) wrote :

It looks like the current behaviour is by design: you won't get any notification by default if you just install smartmontools unless you also install a working mail system where you will receive emails to root@ (eg. by following the Suggests metadata). smart-notifier is a separate package which you can opt-in to using by installing it directly. It is true that it won't be pulled in by default, but this seems to be a design decision in smartmontools. If you need smart-notifier's functionality, it's necessary to install it directly.

If there's a bug in smart-notifier then as Miriam says that's for separate bugs to represent. For _this_ bug then, I don't think there's any action to take so I'm marking it Won't Fix against the development release.

If you disagree, feel free to comment and reopen this bug and we can discuss further.

Changed in smartmontools (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
KeithG (grider-4) wrote :

You guys control this and can do what you think is best, but the reason I noted this as a 'bug' way back in 2016 is because I had a HD failure and only was made aware of it when i ran smartmontools from cli. I would think that an average user would install this package (smart-notifier) and expect that something wold notify them if there is a problem logged in smartmon. Previously notification was in the UI in the header and also as a message in the notification area. This was, IMO, a 'good idea' which is why I used to always install it. My thought is that if the only way this package 'notifies' is by emailing root, that it fails as a notifier and should be removed. Average users are told to not log in as root unless they are fixing something. Advanced warning of HD failure should be included as part of the base system, IMO, but if not and this package is installed, it should, at least, 'notify' the users of the system that there is a problem. It used to do this.

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.