#Problem with PShell Module when listening aggregates: 9.12.1.2302

1 messages · Page 1 of 1 (latest)

copper fulcrum
#

I receive following erorr when listening aggregates: get-ncaggr 001

Get-NcAggr : Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'DataONTAP.C.Types.Aggr.Store' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.Path 'cloud_storage.stores', line 117, position 15.

steep hedge
#

What version of ONTAP and NetApp.ONTAP?
Was NetApp.ONTAP module installed from the binary provided from NetApp or from PowerShellGallery?

copper fulcrum
#

From netapp NOW portal. Version is 9.12.1.2302

steep hedge
#

And the ONTAP version?

steep hedge
#

While waiting for some automation to complete, I grabbed a lab with ONTAP 9.12.1GA from here:
https://handsonlabs.netapp.com/lab/eapontap9121
(Available to NetApp customers)
Installed VScodium and the NetApp.ONTAP module from powershell gallery:

PS C:\Users\Administrator.DEMO> Find-Module NetApp.ONTAP |Select-Object -Property Name,Version

Name         Version
----         -------
NetApp.ONTAP 9.12.1.2302


PS C:\Users\Administrator.DEMO> Find-Module NetApp.ONTAP | Install-Module -Scope CurrentUser
PS C:\Users\Administrator.DEMO>

Connected:

PS C:\Users\Administrator.DEMO> Connect-NcController -Name cluster1.demo.netapp.com

Name                 Address           Vserver              Version
----                 -------           -------              -------
cluster1.demo.net... 192.168.0.101                          NetApp Release Yellowdog__9.12.1: Tue Jan 31 19:19:43 UTC 2023


PS C:\Users\Administrator.DEMO>
#

And tested the same call:

PS C:\Users\Administrator.DEMO> Get-NcAggr

Name                      State       TotalSize  Used  Available Disks RaidType        RaidSize  Volumes
----                      -----       ---------  ----  --------- ----- --------        --------  -------
cluster1_01_SSD_1         online       281.3 GB         281.3 GB  13                      24
cluster1_02_SSD_1         online       281.3 GB         281.3 GB  13                      24


PS C:\Users\Administrator.DEMO> Get-NcAggr cluster1_01_SSD_1

Name                      State       TotalSize  Used  Available Disks RaidType        RaidSize  Volumes
----                      -----       ---------  ----  --------- ----- --------        --------  -------
cluster1_01_SSD_1         online       281.3 GB         281.3 GB  13                      24


PS C:\Users\Administrator.DEMO>
#

It appears to function here.

#

You can re-test with debugging enabled (it's a LOT of txt...):

Set-PSDebug -Trace 2 ; Set-NaToolkitConfiguration -LogLevel DEBUG
#

You can also test the APIs directly on the cluster user the onboard API tool:
https://<cluster management LIF>/docs/api
For example:
https://cluster1.demo.netapp.com/docs/api
If there's an issue with the API, open a case.
If the API works I suggest uninstalling the PSTK binary and installing from Powershell gallery.
If that still doesn't work, the module page says to post here for support: https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/bd-p/microsoft-cloud-and-virtualization-discussions

copper fulcrum
#

Hi James

thx for helping me, i tried the API call on the filer directly and it looks like that "https://<fqdn>/api/storage/aggregates?name=001&return_records=true&return_timeout=15"

#

im executing "get-ncaggr 001" on an 8-node cluster with FAS and AFF systems mixed. i will try your recommendet steps. We have two of those cluster and the command failes on both