]> git.proxmox.com Git - pve-storage.git/commitdiff
Diskmanage: don't run zpool if not present
authorStoiko Ivanov <s.ivanov@proxmox.com>
Mon, 8 Apr 2019 12:38:36 +0000 (14:38 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 8 Apr 2019 15:47:07 +0000 (17:47 +0200)
Since zfsutils are not a hard dependency of our stack it is possible to not have
`zpool` available.

Checking for existance of `zpool` before calling it suppresses spurious warnings
in the logs (e.g. when creating Ceph OSDs or accessing the 'Disk' Tab in the
GUI).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
PVE/Diskmanage.pm

index 612bc3b6be8e9b899cb338d4515690a809502540..55df3f203b33de1f8b75b8a6001f91f5c59f76dc 100644 (file)
@@ -152,6 +152,8 @@ sub get_smart_data {
 sub get_zfs_devices {
     my $list = {};
 
+    return {} if !(-x $ZPOOL);
+
     # use zpool and parttype uuid,
     # because log and cache do not have
     # zfs type uuid