Skip to content

zed: fix typo in variable ZED_POWER_OFF_ENCLO*US*RE_SLOT_ON_FAULT #15651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

mfoliveira
Copy link
Contributor

@mfoliveira mfoliveira commented Dec 7, 2023

Motivation and Context

There's a typo in the name of the variable to enable a zedlet.

Fixes 11fbcac
("zed: Add zedlet to power off slot when drive is faulted")

Description

Replace ENCLO_US_RE with ENCLO_SU_RE in the name of the variable.

Mechanical change:

$ sed -i 's/ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT/ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT/g' cmd/zed/zed.d/zed.rc cmd/zed/zed.d/statechange-slot_off.sh

Note this changes the user-visible string in zed.rc, thus might break current users with the wrong string, but it's ~2 months since zfs-2.2.0 tag is out, thus should not be widespread yet.

How Has This Been Tested?

Before:

   $ grep -r ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    cmd/zed/zed.d/zed.rc:#ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT=1
    cmd/zed/zed.d/statechange-slot_off.sh:# ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT is set in zed.rc, and the disk gets
    cmd/zed/zed.d/statechange-slot_off.sh:#   2: ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT disabled
    cmd/zed/zed.d/statechange-slot_off.sh:if [ "${ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT}" != "1" ] ; then

After:

    $ grep -r ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    $

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Replace ENCLO_US_RE with ENCLO_SU_RE in the name of the variable.

Note this changes the user-visible string in zed.rc, thus might
break current users with the wrong string, but it's ~2 months
since zfs-2.2.0 tag is out, thus should not be widespread yet.

Mechanical change:

    $ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    cmd/zed/zed.d/zed.rc
    cmd/zed/zed.d/statechange-slot_off.sh

    $ sed -i 's/ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT/<linebreak>
                ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT/g' \
      cmd/zed/zed.d/zed.rc \
      cmd/zed/zed.d/statechange-slot_off.sh

    $ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    $

Fixes 11fbcac
("zed: Add zedlet to power off slot when drive is faulted")

Signed-off-by: Mauricio Faria de Oliveira <[email protected]>
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@behlendorf behlendorf requested a review from tonyhutter December 7, 2023 15:22
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Dec 7, 2023
Copy link
Contributor

@tonyhutter tonyhutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@mfoliveira
Copy link
Contributor Author

mfoliveira commented Dec 7, 2023

Thanks for the quick review, Brian and Tony!

Just a note on the failing checks: the errors are unrelated to this change (which is reasonable, since the modified config option is commented out by default, anyway).

  • zfs-linux / Testing (20.04) / zloop (pull_request)
12/07 16:14:17 /sbin/ztest -G -VVVVV -X -t 16 -K raidz -m 0 -r 10 -D 0 -S 0 -R 3 -v 1 -a 12 -C special=random -s 512m -f /var/tmp/zloop-run -T 120 -P 60
  • zfs-linux / Testing (22.04) / functional (part3) (pull_request)
Tests with results other than PASS that are unexpected:
    FAIL pool_checkpoint/checkpoint_big_rewind (expected PASS)
  • zfs-linux / Testing (22.04) / functional (part4) (pull_request)
 Tests with results other than PASS that are unexpected:
    FAIL raidz/raidz_expand_001_pos (expected PASS)
    FAIL raidz/raidz_expand_005_pos (expected PASS)

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Dec 7, 2023
@behlendorf behlendorf merged commit 3c76504 into openzfs:master Dec 9, 2023
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Dec 12, 2023
Replace ENCLO_US_RE with ENCLO_SU_RE in the name of the variable.

Note this changes the user-visible string in zed.rc, thus might
break current users with the wrong string, but it's ~2 months
since zfs-2.2.0 tag is out, thus should not be widespread yet.

Mechanical change:

    $ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    cmd/zed/zed.d/zed.rc
    cmd/zed/zed.d/statechange-slot_off.sh

    $ sed -i 's/ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT/<linebreak>
                ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT/g' \
      cmd/zed/zed.d/zed.rc \
      cmd/zed/zed.d/statechange-slot_off.sh

    $ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    $

Fixes 11fbcac
("zed: Add zedlet to power off slot when drive is faulted")

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Mauricio Faria de Oliveira <[email protected]>
Closes openzfs#15651
behlendorf pushed a commit that referenced this pull request Feb 13, 2024
Replace ENCLO_US_RE with ENCLO_SU_RE in the name of the variable.

Note this changes the user-visible string in zed.rc, thus might
break current users with the wrong string, but it's ~2 months
since zfs-2.2.0 tag is out, thus should not be widespread yet.

Mechanical change:

    $ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    cmd/zed/zed.d/zed.rc
    cmd/zed/zed.d/statechange-slot_off.sh

    $ sed -i 's/ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT/<linebreak>
                ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT/g' \
      cmd/zed/zed.d/zed.rc \
      cmd/zed/zed.d/statechange-slot_off.sh

    $ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    $

Fixes 11fbcac
("zed: Add zedlet to power off slot when drive is faulted")

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Mauricio Faria de Oliveira <[email protected]>
Closes #15651
tonyhutter pushed a commit that referenced this pull request Feb 22, 2024
Replace ENCLO_US_RE with ENCLO_SU_RE in the name of the variable.

Note this changes the user-visible string in zed.rc, thus might
break current users with the wrong string, but it's ~2 months
since zfs-2.2.0 tag is out, thus should not be widespread yet.

Mechanical change:

    $ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    cmd/zed/zed.d/zed.rc
    cmd/zed/zed.d/statechange-slot_off.sh

    $ sed -i 's/ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT/<linebreak>
                ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT/g' \
      cmd/zed/zed.d/zed.rc \
      cmd/zed/zed.d/statechange-slot_off.sh

    $ grep -rl ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT
    $

Fixes 11fbcac
("zed: Add zedlet to power off slot when drive is faulted")

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Mauricio Faria de Oliveira <[email protected]>
Closes #15651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants