Microsoft Virtualization Discussions

PowerShell Command Error: Get-NcCifsSession and Get-NcCifsSessionFile

DougDevokaitis
1,123 Views

Several ONTAP storage clusters are providing ONTAP Connection IDs larger than 64Bit Integer can support.  The commands are failing with this error:

Get-NcCifsConnection : Error converting value 12930960430088848194 to type 'System.Nullable`1[System.Int64]'. Path 'sessions[0].identifier', line 18, position 40.
At line:1 char:1
+ Get-NcCifsConnection
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NcCifsConnection], ArgumentException
+ FullyQualifiedErrorId : Error converting value 12930960430088848194 to type 'System.Nullable`1[System.Int64]'. Path 'sessions[0].identifier', line 18, position 40.,DataONTAP.C.PowerShell.SDK.Cmdlets.Cifs.GetNcCifsConnection

 

Get-NcCifsSessionFile : Error converting value 12930960430088913433 to type 'System.Nullable`1[System.Int64]'. Path 'session.identifier', line 26, position 38.
At line:1 char:1
+ Get-NcCifsSessionFile
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NcCifsSessionFile], ArgumentException
+ FullyQualifiedErrorId : Error converting value 12930960430088913433 to type 'System.Nullable`1[System.Int64]'. Path 'session.identifier', line 26, position 38.,DataONTAP.C.PowerShell.SDK.Cmdlets.Cifs.GetNcCifsSessionFile

 

I have verified the storage clusters ONTAP CIFS Connection IDs are larger the 64Bit integer can handle.

64bit Maximum integer number: 9223372036854775807
ONTAP Session ID:                              12930960430088908395

 

 

 

 

1 ACCEPTED SOLUTION

saharsh
1,060 Views

Hi DougDevokaitis, we are able to identify the issue, and the fix will be available in upcoming PSTK release

View solution in original post

3 REPLIES 3

saharsh
1,061 Views

Hi DougDevokaitis, we are able to identify the issue, and the fix will be available in upcoming PSTK release

tx
NetApp
221 Views

Hi saharah -  Can you confirm if the issue is fixed and also provide the fixed version?

tx
NetApp
222 Views

We are getting below error while running NetApp PowerShell Tool Kit command Get-NcCifsSessionFile.

Error converting value 15081710727138984229 to type 'System.Nullable`1[System.Int64]'. Path 'session.identifier'.

 

Seems the error occurs when the Session id is greater than the singed 64-bit Integer range.

 

Could you please confirm whether the above error is fixed. Kindly also help us to get feasible workaround/solution for the same.

 

 

NetApp PowerShell Toolkit version: 9.14.1 & 9.16.1

 

NetApp OnTap version:

NetApp Release 9.12.1P12

NetApp Release 9.14.1P11

NetApp Release 9.15.1P11

 

Error:

 

Get-NcCifsSessionFile | Select-Object node,vserver,ConnectionId,Share,Path

Get-NcCifsSessionFile : Error converting value 15081710727138984229 to type 'System.Nullable`1[System.Int64]'. Path 'session.identifier', line 21, position 38.

At line:1 char:1

+ Get-NcCifsSessionFile | Select-Object node,vserver,ConnectionId,Share ...

+ ~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-NcCifsSessionFile], ArgumentException

    + FullyQualifiedErrorId : Error converting value 15081710727138984229 to type 'System.Nullable`1[System.Int64]'. Path 'session.identifier', line 21, position 38.,DataONTAP.C.PowerShell.SDK.Cmdlets.Cifs.GetNcCifsSessionFile

  

 

Observation:

 

The NetApp OS might be using Unsinged 64-bit integer data type. Range: 0 to 18446744073709551615 Decimal.

PowerShell long data type is equal to singed 64-bit integer. Range: –9223372036854775808 through 9223372036854775807 Decimal.

The error occurs whenever the session id crosses the PowerShell long data type or the signed int64 range.

 

The Decimal Data type may be used in PowerShell to handle session ids instead of long data type. Decimal Data type range -79228162514264337593543950335 to 79228162514264337593543950335.

 

Public