Subscribe

Get-NcSnapshot Fails with "Object reference not set to an instance of an object"

[ Edited ]

I have a custom data source running on WFA3.1P1 that retrieves snapshot data from 3 controllers, all of which are at 8.3.  For 2 of the controllers, the custom data source runs without a problem.  For the 3rd, it always fails with the above error message and fails at the same spot.  The PS code is doing something along the lines of:

 

Get-NcSnapshot | foreach { “write some fields” } | add-content file-name

 

If I remove everything except the Get-NcSnapshot it still fails.

 

Running the same thing in a PS CLI works against the same controller that fails when running as a custom data source in WFA.

 

I have tried a lot of different things to identify the problem but cannot nail this down to anything more specific than the location of the failure and the fact that it always runs on the 2 but not on the 1 that fails.  The controller that fails has significantly more snapshots than the 2 that work without a problem.  I do not have the exact count of snapshots for the 3 controllers but could possibly get it from the customer.

 

Any ideas?

Re: Get-NcSnapshot Fails with "Object reference not set to an instance of an object"

One additional piece of info.  I have used the tempate and query options to reduce the number of snapshots returned to about 10 snapshots using the query.name = '*name*' option.  Same failure.  Only difference is that this time, I get 0 snapshots returned whereas without the query I get some and the failure always occurs at the same point.  Meaning, the last snapshot returned before the failure is always the same one.

Re: Get-NcSnapshot Fails with "Object reference not set to an instance of an object"

[ Edited ]

Hi,

 

When enumerating snapshots on a cluster that has a high snapshot count you can increase the global timeout and decrease the maximum records per snapshot iteration by modifying the following variables:

 

$global:CurrentNcController.TimeoutMsec (default is 60000)

$global:CurrentNcController.MaxIterRecords (default is 100)

 

The "max-records" default for the "get-snapshot-iter" ZAPI is 20 (The C# code in the CmdLet sets the "max-records" to the controllers default value).

You can also use the "-Template" and "-Attributes" parameters of the Get-NcSnapshot CmdLet to filter the snapshot property values that are returned.

 

/matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.