all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 storage 1/2] RBD plugin: librados connect: pass along options
@ 2022-09-02  7:33 Fiona Ebner
  2022-09-02  7:33 ` [pve-devel] [PATCH v2 storage 2/2] RBD plugin: librados connect: increase timeout when in worker Fiona Ebner
  2022-09-13  7:59 ` [pve-devel] applied-series: [PATCH v2 storage 1/2] RBD plugin: librados connect: pass along options Fabian Grünbichler
  0 siblings, 2 replies; 3+ messages in thread
From: Fiona Ebner @ 2022-09-02  7:33 UTC (permalink / raw)
  To: pve-devel

In preparation to increase the timeout for workers. Both existing
callers of librados_connect() don't currently use the parameter.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

No changes from v1.

 PVE/Storage/RBDPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index eeeaf3f..0d6f596 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -27,7 +27,7 @@ my $get_parent_image_name = sub {
 my $librados_connect = sub {
     my ($scfg, $storeid, $options) = @_;
 
-    my $librados_config = PVE::CephConfig::ceph_connect_option($scfg, $storeid);
+    my $librados_config = PVE::CephConfig::ceph_connect_option($scfg, $storeid, $options->%*);
 
     my $rados = PVE::RADOS->new(%$librados_config);
 
-- 
2.30.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] [PATCH v2 storage 2/2] RBD plugin: librados connect: increase timeout when in worker
  2022-09-02  7:33 [pve-devel] [PATCH v2 storage 1/2] RBD plugin: librados connect: pass along options Fiona Ebner
@ 2022-09-02  7:33 ` Fiona Ebner
  2022-09-13  7:59 ` [pve-devel] applied-series: [PATCH v2 storage 1/2] RBD plugin: librados connect: pass along options Fabian Grünbichler
  1 sibling, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2022-09-02  7:33 UTC (permalink / raw)
  To: pve-devel

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

Changes from v1:
    * Add missing use statement. Was transitively used via e.g.
      PVE::RADOS, so it still worked, but let's be explicit about it.

 PVE/Storage/RBDPlugin.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 0d6f596..d76d5d3 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -13,6 +13,7 @@ use PVE::Cluster qw(cfs_read_file);;
 use PVE::JSONSchema qw(get_standard_option);
 use PVE::ProcFSTools;
 use PVE::RADOS;
+use PVE::RPCEnvironment;
 use PVE::Storage::Plugin;
 use PVE::Tools qw(run_command trim file_read_firstline);
 
@@ -27,6 +28,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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] applied-series: [PATCH v2 storage 1/2] RBD plugin: librados connect: pass along options
  2022-09-02  7:33 [pve-devel] [PATCH v2 storage 1/2] RBD plugin: librados connect: pass along options Fiona Ebner
  2022-09-02  7:33 ` [pve-devel] [PATCH v2 storage 2/2] RBD plugin: librados connect: increase timeout when in worker Fiona Ebner
@ 2022-09-13  7:59 ` Fabian Grünbichler
  1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2022-09-13  7:59 UTC (permalink / raw)
  To: Proxmox VE development discussion

thanks!

On September 2, 2022 9:33 am, Fiona Ebner wrote:
> In preparation to increase the timeout for workers. Both existing
> callers of librados_connect() don't currently use the parameter.
> 
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
> 
> No changes from v1.
> 
>  PVE/Storage/RBDPlugin.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
> index eeeaf3f..0d6f596 100644
> --- a/PVE/Storage/RBDPlugin.pm
> +++ b/PVE/Storage/RBDPlugin.pm
> @@ -27,7 +27,7 @@ my $get_parent_image_name = sub {
>  my $librados_connect = sub {
>      my ($scfg, $storeid, $options) = @_;
>  
> -    my $librados_config = PVE::CephConfig::ceph_connect_option($scfg, $storeid);
> +    my $librados_config = PVE::CephConfig::ceph_connect_option($scfg, $storeid, $options->%*);
>  
>      my $rados = PVE::RADOS->new(%$librados_config);
>  
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-13  7:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02  7:33 [pve-devel] [PATCH v2 storage 1/2] RBD plugin: librados connect: pass along options Fiona Ebner
2022-09-02  7:33 ` [pve-devel] [PATCH v2 storage 2/2] RBD plugin: librados connect: increase timeout when in worker Fiona Ebner
2022-09-13  7:59 ` [pve-devel] applied-series: [PATCH v2 storage 1/2] RBD plugin: librados connect: pass along options Fabian Grünbichler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal