[pve-devel] applied: [PATCH storage] Diskmanage: don't run zpool if not present
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Apr 8 17:49:26 CEST 2019
On 4/8/19 2:38 PM, Stoiko Ivanov wrote:
> 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 at proxmox.com>
> ---
> I did some rough tests and with the patch the warnings in the log are gone.
>
>
>
> PVE/Diskmanage.pm | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
> index 612bc3b..55df3f2 100644
> --- a/PVE/Diskmanage.pm
> +++ b/PVE/Diskmanage.pm
> @@ -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
>
applied, thanks!
More information about the pve-devel
mailing list