public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage 2/2] RBD plugin: librados connect: increase timeout when in worker
Date: Thu,  1 Sep 2022 10:40:02 +0200	[thread overview]
Message-ID: <20220901084002.43074-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20220901084002.43074-1-f.ebner@proxmox.com>

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@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





      reply	other threads:[~2022-09-01  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01  8:40 [pve-devel] [PATCH storage 1/2] RBD plugin: librados connect: pass along options Fiona Ebner
2022-09-01  8:40 ` Fiona Ebner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220901084002.43074-2-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal