From ae1cb4d55b3cf998fece1b3e2f47bca1663e33a3 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 5 Oct 2009 15:05:29 +0000 Subject: [PATCH] -Be more forgiving of issues at close session time, since a need for retries on close session is more often than not indicative that no response will ever come back. -Go through the standard number of retries, but do it at one second intervals to get them out of the way faster (in the unlikely scenario that the request was dropped by the ethernet fabric, this should still get the session reaped) -Ignore a failure to get a command response for close session -The worst scenario that a user is not warned about is the slight possibility that a session slot on the BMC is not freed and instead will consume the slot for about a minute. Since we try to keep the number of sessions to a BMC down, one consumed meaninglessly for a minute in a rare case is not a huge problem git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4295 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/ipmi.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 4878ba220..efaf12f20 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -809,9 +809,12 @@ sub ipmicmd { if($noclose == 0) { $error = closesession(); - if($error) { - return(1,"$text, session close: $error"); - } + #In most cases where closesession fails to receive a response, + #the BMC is ignoring us because it managed to get the first one + #and the network dropped it on the way back + #if($error) { + # return(1,"$text, session close: $error"); + #} if($debug) { print "$node: session closed.\n"; } @@ -5634,7 +5637,7 @@ sub closesession() @message ); - ($error,@response) = domsg($sock,\@msg,$timeout,1); + ($error,@response) = domsg($sock,\@msg,1,1); #Have a quicker retry on the close session if(!$error) { $code = $response[36-$authoffset];