From c29f5fd6191c7fba553eed5a33b6891b6975da35 Mon Sep 17 00:00:00 2001 From: linggao Date: Wed, 28 Nov 2012 16:32:36 +0000 Subject: [PATCH] increase the timeout value in RShellApi.pm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14463 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/RShellAPI.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/RShellAPI.pm b/xCAT-server/lib/perl/xCAT/RShellAPI.pm index 272ea1734..e8ee09331 100644 --- a/xCAT-server/lib/perl/xCAT/RShellAPI.pm +++ b/xCAT-server/lib/perl/xCAT/RShellAPI.pm @@ -88,7 +88,7 @@ sub run_remote_shell_api { -host=>$node, -nokeycheck=>1, -output_record_separator=>"\r", - Timeout=>5, + Timeout=>10, Errmode=>'return', Prompt=>"/$prompt/", ); @@ -102,7 +102,7 @@ sub run_remote_shell_api { $output.="start Telnet session...\n"; require Net::Telnet; $t = new Net::Telnet( - Timeout=>5, + Timeout=>10, Errmode=>'return', Prompt=>"/$prompt/", ); @@ -218,6 +218,7 @@ sub run_remote_shell_api { if ($verbose) { print "command:$cmd\n"; } + while (1) { if ($try_more) { #This is for second and consequent pages. @@ -240,7 +241,7 @@ sub run_remote_shell_api { ($prematch, $match) = $t->waitfor(Match => "/$more_prompt/", Match => "/$prompt/", Errmode => "return", - Timeout=>3); + Timeout=>10); } else { # for the first page which may contian all if (! $t->put(String => "$cmd\n", @@ -256,7 +257,7 @@ sub run_remote_shell_api { Match => "/$prompt/", Match => '/password:\s*$/i', Errmode => "return", - Timeout=>3); + Timeout=>10); } if ($verbose) {