[pve-devel] [PATCH pve-storage 3/5] Fix missing $vmid

Michael Rasmussen mir at datanom.net
Fri Jun 16 03:16:56 CEST 2017


Signed-off-by: Michael Rasmussen <mir at datanom.net>
---
 PVE/Storage/FreeNASPlugin.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/Storage/FreeNASPlugin.pm b/PVE/Storage/FreeNASPlugin.pm
index c438519..0f2a56d 100644
--- a/PVE/Storage/FreeNASPlugin.pm
+++ b/PVE/Storage/FreeNASPlugin.pm
@@ -1072,6 +1072,8 @@ sub free_image {
 sub volume_resize {
     my ($class, $scfg, $storeid, $volname, $size, $running) = @_;
 
+    my ($vtype, $name, $vmid) = $class->parse_volname($volname);
+
     my $run = PVE::QemuServer::check_running($vmid);
     if (!$run) {
         $run = PVE::LXC::check_running($vmid);
@@ -1080,8 +1082,6 @@ sub volume_resize {
     die 'mode failure - unable to resize disk(s) on a running system due to FreeNAS bug.<br />
 		 See bug report: <a href="https://bugs.freenas.org/issues/24432" target="_blank">#24432</a><br />' 		if $run;
     
-    my ($vtype, $name, $vmid) = $class->parse_volname($volname);
-
     my $data = {
     	volsize => $size,
     };
-- 
2.11.0


----

This mail was virus scanned and spam checked before delivery.
This mail is also DKIM signed. See header dkim-signature.




More information about the pve-devel mailing list