]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/ZFSPoolPlugin.pm
fix #3803: ZFSPoolPlugin: zfs_request: increase minimum timeout in worker
[pve-storage.git] / PVE / Storage / ZFSPoolPlugin.pm
index 343f833361b95469e32cd21d808b0f4cea579bc2..b1ee420e87139d9e21380bc23697730b7ac692c7 100644 (file)
@@ -178,7 +178,12 @@ sub zfs_request {
     my $msg = '';
     my $output = sub { $msg .= "$_[0]\n" };
 
-    $timeout = PVE::RPCEnvironment->is_worker() ? 60*60 : 5 if !$timeout;
+    if (PVE::RPCEnvironment->is_worker()) {
+       $timeout = 60*60 if !$timeout;
+       $timeout = 60*5 if $timeout < 60*5;
+    } else {
+       $timeout = 5 if !$timeout;
+    }
 
     run_command($cmd, errmsg => "zfs error", outfunc => $output, timeout => $timeout);