Closed geelenbert closed 3 years ago
even now its stillt the case i think its comes down to the parsing in ZpoolStatus.php But i can not find the code that is generating the notification for the other cases in order to pinpoint the error (new to omv development).
The notifications are sent by zfs zed
http://manpages.ubuntu.com/manpages/xenial/man8/zed.8.html
The only thing the plugin checkbox that is configuring zed to use the system root mail. If i am not mistaken is not enabling zed service, maybe it comes disabled by default and we should enabled it with the notification service. Now zed notifies according to scripts in the zed folder which are provided by the zed package. You have to check if the default scripts include a something like that, by i am sure it has as i've degraded pools in my proxmox server (debian 9) and it works.
so this issue can be closed i guess since its not intended to send notifications in case a manual command is issued unless you force the degraded state with the zpool offline -f
option. (see https://github.com/openzfs/zfs/issues/7516)
If the author wants also in this case a notification the notification scrip has to be changed
--- /etc/zfs/zed.d/statechange-notify.sh 2020-04-27 10:47:56.129574210 +0200
+++ ./statechange-notify.sh 2020-04-27 10:47:48.933386922 +0200
@@ -34,6 +34,7 @@
if [ "${ZEVENT_VDEV_STATE_STR}" != "FAULTED" ] \
&& [ "${ZEVENT_VDEV_STATE_STR}" != "DEGRADED" ] \
+ && [ "${ZEVENT_VDEV_STATE_STR}" != "OFFLINE" ] \
&& [ "${ZEVENT_VDEV_STATE_STR}" != "REMOVED" ]; then
exit 3
fi
I'm testing OMV with ZFS on one of my virtual machines. I set up reporting in OVM and check the ZFS ZED box.
Running OMV: 4.1.5-1 openmediavailt-zfs 4.0.2-1
Testing the scenario when one drive fails. Start situation:
Now I set one drive offline:
root@openmediavault-testing:/etc# zpool offline TANK ata-VMware_Virtual_SATA_Hard_Drive_01000000000000000001
This results in a degraded Zpool:
Now I don't get any notification by email, or in the GUI that there is anything wrong with my device.
This does not look like expected behaviour to me.