smartmontools.service: Referenced but unset environment variable evaluates to an empty string: smartd_opts

Bug #2107309 reported by Sundar Nagarajan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
smartmontools
New
Undecided
Unassigned
smartmontools (Ubuntu)
Triaged
Low
Unassigned
Jammy
Triaged
Low
Unassigned
Noble
Triaged
Low
Unassigned
Oracular
Triaged
Low
Unassigned
Plucky
Triaged
Low
Unassigned

Bug Description

Output of lsb_release -rd
No LSB modules are available.
Description: Ubuntu 24.04.2 LTS
Release: 24.04

apt-cache policy smartmontools
smartmontools:
  Installed: 7.4-2build1
  Candidate: 7.4-2build1
  Version table:
 *** 7.4-2build1 500
        500 https://us.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status

This warning (not error) appears in journalctl log:

smartmontools.service: Referenced but unset environment variable evaluates to an empty string: smartd_opts

Fix:
Add one line to /etc/default/smartmontools setting smartd_opts to an empty string

Existing file /etc/default/smartmontools:

# Defaults for smartmontools initscript (/etc/init.d/smartmontools)
# This is a POSIX shell fragment

# List of devices you want to explicitly enable S.M.A.R.T. for
# Not needed (and not recommended) if the device is monitored by smartd
#enable_smart="/dev/hda /dev/hdb"

# uncomment to pass additional options to smartd on startup
#smartd_opts="--interval=1800"

File with fix (additional line) added:
# Defaults for smartmontools initscript (/etc/init.d/smartmontools)
# This is a POSIX shell fragment

# List of devices you want to explicitly enable S.M.A.R.T. for
# Not needed (and not recommended) if the device is monitored by smartd
#enable_smart="/dev/hda /dev/hdb"

# uncomment to pass additional options to smartd on startup
#smartd_opts="--interval=1800"
smartd_opts=""

Tags: bitesize
Revision history for this message
Sundar Nagarajan (sundar-nagarajan) wrote :

This affects smartmontools and not cron

affects: cron (Ubuntu) → smartmontools (Ubuntu)
Revision history for this message
Christian Franke (christian-franke) wrote :

Upstream fix for upcoming release 7.5: https://www.smartmontools.org/changeset/5651

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for reporting this issue about the warning and a proposed fix, and thanks Christian for linking the upstream fix.

As plucky is past final freeze, this will need to wait to next cycle. And since the issue is a warning in a log, I doubt this will qualify for an SRU on its own (but could piggyback on another SRU for smartmontools if one appears). I'll add it to the server team's backlog but it is possible we'll just wait for when the next release of smartmontools is available to merge.

That said, if you'd like to try your hand at packaging the patch, we can provide advice on the process for getting it landed.

Changed in smartmontools (Ubuntu):
importance: Undecided → Low
status: New → Triaged
tags: added: bitesize
Changed in smartmontools (Ubuntu Jammy):
importance: Undecided → Low
Changed in smartmontools (Ubuntu Noble):
importance: Undecided → Low
Changed in smartmontools (Ubuntu Oracular):
importance: Undecided → Low
status: New → Triaged
Changed in smartmontools (Ubuntu Jammy):
status: New → Triaged
Changed in smartmontools (Ubuntu Noble):
status: New → Triaged
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.