I have writing powershell scripts which are returning an error when the reponse from a NetApp storage controller takes too long (minutes-hours).
If I issue powershell commands on the NetApp storage controller like "get-nasysteminfo" information is immediately returned. But if I issue commands like "get-nasnapshots" after a long period of time an error is returned. APIException,DataONTAP.PowerShell.SDK.Cmdlets.Snapshot.GetNaSnapshot. Issuing the equivalent command on the console "snap list volname" may take a few minutes or a few hours before a list of snapshots is finally returned.
I would like to know if there is a setting to adjust the timeout period between a request/response?
Is the request/response timeout determined by the variable $global:CurrentNaController.TimeoutMsec?
PS. I guess I can always loop a try catch around each possible high latency request until I'm successful but I would prefer to keep things simple.
Yes, $global:CurrentNaController.TimeoutMsec affects all subsequent cmdlets that use that connection context; you can change that value at any time, not just when making the initial connection. We increased the default value to 60 seconds in Toolkit 1.5 which should prevent most timeouts, but in cases where Data ONTAP is taking minutes or longer, you'll need to increase that value. I'm not sure we've tested commands in environments that take "hours" to return, so it would be helpful to know if timeouts are still occurring even with that large a timeout setting.