[pve-devel] [PATCH storage] ceph: add default timeouts to commands
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue Oct 3 10:58:30 CEST 2017
Because ceph commands will just keep trying forever.
---
PVE/Storage/RBDPlugin.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index decfbf5..5880040 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -152,7 +152,10 @@ sub run_rbd_command {
*STDERR->flush();
};
}
-
+
+ $args{timeout} = PVE::RPCEnvironment->is_worker() ? 60*60 : 30
+ if !defined $args{timeout};
+
eval { run_command($cmd, %args); };
if (my $err = $@) {
die $errmsg . $lasterr if length($lasterr);
--
2.11.0
More information about the pve-devel
mailing list