[ofw] [PATCH] OFED installer - fix isolated installer crash.

Smith, Stan stan.smith at intel.com
Thu Apr 8 13:52:05 PDT 2010


Signed-off-by: stan smith <stan.smith at intel.com>

Revision: 2769
Author: stansmith
Date: 1:29:26 PM, Thursday, April 08, 2010
Message:
[OFED] More WinOF --> OFED name changes.
In CheckDriversOK() remove usage of Wsh.Sleep() as it fails in the installer environment thus causing an
installer crash.
Wait by invoking 'cmd.exe /C timeout /T 2'. In a small # of isolated cases wait for the
IPoIB device IBA\IPOIB to show up in the Windows device database prior to installing NetworkDirect/WSD.
Waiting ensures NetworkDirect/IBAL & Winsock Direct providers install correctly.
~98% of the time, the IPoIB device has already appeared, otherwise wait a max of 30 seconds. On the waited too long condition, output a timed nastyGram popup about a possible IPoIB driver initialization failure (no errors returned) and continue.
----
Modified : /gen1/trunk/OFED/WIX/CustomActions.vbs

--- a/OFED/WIX/CustomActions.vbs        Thu Apr 08 13:21:34 2010
+++ b/OFED/WIX/CustomActions.vbs        Thu Apr 08 11:29:56 2010
@@ -27,7 +27,7 @@
 ' * SOFTWARE.
 ' */

-' WIX CustomActions used in the WinOF (Windows OpenFabrics) Release.
+' WIX CustomActions used in the OFED for Windows Release.
 ' File is based on the installer src contributed by Mellanox Technologies.
 '
 ' TabStops == 4
@@ -168,28 +168,6 @@
 End Sub


-'Waiting to delete a file until it's free
-
-Function FileDeleteUntilFree(filename)
-       Set objFSO=CreateObject("Scripting.FileSystemObject")
-       Set WshShell = CreateObject("WScript.Shell")
-       dim too_much
-       too_much = 0
-       Do While objFSO.FileExists(filename)
-         On Error Resume Next
-         objFSO.DeleteFile(filename)
-         WScript.Sleep 100    ' milliseconds
-      ' Do not wait to long to delete the file, bail and don't delete it if too
-      ' long of a wait.
-         too_much = too_much + 1
-         if too_much > 50 then
-               msgbox "delete Timeout(5) " & filename
-               exit Do
-         End If
-         err.clear
-       Loop
-End Function
-
 Sub FileDelete(filename)
     Dim fso
     Set fso = CreateObject("Scripting.FileSystemObject")
@@ -1085,7 +1063,7 @@
        End If

        If sDBG >= "1" Then
-               DisplayDevInfo devInfo,"WinOF Remove Driver Package"
+               DisplayDevInfo devInfo,"OFED Remove Driver Package"
                udfCnt = 0
                Flist = ""
        End If
@@ -1200,7 +1178,7 @@
                ibaDev(i) = ltrim(cmdout(i-1))
        Next

-'      DisplayDevInfo ibaDev,"WinOF Device Info"
+'      DisplayDevInfo ibaDev,"OFED Device Info"

        GetDeviceInstallInfo = ibaDev

@@ -1486,7 +1464,7 @@
 '

        ' Remove all Local Area Connection Registry entries which were constructed
-       ' for IPoIB. Next WinOF install gets same IPoIB local area connection
+       ' for IPoIB. Next OFED install gets same IPoIB local area connection
        ' assignment.

        Dim IPOIB_LAC
@@ -1537,7 +1515,7 @@
 ' complib.dll never gets installed.
 ' If features[IPoIB+(WinSockDirect OR NetworkDirect)] are installed, then
 ' wait for IPoIB device to appear in order to ensure WSD and/or ND provider
-' instal success.
+' install success.

 Sub CheckDriversOK()
     Dim winDir, WshShell, fso, AddLocal, too_long
@@ -1561,7 +1539,7 @@
                ' 10 sec timeout warning box.
                WshShell.Popup "WARNING: Possible HCA Driver Startup Failure." _
                        & vbCrLf & "  Consult the Windows System Event log! (mlx4_bus)",_
-                       10,"WinOF-Install CheckDriversOK",vbInformation+vbSystemModal
+                       10,"OFED-Install CheckDriversOK",vbInformation+vbSystemModal

                MsiLogInfo "[CheckDriversOK] ** Possible HCA Driver Startup Failure" & _
                                        vbCrLf & "[CheckDriversOK] **   Consult System Event Log."
@@ -1580,15 +1558,31 @@
        End If

        ' wait for IPoIB driver to start so ND and/or WSD can install
+    ' Define start as the appearance of IBA\IPOIB instance in device database.

        devList = Find_Dev_by_Tag(WshShell,devman,"find","IBA\IPOIB")
-    too_long = 0
+
+    too_long = 15
+       If Session.Property("VersionNT") = WindowsXP Then
+        ' XP does not support timeout cmd; let timeout cmd fail to consume time.
+        too_long = 50
+    End If

        Do While IsNull(devList)
-      WScript.Sleep 1000    ' milliseconds
       ' Wait for device IPoIB to appear as it's required for WSD/ND install.
-         too_long = too_long
-         if too_long > 30 then
+      WshShell.Run "cmd.exe /c timeout /T 2", 0, true
+         too_long = too_long - 1
+         if too_long <= 0 then
+               ' timeout info box.
+               WshShell.Popup "WARNING: Possible NetworkDirect startup Failure." _
+                       & vbCrLf & "  Waited too long for IBA\IPOIB device?" & vbCrLf & _
+            "use 'ndinstall -l' to verify NetworkDirect provider " & _
+            "installed correctly.",15,"OFED-Install CheckDriversOK", _
+            vbInformation+vbSystemModal
+
+               MsiLogInfo "[OFED] ** Possible NetworkDirect startup Failure" & _
+                       vbCrLf & "[OFED] **   Waited too long for IBA\IPOIB device?" & _
+                       vbCrLf & "[OFED] **   Check ND provider status."
                exit Do
          End If
          err.clear
@@ -1686,7 +1680,7 @@
        objSystem.Win32Shutdown 2+4
     Next

-    'msgbox "Please wait while computer restarts ...",0,"WinOF"
+    'msgbox "Please wait while computer restarts ...",0,"OFED"

 End Sub

@@ -1715,7 +1709,7 @@



-' Not Used - idea was to run %SystemRoot%\temp\WinOFcleanup.bat on the next
+' Not Used - idea was to run %SystemRoot%\temp\OFEDcleanup.bat on the next
 ' reboot to remove driver files which did not get uninstalled (win2K3 only);
 ' script ran, files persisted on Win2K3?

@@ -1731,7 +1725,7 @@
        Exit Sub
   End if

-  script = "RunOnceWinOFcleanup.bat"
+  script = "RunOnceOFEDcleanup.bat"
   src = sInstalldir & "Drivers\" & script

   If Not fso.FileExists(src) Then
@@ -1739,7 +1733,7 @@
        Exit Sub
   End if

-  ' copy WinOFclean.bat to %SystemRoot%\temp for runOnce cmd
+  ' copy OFEDclean.bat to %SystemRoot%\temp for runOnce cmd
   sTemp = fso.GetSpecialFolder(0) & "\temp\" & script
   If fso.FileExists(sTemp) Then
        Err.clear
@@ -1750,10 +1744,10 @@
   fso.CopyFile src, sTemp
   If Err.Number = 0 Then
       cmd = "cmd.exe /C " & sTemp
-      RunAtReboot "WinOF", cmd
+      RunAtReboot "OFED", cmd
       ' 2nd cmd to remove previous script.
 ' XXX      cmd = "cmd.exe /C del /F/Q " & sTemp
-'      RunAtReboot "WinOF2", cmd
+'      RunAtReboot "OFED2", cmd
   End if

 End Sub





More information about the ofw mailing list