Installing and upgrading to HP Insight Software 6.0 on Windows Server 2003 R2 MSCS for high availability
40
cluConnect host,objCluster
ErrorCheck "cluConnect", "Fail to connect to cluster on host: "_
& host
&
Err.Description
DIM cluNode
DIM n
On Error Goto 0
' Now check pre-req services availability on each node
WScript.Echo _
"Checking for required Windows services on cluster nodes..."
For Each cluNode in objCluster.Nodes
For n = 0
to
UBOUND(arrSvcName)
verifySvc arrSvcName(n) (0), cluNode.Name
ErrorCheck "verifySvc", "An error occured: " _
&
Err.Description
Next
Next
WSCript.Echo
""
WScript.Echo _
"Checking that grpName and simDisk do exist..."
Set cluGroup = objCluster.ResourceGroups.Item(grpName)
If cluGroup Is Nothing Then
WarnMsg "Cluster Group '" & grpName & "' is not found."
Else
WScript.Echo "OK! - Cluster Group '" & grpName & "' is found."
End If
' check that simDisk is found
Set hRes = CreateObject("Scripting.Dictionary")
hRes.Add "hasimDisk", simDisk
' create an inverted hash to more easily compare against
' the set of keys, in this case, the resource names
' assigned above
Set hResInv = CreateObject("Scripting.Dictionary")
invertHash hRes, hResInv
getClusterResources
ErrorCheck "getClusterResources", "Error encountered: "_
&
Err.Description
'loop thru resource strings, to verify that it matches the
'hash configured above. If we find a match of a resource,
'that may prevent it from being created by
the
next
job step.
For Each resKey In hRes.Keys
If checkResource (hres(resKey))
=
False
Then
WarnMSg "OK! - Cluster resource '" &_
hres(resKey) & "' is not found."
Else
End
If
Wscript.Echo "OK! - Cluster resource '" &_
hres(resKey) & "' is found."
Next
ErrorCheck "checkResource", "Error encountered: " &_
Err.Description & hres(resKey)
' check that the following resources are not found
WSCript.Echo
""
WScript.Echo _
"Checking that other objects do not exist..."
Set hRes = CreateObject("Scripting.Dictionary")
hRes.Add "hasimNetname", simNetname
hRes.Add "hasimIP", simIP
' create an inverted hash to more easily compare against
' the set of keys, in this case, the resource names
' assigned above
Set hResInv = CreateObject("Scripting.Dictionary")