Active IQ Unified Manager Discussions

WFA and ONTAP 9.10 upgrade type casting issue.

MikeC_12
1,429 Views

After ONTAP 9.10 upgrade, workflows containining the 'Create Volume' step (and  possibly others) failed with the previous version test.

 

The problem turned out to be a typecasting issue in the Compare-Ontapversions function within the WFAWrapper PS module. 

To fix, add typecastinfg to [int] the following lines in the Compare-Ontapversions function (137-138, 148-150).

 

Corrected code is below:

 

------------------

if($FirstVersion -match "^(?<major>\d+)[.](?<minor>\d+)[.](?<micro>\d+)$")
{
    $major1 = [int]$matches.major
    $minor1 = [int]$matches.minor
    $micro1 = [int]$matches.micro
}
else
{
    throw "The input FirstVersion is not in the expected format."
}

if($SecondVersion -match "^(?<major>\d+)[.](?<minor>\d+)[.](?<micro>\d+)$")
{
    $major2 = [int]$matches.major
    $minor2 = [int]$matches.minor
    $micro2 = [int]$matches.micro
}

-------------------------

 

 

0 REPLIES 0
Public