[pve-devel] [PATCH storage] Addition to fix #1895, skip image if no owner

Alwin Antreich a.antreich at proxmox.com
Fri Sep 7 10:52:23 CEST 2018


Non conforming image names are not ignored anymore by the new rbd_ls
implementation, this patch adds the old behaviour.

This fix is a temporary workaround and should be removed, once the new
image name parser is ready.

Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
---
 PVE/Storage/RBDPlugin.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index c3b0cd9..2dc6688 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -179,6 +179,7 @@ sub rbd_ls {
 	my $image = $el->{image};
 
 	my ($owner) = $image =~ m/^(?:vm|base)-(\d+)-/;
+	next if !defined($owner);
 
 	$list->{$pool}->{$image} = {
 	    name => $image,
-- 
2.11.0





More information about the pve-devel mailing list