Microsoft Virtualization Discussions

error with Get-NcAggr

MaurizioTO
1,312 Views

Hello,

I've got an error

Get-NcAggr : Error converting value "inf" to type 'System.Nullable`1[System.Int64]'. Path 'space.efficiency.ratio', line 62,
position 20.
At C:\scripts\netapp.ps1:83 char:20
+ $aggregati=Get-NcAggr | Sort-Object name
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NcAggr], ArgumentException
+ FullyQualifiedErrorId : Error converting value "inf" to type 'System.Nullable`1[System.Int64]'. Path 'space.efficiency.ratio
', line 62, position 20.,DataONTAP.C.PowerShell.SDK.Cmdlets.Aggr.GetNcAggr

 

My toolkit version 

PS C:\Windows\system32> get-natoolkitversion

Major Minor Build Revision
----- ----- ----- --------
9 12 1 2302

 

OnTAP version 9.12.1P3

 

How can I solve that? I've seen someone talked about ZAPI. I need to force that in the Toolkit?

thanks 

 

1 ACCEPTED SOLUTION

MattS-NA
1,197 Views

Hi Maurizio,

Disclosure: I am a netapp employee but work on the PS/MSP side.

I came across this post searching for my own answers and your mention of ZAPI made me wonder if they just forgot to document a switch in the connect-nccontroller help... Sure enough, i found it via Get-Command:

 

 

((Get-Command Connect-NcController).parametersets).parameters | ft name,parametertype,aliases,helpmessage

Name                ParameterType                                 Aliases       HelpMessage
----                -------------                                 -------       -----------
Name                System.String[]                               {Filer}
Port                System.Nullable`1[System.UInt16]              {}
Credential          System.Management.Automation.PSCredential     {Cred, Creds}
HTTPS               System.Management.Automation.SwitchParameter  {}
HTTP                System.Management.Automation.SwitchParameter  {}
EnableSSLValidation System.Management.Automation.SwitchParameter  {}
Transient           System.Management.Automation.SwitchParameter  {}
Vserver             System.String                                 {}
Timeout             System.Nullable`1[System.Int32]               {}            Connection timeout value in milliseconds.  Only applies to HTTP/HTTPS.
Add                 System.Management.Automation.SwitchParameter  {}
ZapiCall            System.Management.Automation.SwitchParameter  {ONTAPI}      Use this to create Zapi connections to controller. Default would be REST for filers 9.6 and higher
ApplicationName     System.String                                 {AppName}
SSLVersion          System.String                                 {}

 

 

So just add the switch -ZapiCall; to your Connect-NcController  command:

 

 

Connect-NcController "<clustername>" -Credential "<credentials>" -ZapiCall

 

 

The difference even when connecting to a 9.12P5 cluster (also im using the same PS module version as your are):

 

With -ZapiCall

Name        State       TotalSize  Used  Available Disks RaidType        RaidSize  Volumes
----        -----       ---------  ----  --------- ----- --------        --------  -------
xxx1a_aggr1 online       272.1 TB   35%   177.3 TB  40   raid_tec, norm…    20          80
xxx1a_aggr2 online       112.0 TB   74%    29.4 TB  17   raid_tec, norm…    21          33
xxx1b_aggr1 online       272.1 TB   54%   124.2 TB  40   raid_tec, norm…    20         113
xxx1b_aggr2 online       112.0 TB    8%   102.7 TB  17   raid_tec, norm…    21          42
xxx1c_aggr1 online       272.1 TB   19%   220.5 TB  40   raid_tec, norm…    20          57
xxx1c_aggr2 online       112.0 TB    9%   101.5 TB  17   raid_tec, norm…    17          30
xxx1d_aggr1 online       272.1 TB   28%   196.7 TB  40   raid_tec, norm…    20          52
xxx1d_aggr2 online       112.0 TB   14%    96.9 TB  17   raid_tec, norm…    17          31

 Without/Default:

Name        State       TotalSize  Used  Available Disks RaidType        RaidSize  Volumes
----        -----       ---------  ----  --------- ----- --------        --------  -------
xxx1a_aggr2 online       112.0 TB          29.4 TB  17                      21
xxx1c_aggr2 online       112.0 TB         101.5 TB  17                      17
xxx1b_aggr1 online       272.1 TB         124.2 TB  40                      20
xxx1a_aggr1 online       272.1 TB         177.3 TB  40                      20
xxx1d_aggr2 online       112.0 TB          96.9 TB  17                      17
xxx1b_aggr2 online       112.0 TB         102.7 TB  17                      21
xxx1d_aggr1 online       272.1 TB         197.4 TB  40                      20
xxx1c_aggr1 online       272.1 TB         220.5 TB  40                      20

 

I've noticed a lot of other breaking differences as well.

View solution in original post

2 REPLIES 2

MattS-NA
1,198 Views

Hi Maurizio,

Disclosure: I am a netapp employee but work on the PS/MSP side.

I came across this post searching for my own answers and your mention of ZAPI made me wonder if they just forgot to document a switch in the connect-nccontroller help... Sure enough, i found it via Get-Command:

 

 

((Get-Command Connect-NcController).parametersets).parameters | ft name,parametertype,aliases,helpmessage

Name                ParameterType                                 Aliases       HelpMessage
----                -------------                                 -------       -----------
Name                System.String[]                               {Filer}
Port                System.Nullable`1[System.UInt16]              {}
Credential          System.Management.Automation.PSCredential     {Cred, Creds}
HTTPS               System.Management.Automation.SwitchParameter  {}
HTTP                System.Management.Automation.SwitchParameter  {}
EnableSSLValidation System.Management.Automation.SwitchParameter  {}
Transient           System.Management.Automation.SwitchParameter  {}
Vserver             System.String                                 {}
Timeout             System.Nullable`1[System.Int32]               {}            Connection timeout value in milliseconds.  Only applies to HTTP/HTTPS.
Add                 System.Management.Automation.SwitchParameter  {}
ZapiCall            System.Management.Automation.SwitchParameter  {ONTAPI}      Use this to create Zapi connections to controller. Default would be REST for filers 9.6 and higher
ApplicationName     System.String                                 {AppName}
SSLVersion          System.String                                 {}

 

 

So just add the switch -ZapiCall; to your Connect-NcController  command:

 

 

Connect-NcController "<clustername>" -Credential "<credentials>" -ZapiCall

 

 

The difference even when connecting to a 9.12P5 cluster (also im using the same PS module version as your are):

 

With -ZapiCall

Name        State       TotalSize  Used  Available Disks RaidType        RaidSize  Volumes
----        -----       ---------  ----  --------- ----- --------        --------  -------
xxx1a_aggr1 online       272.1 TB   35%   177.3 TB  40   raid_tec, norm…    20          80
xxx1a_aggr2 online       112.0 TB   74%    29.4 TB  17   raid_tec, norm…    21          33
xxx1b_aggr1 online       272.1 TB   54%   124.2 TB  40   raid_tec, norm…    20         113
xxx1b_aggr2 online       112.0 TB    8%   102.7 TB  17   raid_tec, norm…    21          42
xxx1c_aggr1 online       272.1 TB   19%   220.5 TB  40   raid_tec, norm…    20          57
xxx1c_aggr2 online       112.0 TB    9%   101.5 TB  17   raid_tec, norm…    17          30
xxx1d_aggr1 online       272.1 TB   28%   196.7 TB  40   raid_tec, norm…    20          52
xxx1d_aggr2 online       112.0 TB   14%    96.9 TB  17   raid_tec, norm…    17          31

 Without/Default:

Name        State       TotalSize  Used  Available Disks RaidType        RaidSize  Volumes
----        -----       ---------  ----  --------- ----- --------        --------  -------
xxx1a_aggr2 online       112.0 TB          29.4 TB  17                      21
xxx1c_aggr2 online       112.0 TB         101.5 TB  17                      17
xxx1b_aggr1 online       272.1 TB         124.2 TB  40                      20
xxx1a_aggr1 online       272.1 TB         177.3 TB  40                      20
xxx1d_aggr2 online       112.0 TB          96.9 TB  17                      17
xxx1b_aggr2 online       112.0 TB         102.7 TB  17                      21
xxx1d_aggr1 online       272.1 TB         197.4 TB  40                      20
xxx1c_aggr1 online       272.1 TB         220.5 TB  40                      20

 

I've noticed a lot of other breaking differences as well.

MaurizioTO
1,168 Views

Great solved ! 

Many thanks !

Public