[pve-devel] applied: [PATCH storage] fix #2154: Buggy "pvesm status" output
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Apr 17 17:12:08 CEST 2019
On 4/16/19 3:18 PM, Wolfgang Link wrote:
> Improve error output.
applied, thanks, although I changed the commit message a bit, as while it
is related to #2154 it does not fixes it (as we cannot be 100% sure what
the reporters issue is), but it'd allow to track it down more easily, so
definitively related.
> ---
> PVE/Storage/ZFSPoolPlugin.pm | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
> index 4f16351..9ba3999 100644
> --- a/PVE/Storage/ZFSPoolPlugin.pm
> +++ b/PVE/Storage/ZFSPoolPlugin.pm
> @@ -528,13 +528,16 @@ sub activate_storage {
> eval {
> $res = $class->zfs_request($scfg, undef, 'zpool_list', @param);
> };
> -
> - if ($@ || !defined($res) || $res !~ $pool) {
> + my $err = $@;
> + if ($err || !defined($res) || $res !~ $pool) {
> eval {
> @param = ('-d', '/dev/disk/by-id/', '-o', 'cachefile=none', "$pool");
> $class->zfs_request($scfg, undef, 'zpool_import', @param);
> };
> - die "could not activate storage '$storeid', $@\n" if $@;
> + if ($@) {
> + warn "$err\n";
> + die "could not activate storage '$storeid', $@\n";
> + }
> }
> return 1;
> }
>
More information about the pve-devel
mailing list