Bug 183335 - [devd] devd no longer matches ZFS events
Summary: [devd] devd no longer matches ZFS events
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 1.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-26 15:20 UTC by Mark Felder
Modified: 2018-05-21 07:07 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Felder freebsd_committer 2013-10-26 15:20:01 UTC
according to -stable mailing list entry, devd doesn't come with working ZFS event matching anymore. It would be nice if the proper syntax came with the 10 RELEASE and perhaps was backported to 9.x if necessary.

http://freebsd.1045724.n5.nabble.com/ZFS-devd-messages-td5851231.html

In case thread is not available on nabble:

#######################################

Hi, 
It seems that the ZFS messages no longer match entries in devd.conf, eg.. 
notify 10 { 
        match "system"          "ZFS"; 
        match "type"            "vdev"; 
        action "logger -p kern.err 'ZFS: vdev failure, zpool=$pool type=$type'"; 
}; 

Doesn't match anything because messages now look like.. 
Processing event '!system=ZFS subsystem=ZFS type=resource.fs.zfs.removed  version=0 class=resource.fs.zfs.removed pool_guid=469710819 vdev_guid=215223839' 

Does anyone have an updated set of rules handy? 

#######################################

On 12/10/2013, at 11:21, Daniel O'Connor <[hidden email]> wrote: 
> Doesn't match anything because messages now look like.. 
> Processing event '!system=ZFS subsystem=ZFS type=resource.fs.zfs.removed  version=0 class=resource.fs.zfs.removed pool_guid=469710819 vdev_guid=215223839' 
> 
> Does anyone have an updated set of rules handy? 


For now I nuked the entries out of /etc/devd.conf and made some in /etc/devd/zfs.conf (where they should have been to start with IMO..) like so.. 
notify 10 { 
        match "system"          "ZFS"; 
        action "logger -p kern.err 'ZFS notice: type=$type version=$version class=$class pool_guid=$pool_guid vdev_guid=$vdev_guid'"; 
        action "echo 'ZFS notice: type=$type version=$version class=$class pool_guid=$pool_guid vdev_guid=$vdev_guid' | mail -s 'ZFS Event' zfs"; 
}; 

And added an alias for zfs@. 

It would be nice if this was the default, yes it is a bit noisy and not very user friendly but at least you get notice something weird is happening out of the box.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:53:35 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"
Comment 2 Andriy Gapon freebsd_committer 2018-05-21 07:07:01 UTC
This should be fixed by now.