[pve-devel] applied [PATCH storage] rbd: fix exit from 'rbd ls -l' parser

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Feb 23 09:49:58 CET 2017


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
otherwise, this prints a warning for every snapshot :-/

 PVE/Storage/RBDPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 11ac094..3a7c201 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -186,7 +186,7 @@ sub rbd_ls {
 
 	if ($line =~  m/^((vm|base)-(\d+)-\S+)\s+(\d+)(k|M|G|T)\s((\S+)\/((vm|base)-\d+-\S+@\S+))?/) {
 	    my ($image, $owner, $size, $unit, $parent) = ($1, $3, $4, $5, $8);
-	    next if $image =~ /@/; #skip snapshots
+	    return if $image =~ /@/; #skip snapshots
 
 	    $list->{$pool}->{$image} = {
 		name => $image,
-- 
2.1.4





More information about the pve-devel mailing list