Skip to content
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

Change zpool email notifications to display the actual pool name instead of the pool GUID #14272

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

WRMSRwasTaken
Copy link
Contributor

@WRMSRwasTaken WRMSRwasTaken commented Dec 8, 2022

Motivation and Context

The current mail for a device / pool state change is printing out the pool GUID instead of the pool name in the email being sent. As a system administrator, I'd like to get a direct idea what is going on, and because I have multiple pools in my system, I don't know which pool just had the said event. (who memorizes pool GUIDs?)
Email notifications for finishing a pool resilver already do this.

Description

Changing zed's statechange-notify.sh ZEVENT_POOL_GUID variable to ZEVENT_POOL.
If people like to have the pool GUID aswell, it could be added aswell alongside the pool name. Or make it even configurable, like zed's syslog output (ZED_SYSLOG_DISPLAY_GUIDS).

How Has This Been Tested?

I applied the patch on one of my machines known to have not 100% reliable disks (with data I have backup-ed elsewhere) and let it run:

The number of I/O errors associated with a ZFS device exceeded
acceptable levels. ZFS has marked the device as faulted.

 impact: Fault tolerance of the pool may be compromised.
    eid: 3624
  class: statechange
  state: FAULTED
   host: <redacted>
   time: 2022-12-08 22:27:18+0100
  vpath: /dev/disk/by-partuuid/e32fbbe6-38e7-c94e-a655-6e3c480fb25a
  vguid: 0xF7D486597705238B
   pool: hdd2

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:

@behlendorf behlendorf added Component: ZED ZFS Event Daemon Status: Code Review Needed Ready for review and testing labels Dec 9, 2022
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.

Makes sense to me. Even though the pool name may not be unique, it is the kind of thing you'd want to see in a human friendly notification.

@allanjude
Copy link
Contributor

Might we want to keep the GUID in the email as well though?

@ryao
Copy link
Contributor

ryao commented Dec 12, 2022

Might we want to keep the GUID in the email as well though?

I am inclined to think that we should include the GUID too just in case.

Outgoing mails for ZFS pool events include the pool GUID,
but not the actual pool name. Let's change this for better
readability, as it is already done in the mails for finished
pool resilvers.

Signed-off-by: Marcel Menzel <mail@mcl.gg>
@behlendorf behlendorf merged commit 70ac265 into openzfs:master Dec 14, 2022
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Dec 14, 2022
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Dec 17, 2022
Outgoing mails for ZFS pool events include the pool GUID,
but not the actual pool name. Let's change this for better
readability, as it is already done in the mails for finished
pool resilvers.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Marcel Menzel <mail@mcl.gg>
Closes openzfs#14272
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jan 13, 2023
Outgoing mails for ZFS pool events include the pool GUID,
but not the actual pool name. Let's change this for better
readability, as it is already done in the mails for finished
pool resilvers.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Marcel Menzel <mail@mcl.gg>
Closes openzfs#14272
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jan 18, 2023
Outgoing mails for ZFS pool events include the pool GUID,
but not the actual pool name. Let's change this for better
readability, as it is already done in the mails for finished
pool resilvers.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Marcel Menzel <mail@mcl.gg>
Closes openzfs#14272
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jan 19, 2023
Outgoing mails for ZFS pool events include the pool GUID,
but not the actual pool name. Let's change this for better
readability, as it is already done in the mails for finished
pool resilvers.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Marcel Menzel <mail@mcl.gg>
Closes openzfs#14272
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ZED ZFS Event Daemon Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants