[pbs-devel] applied: [PATCH proxmox-backup 5/5] get_disks: don't fail on zfs_devices

Dietmar Maurer dietmar at proxmox.com
Thu Jul 9 13:59:46 CEST 2020


applied for now ...

> On 07/08/2020 2:59 PM Dominik Csapak <d.csapak at proxmox.com> wrote:
> 
>  
> zfs does not have to be installed, so simply log an error and
> continue, users still get an error when clicking directly on
> ZFS
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  src/tools/disks.rs | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/tools/disks.rs b/src/tools/disks.rs
> index a4c3e29..73f8370 100644
> --- a/src/tools/disks.rs
> +++ b/src/tools/disks.rs
> @@ -743,7 +743,10 @@ pub fn get_disks(
>  
>      let partition_type_map = get_partition_type_info()?;
>  
> -    let zfs_devices = zfs_devices(&partition_type_map, None)?;
> +    let zfs_devices = zfs_devices(&partition_type_map, None).or_else(|err| -> Result<HashSet<u64>, Error> {
> +        eprintln!("error getting zfs devices: {}", err);
> +        Ok(HashSet::new())
> +    })?;
>  
>      let lvm_devices = get_lvm_devices(&partition_type_map)?;
>  
> -- 
> 2.20.1
> 
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel





More information about the pbs-devel mailing list