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

ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event" breaks history_event-zfs-list-cacher.sh #11164

Closed
dmtrbm opened this issue Nov 6, 2020 · 0 comments · Fixed by #11347
Closed

ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event" breaks history_event-zfs-list-cacher.sh #11164

dmtrbm opened this issue Nov 6, 2020 · 0 comments · Fixed by #11347
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@dmtrbm
Copy link

dmtrbm commented Nov 6, 2020

System information

Type Version/Name
Distribution Name Arch
Distribution Version rolling
Linux Kernel 5.9.4-arch1-1
Architecture x86_64
ZFS Version 2.0.0-rc5

Describe the problem you're observing

With this option set by default in /etc/zfs/zed.d/zed.rc, /etc/zfs/zfs-list.cache/* is no longer updated.

Describe how to reproduce the problem

zfs create rpool/test, /etc/zfs/zfs-list.cache/rpool is unchanged.

Include any warning/errors/backtraces from the system logs

Output of history_event-zfs-list-cacher.sh:

+ FSLIST_DIR=/etc/zfs/zfs-list.cache
+ FSLIST_TMP=/usr/var/run/zfs-list.cache.new
+ FSLIST=/etc/zfs/zfs-list.cache/rpool
+ '[' -w /etc/zfs/zfs-list.cache/rpool ']'
+ '[' -f /etc/zfs/zed.d/zed.rc ']'
+ . /etc/zfs/zed.d/zed.rc
++ ZED_USE_ENCLOSURE_LEDS=1
++ ZED_SYSLOG_SUBCLASS_EXCLUDE=history_event
+ . /etc/zfs/zed.d/zed-functions.sh
++ : /var/lock
++ : 3600
++ : 0
++ : /var/run
++ : daemon.notice
++ : zed
++ ZED_FLOCK_FD=8
+ zed_exit_if_ignoring_this_event
+ '[' -n '' ']'
+ '[' -n history_event ']'
+ eval 'case history_event in
history_event) exit 0;;
*);;
esac'
++ case history_event in
++ exit 0
+ exec

Commenting it out fixes cache updates:

+ FSLIST_DIR=/etc/zfs/zfs-list.cache
+ FSLIST_TMP=/usr/var/run/zfs-list.cache.new
+ FSLIST=/etc/zfs/zfs-list.cache/rpool
+ '[' -w /etc/zfs/zfs-list.cache/rpool ']'
+ '[' -f /etc/zfs/zed.d/zed.rc ']'
+ . /etc/zfs/zed.d/zed.rc
++ ZED_USE_ENCLOSURE_LEDS=1
+ . /etc/zfs/zed.d/zed-functions.sh
++ : /var/lock
++ : 3600
++ : 0
++ : /var/run
++ : daemon.notice
++ : zed
++ ZED_FLOCK_FD=8
+ zed_exit_if_ignoring_this_event
+ '[' -n '' ']'
+ '[' -n '' ']'
+ zed_check_cmd /usr/bin/zfs sort diff grep
+ local cmd
+ local rv=0
+ for cmd in "$@"
+ command -v /usr/bin/zfs
+ for cmd in "$@"
+ command -v sort
+ for cmd in "$@"
+ command -v diff
+ for cmd in "$@"
+ command -v grep
+ return 0
+ printf %s rpool/test
+ grep @
+ case "${ZEVENT_HISTORY_INTERNAL_NAME}" in
+ zed_lock zfs-list
+ local lockfile=zfs-list
+ local fd=8
+ local umask_bak
+ local err
+ '[' -n zfs-list ']'
+ expr zfs-list : '.*/'
+ lockfile=/var/lock/zfs-list
++ umask
+ umask_bak=0022
+ umask 077
+ eval 'exec 8> '\''/var/lock/zfs-list'\'''
++ exec
++ flock --exclusive 8
+ err=
+ '[' 0 -ne 0 ']'
+ umask 0022
+ trap abort_alter EXIT
+ PROPS=name,mountpoint,canmount,atime,relatime,devices,exec,readonly,setuid,nbmand,encroot,keylocation,org.openzfs.systemd:requires,org.openzfs.systemd:requires-mounts-for,org.openzfs.systemd:before,org.openzfs.systemd:after,org.openzfs.systemd:wanted-by,org.openzfs.systemd:required-by,org.openzfs.systemd:nofail,org.openzfs.systemd:ignore
+ /usr/bin/zfs list -H -t filesystem -o name,mountpoint,canmount,atime,relatime,devices,exec,readonly,setuid,nbmand,encroot,keylocation,org.openzfs.systemd:requires,org.openzfs.systemd:requires-mounts-for,org.openzfs.systemd:before,org.openzfs.systemd:after,org.openzfs.systemd:wanted-by,org.openzfs.systemd:required-by,org.openzfs.systemd:nofail,org.openzfs.systemd:ignore -r rpool
+ sort /usr/var/run/zfs-list.cache.new -o /usr/var/run/zfs-list.cache.new
+ diff -q /usr/var/run/zfs-list.cache.new /etc/zfs/zfs-list.cache/rpool
Files /usr/var/run/zfs-list.cache.new and /etc/zfs/zfs-list.cache/rpool differ
+ mv /usr/var/run/zfs-list.cache.new /etc/zfs/zfs-list.cache/rpool
+ rm -f /usr/var/run/zfs-list.cache.new
+ finished
+ zed_unlock zfs-list
+ local lockfile=zfs-list
+ local fd=8
+ local err
+ '[' -n zfs-list ']'
+ expr zfs-list : '.*/'
+ lockfile=/var/lock/zfs-list
++ flock --unlock 8
+ err=
+ '[' 0 -ne 0 ']'
+ eval 'exec 8>&-'
++ exec
+ trap - EXIT
+ exit 0
@dmtrbm dmtrbm added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Nov 6, 2020
InsanePrawn added a commit to InsanePrawn/zfs that referenced this issue Dec 15, 2020
13d6598 excluded history_events
from logging by default. This breaks the zfs-list-cacher mechanism
as it listens for those events in order to trigger cache updates.

Closes openzfs#11164

Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
InsanePrawn added a commit to InsanePrawn/zfs that referenced this issue Dec 15, 2020
13d6598 excluded history_events
from logging by default. This breaks the zfs-list-cacher mechanism
as it listens for those events in order to trigger cache updates.

Remove history_event from ZED_SYSLOG_SUBCLASS_EXCLUDE in zed.rc

Closes openzfs#11164

Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
InsanePrawn added a commit to InsanePrawn/zfs that referenced this issue Dec 16, 2020
The zfs-list-cacher.sh script currently respects the event types
excluded from syslog(!) in ZED_SYSLOG_SUBCLASS_EXCLUDE.
This makes little sense on this single-purpose script and
silently breaks when history_event are excluded from syslog,
which is the default since 7d52b4e.

Closes openzfs#11164

Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
InsanePrawn added a commit to InsanePrawn/zfs that referenced this issue Dec 17, 2020
Check for the history_event type instead.

The zfs-list-cacher.sh script currently respects the event types
excluded from syslog(!) in ZED_SYSLOG_SUBCLASS_EXCLUDE.
This makes little sense on this single-purpose script and
silently breaks when history_events are excluded from syslog,
which is the default since 7d52b4e.

Closes openzfs#11164

Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
InsanePrawn added a commit to InsanePrawn/zfs that referenced this issue Dec 17, 2020
Check for the history_event type instead.

The zfs-list-cacher.sh script currently respects the event types
excluded from syslog(!) in ZED_SYSLOG_SUBCLASS_EXCLUDE.
This makes little sense in this single-purpose script and
silently breaks when history_events are excluded from syslog,
which is the default since 13d6598.

Closes openzfs#11164

Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
behlendorf pushed a commit that referenced this issue Dec 18, 2020
Check for the history_event type instead.

The zfs-list-cacher.sh script currently respects the event types
excluded from syslog(!) in ZED_SYSLOG_SUBCLASS_EXCLUDE.
This makes little sense in this single-purpose script and
silently breaks when history_events are excluded from syslog,
which is the default since 13d6598.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
Closes #11164
Closes #11347
InsanePrawn added a commit to InsanePrawn/zfs that referenced this issue Dec 18, 2020
Check for the history_event type instead.

The zfs-list-cacher.sh script currently respects the event types
excluded from syslog(!) in ZED_SYSLOG_SUBCLASS_EXCLUDE.
This makes little sense in this single-purpose script and
silently breaks when history_events are excluded from syslog,
which is the default since 13d6598.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
Closes openzfs#11164
Closes openzfs#11347
behlendorf pushed a commit that referenced this issue Dec 20, 2020
Check for the history_event type instead.

The zfs-list-cacher.sh script currently respects the event types
excluded from syslog(!) in ZED_SYSLOG_SUBCLASS_EXCLUDE.
This makes little sense in this single-purpose script and
silently breaks when history_events are excluded from syslog,
which is the default since 13d6598.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
Closes #11164
Closes #11347
jsai20 pushed a commit to jsai20/zfs that referenced this issue Mar 30, 2021
Check for the history_event type instead.

The zfs-list-cacher.sh script currently respects the event types
excluded from syslog(!) in ZED_SYSLOG_SUBCLASS_EXCLUDE.
This makes little sense in this single-purpose script and
silently breaks when history_events are excluded from syslog,
which is the default since 13d6598.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
Closes openzfs#11164
Closes openzfs#11347
sempervictus pushed a commit to sempervictus/zfs that referenced this issue May 31, 2021
Check for the history_event type instead.

The zfs-list-cacher.sh script currently respects the event types
excluded from syslog(!) in ZED_SYSLOG_SUBCLASS_EXCLUDE.
This makes little sense in this single-purpose script and
silently breaks when history_events are excluded from syslog,
which is the default since 13d6598.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
Closes openzfs#11164
Closes openzfs#11347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant