From 2bf340b011eb11ad2bc1b6d7e033cd0e293225db Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 16 Apr 2012 00:42:36 +0000 Subject: [PATCH] Enhance ipmi console with analogous enhancements to other console backends to mitigate memory usage when massive numbers of imms are not reachable git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12244 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/cons/ipmi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/cons/ipmi b/xCAT-server/share/xcat/cons/ipmi index 2c457a852..a9b23096a 100755 --- a/xCAT-server/share/xcat/cons/ipmi +++ b/xCAT-server/share/xcat/cons/ipmi @@ -25,8 +25,8 @@ BEGIN umask 0077; mkpath("/tmp/xcat/"); unless (sysopen(LOCKHANDLE,"/tmp/xcat/consolelock",O_WRONLY | O_CREAT)) { - sleep 15; print "Unable to open lock file"; + exec("sleep 15"); exit 0; } get_lock(); @@ -58,9 +58,9 @@ my $cmdref={ xCAT::Client::submit_request($cmdref,\&getans); until ($username and $password and $bmc) { release_lock(); #Let other clients have a go - $sleepint=10+int(rand(10)); + $sleepint=10+int(rand(20)); print "Console not ready, retrying in $sleepint seconds (Ctrl-e,c,o to skip delay) \n"; - sleep $sleepint; + exec("sleep $sleepint"); get_lock(); xCAT::Client::submit_request($cmdref,\&getans); } @@ -103,7 +103,8 @@ if ($rc) { #some shoddy vendors ignore the IPMI 2.0 requirement to support IPMI while ($rc != 0) { $sleepint = 10+int(rand(20)); print "Failure to reach IPMI device, retrying in $sleepint seconds (Hit Ctrl-E,c,o to skip)\n"; - sleep $sleepint; + exec("sleep $sleepint"); + #sleep $sleepint; @mcinfo=`$ipmitool -I lan -U $username -P $password -H $bmc mc info`;#| grep 'Manufacturer ID : 343' > /dev/null 2>&1"; $rc = $?; if ($rc) { #repeat workaround for shoddy vendors