[pve-devel] [PATCH storage] ceph: add default timeouts to commands

Fabian Gr├╝nbichler f.gruenbichler at proxmox.com
Wed Oct 4 11:57:39 CEST 2017


On Tue, Oct 03, 2017 at 10:58:30AM +0200, Wolfgang Bumiller wrote:
> 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};

I know this is taken from another storage plugin, but I wonder if we
really need a timeout if we are running in a worker? I can think of some
scenarios where a storage operation could take longer than an hour on a
busy host/cluster..

> +
>      eval { run_command($cmd, %args); };
>      if (my $err = $@) {
>  	die $errmsg . $lasterr if length($lasterr);
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel



More information about the pve-devel mailing list