[pve-devel] [PATCH] Skip invalid property's in storage parser

Wolfgang Link w.link at proxmox.com
Thu Mar 31 15:18:38 CEST 2016


There is no need to remove the hole storage, if one property is not valid.
Just ignore the property.
---
 PVE/Storage/Plugin.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index ccb3280..6f29838 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -235,7 +235,8 @@ sub decode_value {
 
 	foreach my $c (PVE::Tools::split_list($value)) {
 	    if (!$valid_content->{$c}) {
-		die "storage does not support content type '$c'\n";
+		warn "storage does not support content type '$c'\n";
+		next;
 	    }
 	    $res->{$c} = 1;
 	}
@@ -249,7 +250,8 @@ sub decode_value {
 	my $valid_formats = $def->{format}->[0];
 
 	if (!$valid_formats->{$value}) {
-	    die "storage does not support format '$value'\n";
+	    warn "storage does not support format '$value'\n";
+	    next;
 	}
 
 	return $value;
-- 
2.1.4





More information about the pve-devel mailing list