Bumped up timeouts

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 10 months ago
parent 0f1ff02e78
commit fe2806b5df
  1. 2
      Anvil/Tools/Database.pm
  2. 7
      Anvil/Tools/Network.pm
  3. 4
      Anvil/Tools/Remote.pm
  4. 4
      anvil.conf

@ -20394,7 +20394,7 @@ sub _test_access
} }
# Check using ping. Returns '1' on success, '0' on fail. # Check using ping. Returns '1' on success, '0' on fail.
alarm(10); alarm(120);
my $connected = $anvil->data->{cache}{database_handle}{$uuid}->ping(); my $connected = $anvil->data->{cache}{database_handle}{$uuid}->ping();
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { connected => $connected }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { connected => $connected }});
alarm(0); alarm(0);

@ -4518,9 +4518,9 @@ B<< Note >>: This method only works on Network Manager based systems.
Parameters; Parameters;
=head3 timeout (optional, default '180') =head3 timeout (optional, default '300')
By default, this method will wait for three minutes. If you want to set a timeout, set this as a number of seconds. If the timeout expires and any bonds are still not up, the method will return C<< 1 >>. If this is set to C<< 0 >>, it will wait forever. By default, this method will wait for five minutes. If you want to set a timeout, set this as a number of seconds. If the timeout expires and any bonds are still not up, the method will return C<< 1 >>. If this is set to C<< 0 >>, it will wait forever.
=cut =cut
sub wait_for_bonds sub wait_for_bonds
@ -4531,7 +4531,8 @@ sub wait_for_bonds
my $debug = defined $parameter->{debug} ? $parameter->{debug} : 3; my $debug = defined $parameter->{debug} ? $parameter->{debug} : 3;
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => $debug, key => "log_0125", variables => { method => "Network->wait_for_bonds()" }}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => $debug, key => "log_0125", variables => { method => "Network->wait_for_bonds()" }});
my $timeout = defined $parameter->{timeout} ? $parameter->{timeout} : 180; ### TODO: all configured bonds and slaved interfaces should be 'activated' before this returns, even if their cable is out. Wait for this, with a default 300s timeout.
my $timeout = defined $parameter->{timeout} ? $parameter->{timeout} : 300;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
timeout => $timeout, timeout => $timeout,
}}); }});

@ -510,7 +510,7 @@ sub call
's3:remote_user' => $remote_user, 's3:remote_user' => $remote_user,
's4:port' => $port, 's4:port' => $port,
}}); }});
alarm(10); alarm(120);
($connect_output) = capture_merged { ($connect_output) = capture_merged {
$ssh_fh = Net::OpenSSH->new($target, $ssh_fh = Net::OpenSSH->new($target,
user => $remote_user, user => $remote_user,
@ -706,7 +706,7 @@ sub call
if ($timeout) if ($timeout)
{ {
# Call with a timeout. Use alarm also, as capture2's timeout is questionaly reliable. # Call with a timeout. Use alarm also, as capture2's timeout is questionaly reliable.
alarm($timeout + 2); alarm($timeout + 60);
($output, $error) = $ssh_fh->capture2({timeout => $timeout}, $shell_call); ($output, $error) = $ssh_fh->capture2({timeout => $timeout}, $shell_call);
$output = "" if not defined $output; $output = "" if not defined $output;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => $secure, list => { 'ssh_fh->error' => $ssh_fh->error }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => $secure, list => { 'ssh_fh->error' => $ssh_fh->error }});

@ -227,6 +227,6 @@ sys::manage::firewall = 1
# During the startup of a machine, Network Manager can take a minute or two before the network is stable. By # During the startup of a machine, Network Manager can take a minute or two before the network is stable. By
# default, anvil-daemon and scancore will pause during startup, waiting for the network to stabilize. By # default, anvil-daemon and scancore will pause during startup, waiting for the network to stabilize. By
# default, Network->wait_for_bonds waits for three minutes. During the initial config, we keep this shorter. # default, Network->wait_for_bonds waits for five minutes. During the initial config, we keep this shorter.
# This value will be updated by anvil-configure-host when the initial configuration completes. # This value will be updated by anvil-configure-host when the initial configuration completes.
network::wait_for_bonds::timeout = 60 network::wait_for_bonds::timeout = 300

Loading…
Cancel
Save