Microsoft Virtualization Discussions

How to address NetApp Controller high latency between request and response in powershell scripts

elee
3,988 Views

Hi All,

   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?

TIA

E

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.

1 ACCEPTED SOLUTION

cknight
3,988 Views

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.

View solution in original post

2 REPLIES 2

cknight
3,989 Views

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.

elee
3,988 Views

Hi Clinton,

     Thanks for the quick reply.  I'll test my scripts and let everyone know if changing the timeout to hours works.

Thanks Again

E

Public