Commit 6c21cef9 authored by Dietmar Maurer's avatar Dietmar Maurer

use new --connect-timeout for ceph commands

parent 3490c771
...@@ -128,23 +128,11 @@ my $parse_ceph_config = sub { ...@@ -128,23 +128,11 @@ my $parse_ceph_config = sub {
my $run_ceph_cmd = sub { my $run_ceph_cmd = sub {
my ($cmd, %params) = @_; my ($cmd, %params) = @_;
my $timeout = 3; my $timeout = 5;
my $oldalarm; run_command(['ceph', '-c', $pve_ceph_cfgpath,
eval { '--connect-timeout', $timeout,
local $SIG{ALRM} = sub { die "timeout\n" }; @$cmd], %params);
$oldalarm = alarm($timeout);
# Note: --connect-timeout does not work with current version
# '--connect-timeout', $timeout,
run_command(['ceph', '-c', $pve_ceph_cfgpath, @$cmd], %params);
alarm(0);
};
my $err = $@;
alarm($oldalarm) if $oldalarm;
die $err if $err;
}; };
my $run_ceph_cmd_text = sub { my $run_ceph_cmd_text = sub {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment