[pve-devel] [PATCH storage 2/2] RBD plugin: librados connect: increase timeout when in worker
Fiona Ebner
f.ebner at proxmox.com
Thu Sep 1 10:40:02 CEST 2022
The default timeout in PVE/RADOS.pm is 5 seconds, but this is not
always enough for external clusters under load. Workers can and should
take their time to not fail here too quickly.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
PVE/Storage/RBDPlugin.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 0d6f596..442b9bd 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -27,6 +27,9 @@ my $get_parent_image_name = sub {
my $librados_connect = sub {
my ($scfg, $storeid, $options) = @_;
+ $options->{timeout} = 60
+ if !defined($options->{timeout}) && PVE::RPCEnvironment->is_worker();
+
my $librados_config = PVE::CephConfig::ceph_connect_option($scfg, $storeid, $options->%*);
my $rados = PVE::RADOS->new(%$librados_config);
--
2.30.2
More information about the pve-devel
mailing list