zed.rc: typo in option ZED_POWER_OFF_ENCLO*US*RE_SLOT_ON_FAULT

Bug #2046082 reported by Mauricio Faria de Oliveira
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Fix Released
Medium
Mauricio Faria de Oliveira
Mantic
Fix Released
Medium
Mauricio Faria de Oliveira
Noble
Fix Released
Medium
Mauricio Faria de Oliveira

Bug Description

[Impact]

 * There's a typo in user-visible option (/etc/zfs/zed.d/zed.rc)
   ZED_POWER_OFF_ENCLO*US*RE_SLOT_ON_FAULT introduced upstream
   in 2.2.0-rc4 and SRU-ed to Mantic with 2.2.0-0ubuntu1~23.10.

 * This could be fixed in Ubuntu before users start adopting it.

[Test Plan]

 * Check whether /etc/zfs/zed.d/zed.rc ships the correct option.

 * Actual:
   $ grep ZED_POWER_OFF_ENCLO /etc/zfs/zed.d/zed.rc
   #ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT=1

 * Expected:
   $ grep ZED_POWER_OFF_ENCLO /etc/zfs/zed.d/zed.rc
   #ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1

[Regression Potential]

 * Users of Mantic who upgraded to zfs-linux 2.2.0-0ubuntu1~23.10
   (published to mantic-updates on 2023-12-08) _and_ enabled the
   option (with typo) would have such functionality disabled.

[Other Info]

 * This option (with typo) was introduced in commit d19304ffeec5
   ("zed: Add zedlet to power off slot when drive is faulted"),
   and is present in:
   - ZFS 2.2: zfs-2.2.0-rc4 (mantic-updates)
   - ZFS 2.1: zfs-2.1.13

 * It affects Ubuntu Noble and Mantic, but not Lunar or older.

 * Fixed upstream with commit 3c7650491b9a ("zed: fix typo in
   variable ZED_POWER_OFF_ENCLO*US*RE_SLOT_ON_FAULT")

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Upstream:

$ git log --oneline origin/zfs-2.2-release -- cmd/zed/zed.d/zed.rc | grep 'zed: Add zedlet to power off slot when drive is faulted'
d19304ffeec5 zed: Add zedlet to power off slot when drive is faulted
$ git describe --contains d19304ffeec5
zfs-2.2.0-rc4~14

$ git log --oneline origin/zfs-2.1-release -- cmd/zed/zed.d/zed.rc | grep 'zed: Add zedlet to power off slot when drive is faulted'
a4f82db53d6d zed: Add zedlet to power off slot when drive is faulted
$ git describe --contains a4f82db53d6d
zfs-2.1.13~6

$ git log --oneline origin/zfs-2.0-release -- cmd/zed/zed.d/zed.rc | grep 'zed: Add zedlet to power off slot when drive is faulted'
$

Changed in zfs-linux (Ubuntu):
status: New → Confirmed
Changed in zfs-linux (Ubuntu Mantic):
importance: Undecided → Medium
Changed in zfs-linux (Ubuntu Noble):
importance: Undecided → Medium
Changed in zfs-linux (Ubuntu Mantic):
status: New → Confirmed
assignee: nobody → Mauricio Faria de Oliveira (mfo)
Changed in zfs-linux (Ubuntu Noble):
assignee: nobody → Mauricio Faria de Oliveira (mfo)
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Ubuntu:

$ rmadison -a source zfs-linux
...
 zfs-linux | 0.8.3-1ubuntu12 | focal | source
 zfs-linux | 0.8.3-1ubuntu12.16 | focal-security | source
 zfs-linux | 0.8.3-1ubuntu12.16 | focal-updates | source
 zfs-linux | 2.1.2-1ubuntu3 | jammy | source
 zfs-linux | 2.1.5-1ubuntu6~22.04.2 | jammy-security | source
 zfs-linux | 2.1.5-1ubuntu6~22.04.2 | jammy-updates | source
 zfs-linux | 2.1.9-2ubuntu1 | lunar | source
 zfs-linux | 2.1.9-2ubuntu1.2 | lunar-security | source
 zfs-linux | 2.1.9-2ubuntu1.2 | lunar-updates | source
 zfs-linux | 2.2.0~rc3-0ubuntu4 | mantic | source
 zfs-linux | 2.2.0-0ubuntu1~23.10 | mantic-proposed | source
 zfs-linux | 2.2.0-0ubuntu1~23.10 | mantic-updates | source
 zfs-linux | 2.2.2-0ubuntu1 | noble | source

$ git show pkg/ubuntu/focal-devel:./cmd/zed/zed.d/zed.rc | grep ZED_POWER_OFF_ENCLO
$ git show pkg/ubuntu/jammy-devel:./cmd/zed/zed.d/zed.rc | grep ZED_POWER_OFF_ENCLO
$ git show pkg/ubuntu/lunar-devel:./cmd/zed/zed.d/zed.rc | grep ZED_POWER_OFF_ENCLO

$ git show pkg/ubuntu/mantic-devel:./cmd/zed/zed.d/zed.rc | grep ZED_POWER_OFF_ENCLO
#ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT=1

$ git show pkg/ubuntu/noble-devel:./cmd/zed/zed.d/zed.rc | grep ZED_POWER_OFF_ENCLO
#ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT=1

description: updated
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

noble:

 $ dpkg -s zfs-zed | grep Version:
 Version: 2.2.2-0ubuntu1

 $ grep ZED_POWER_OFF_ENCLO /etc/zfs/zed.d/zed.rc
 #ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT=1

test package:

 $ dpkg-deb -x zfs-zed_2.2.2-0ubuntu2_amd64.deb deb

 $ grep ZED_POWER_OFF_ENCLO deb/etc/zfs/zed.d/zed.rc
 #ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Subscribing ~ubuntu-sponsors for review/sponsoring to Noble.
(I can handle the upload to mantic later.)

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks Mauricio, I've uploaded your change to noble now

Changed in zfs-linux (Ubuntu Noble):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 2.2.2-0ubuntu2

---------------
zfs-linux (2.2.2-0ubuntu2) noble; urgency=medium

  * d/p/u/zed-fix-typo-ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT.patch:
    fix typo in configuration option in zed.rc (LP: #2046082)

 -- Mauricio Faria de Oliveira <email address hidden> Sat, 09 Dec 2023 16:10:21 -0300

Changed in zfs-linux (Ubuntu Noble):
status: Fix Committed → Fix Released
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote (last edit ):

I will stage this to mantic with an upload + block-proposed-mantic tag.

The mantic unapproved queue already has zfs-linux 2.2.2-0ubuntu1~23.10,
but it seems it is not going to be accepted per bug 2044657 comment 46.

If that bug gets cherry-pick fixes as requested, that should be simple
to combine with the staged upload. Or if the full upstream backport to
2.2.2 (from 2.2.0) is accepted there, I am happy to re-upload with it.

Attaching the debdiff for reference.

tags: added: block-proposed-mantic
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Testing for Mantic:

mantic-updates:

 $ rmadison -a source zfs-linux -s mantic-updates
  zfs-linux | 2.2.0-0ubuntu1~23.10 | mantic-updates | source

 $ dpkg -s zfs-zed | grep Version:
 Version: 2.2.0-0ubuntu1~23.10

 $ grep ZED_POWER_OFF_ENCLO /etc/zfs/zed.d/zed.rc
 #ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT=1

 $ dpkg -L zfs-zed | xargs grep ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT 2>/dev/null | sort
 /etc/zfs/zed.d/zed.rc:#ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT=1
 /usr/lib/zfs-linux/zed.d/statechange-slot_off.sh:# 2: ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT disabled
 /usr/lib/zfs-linux/zed.d/statechange-slot_off.sh:# ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT is set in zed.rc, and the disk gets
 /usr/lib/zfs-linux/zed.d/statechange-slot_off.sh:if [ "${ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT}" != "1" ] ; then

test package:

 $ dpkg-deb -x zfs-zed_2.2.0-0ubuntu1~23.10.1_amd64.deb deb

 $ grep ZED_POWER_OFF_ENCLO deb/etc/zfs/zed.d/zed.rc
 #ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1

- wrong name (no matches anymore):

 $ find deb | xargs grep ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT 2>/dev/null
 $

- right name (all matches fixed):

 $ find deb | xargs grep ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT 2>/dev/null | sort
 deb/etc/zfs/zed.d/zed.rc:#ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1
 deb/usr/lib/zfs-linux/zed.d/statechange-slot_off.sh:# 2: ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT disabled
 deb/usr/lib/zfs-linux/zed.d/statechange-slot_off.sh:# ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT is set in zed.rc, and the disk gets
 deb/usr/lib/zfs-linux/zed.d/statechange-slot_off.sh:if [ "${ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT}" != "1" ] ; then

Revision history for this message
Steve Langasek (vorlon) wrote :

Normally, changing a conffile in an SRU is iffy because this may result in conffile prompts for the user on upgrade, and will cause unattended-upgrades to hold the package back.

In this case we're fixing a regression in a conffile that was introduced already in -updates. So, ok.

Changed in zfs-linux (Ubuntu Mantic):
status: Confirmed → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Mauricio, or anyone else affected,

Accepted zfs-linux into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zfs-linux/2.2.0-0ubuntu1~23.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Verification done for mantic-proposed.
All matches of the string are correct.

$ lxc launch ubuntu:mantic mantic-zed
$ lxc shell mantic-zed

# add-apt-repository -y -p proposed
# apt install -t mantic-proposed -y zfs-zed

# dpkg -s zfs-zed | grep Version:
Version: 2.2.0-0ubuntu1~23.10.1

# grep ZED_POWER_OFF_ENCLO /etc/zfs/zed.d/zed.rc
#ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1

# dpkg -L zfs-zed | xargs grep ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT 2>/dev/null | sort
/etc/zfs/zed.d/zed.rc:#ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1
/usr/lib/zfs-linux/zed.d/statechange-slot_off.sh:# 2: ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT disabled
/usr/lib/zfs-linux/zed.d/statechange-slot_off.sh:# ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT is set in zed.rc, and the disk gets
/usr/lib/zfs-linux/zed.d/statechange-slot_off.sh:if [ "${ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT}" != "1" ] ; then

# dpkg -L zfs-zed | xargs grep ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT 2>/dev/null | sort
#

tags: added: verification-done-mantic
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

removing block, as that condition no longer applied due to reject.

tags: removed: block-proposed-mantic
tags: added: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 2.2.0-0ubuntu1~23.10.1

---------------
zfs-linux (2.2.0-0ubuntu1~23.10.1) mantic; urgency=medium

  * d/p/u/zed-fix-typo-ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT.patch:
    fix typo in configuration option in zed.rc (LP: #2046082)

 -- Mauricio Faria de Oliveira <email address hidden> Sat, 09 Dec 2023 16:10:21 -0300

Changed in zfs-linux (Ubuntu Mantic):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Update Released

The verification of the Stable Release Update for zfs-linux has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.