Active IQ Unified Manager Discussions

WFA command duration timeout

christig
6,452 Views

When you create a new command in WFA you can spedify a timeout from the Command Properties tab (it is not the connection timeout as discussed in this post http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/WFA-command-timeout/m-p/5335#M1197)

If the command does not finish before the end of this timeout, WFA abort the command (get msg: "Command command_name -param1 value1 -param2 value2 ... timed out")

From the Command Properties tab you can only set the timeout in the range of 10 to 10800 seconds  (10800 s = 3 h)

I plan to create a Worflow which launch a snapmirror(vault) and wait the initialization or the update before continuing other command. The vault update or initialization duration can be longer than 3h (the maximum limit of a WFA command timeout).It is my issue. So is it possible to set a longer timeout or disable timeout (infinite timeout)

 

Thanks in advance for your help

Regards

 

1 ACCEPTED SOLUTION

sinhaa
6,430 Views

Hi Chris,

 

     I can tell you how to achieve this. You need to divide your command in smaller modules or sub-commands based on what they do.  There are two tasks.

 

1. Launch Snapmirror( vault)

2. Wait for Initialization or Update to complete.

 

The waiting task is what is expected to take a long time. So the 2nd task  can actually be a 2nd command and of type= Wait for Condition

 

You must know that a command of type: Wait for Condition is allowed a maximum timeout of: 999999 seconds (277.78 hrs)  and not just 10800 seconds ( 3hrs) which is for a standrad command. 

 

Something like Below:

 

 Wait for Snapmirror Inintialize.png

 

 

A Wait for Condition type of command is a special command, it Re-executes the command code after the Waiting Interval ( see above in image ) period. It stops execution cycles if the cmdlet Set-WfaCommndProgress gets 100 for the Parameter -ProgressPercentage

 

WFA has some commands of type Wait for Conditions like Wait for Aggregate online. You can see them for help.

 

 

 

 

 

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

View solution in original post

9 REPLIES 9

sinhaa
6,431 Views

Hi Chris,

 

     I can tell you how to achieve this. You need to divide your command in smaller modules or sub-commands based on what they do.  There are two tasks.

 

1. Launch Snapmirror( vault)

2. Wait for Initialization or Update to complete.

 

The waiting task is what is expected to take a long time. So the 2nd task  can actually be a 2nd command and of type= Wait for Condition

 

You must know that a command of type: Wait for Condition is allowed a maximum timeout of: 999999 seconds (277.78 hrs)  and not just 10800 seconds ( 3hrs) which is for a standrad command. 

 

Something like Below:

 

 Wait for Snapmirror Inintialize.png

 

 

A Wait for Condition type of command is a special command, it Re-executes the command code after the Waiting Interval ( see above in image ) period. It stops execution cycles if the cmdlet Set-WfaCommndProgress gets 100 for the Parameter -ProgressPercentage

 

WFA has some commands of type Wait for Conditions like Wait for Aggregate online. You can see them for help.

 

 

 

 

 

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

christig
6,421 Views

Perfert

Thank a lot for your valued help

It is exactly what I need 🙂

 

Best Regards

Christian

Rutul
6,296 Views

I am developing workflow in which i have to put command which is just waiting time entered by end user (lets say 48Hrs).How waiting time interval option can help in this command to keep for 48hrs as standard execution doesnt allow more than 3 hrs.

 

In powershell we have command

 

$Time = $Time*60*60

"Start-Sleep -s $Time"

 

I entered value 10 in waiting interval.So in which condition this command will get completed?What condition I should keep to complete this command?

sinhaa
6,286 Views

Then you need to trick your WFA command. Let's see how.

 

1. Have your command of type "Wait for Condition"

 

This allows you a timeout maxmimum of 277+ hours. Put any Time-Out value as you wish. Put waiting Interval(s) as 10800

 

2. Have anything in your command code as you want. Just at the end add this line.

 

Set-WfaCommandProgress -Total 1 -Current 1 -ProgressPercentage 100

 

That's all.

 

The logic :

 

I'm using the fact that a "Wait For condition" is command same as the standard command except that it repeats its execution after a give "Waiting Interval(s)" till the cmdlet Set-WfaCommandProgress doesn't send it to stop with ProgressPercentage as 100 or the Command Time-out is reached.

 

So I'm doing all I want, and in the end I signal that this command should Finish execution and not re-execute.

 

This allows any my comamnd to have time-out far much larger than 3 hours allowed for a standard command.

 

How to "Test" this command?

In command Edit window, Test button is disabled. But its allowed to "test" at the command view upon right-click or tool-bar.

 

Have fun.

 

sinhaa

 

 

 

 

 

 

 

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

Rutul
6,284 Views

What is the meaning of  switches -Total and -Current in SerWfaCommandProgress command

sinhaa
6,281 Views

Go to your Help->Support Links and see the WFA Powershell Cmdlets help.

 

You'll find all the detailed explanation of all WFA cmdlets with examples.

 

 

WFA Support Links.png

 

 

If you still have question, you can ask here.

 

 

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

Rutul
6,256 Views

Thanks for help

Rutul
6,240 Views

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

param (
[parameter(Mandatory=$false, HelpMessage="Wait Time")]
[int]$Time
)


[int] $Current = 0


Get-WfaLogger -Info -Message $Current

 

$Total = $Time*3600

 

$CurrentPercentage = ($Current/$Total)*100


Set-WfaCommandProgress -Total $Total -Current $Current -ProgressPercentage $CurrentPercentage

 

$Current=$Current + 3600

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

Input given by End User : 12 hrs

 

This code takes Time Hour value from End User and convert into seconds. In first interval Current value will be 0 and in next interval I want to increase it to 3600 as 1 hr completes and calculate the percentage accordingly for Set-WfaCommandProgress Command-ProgressPercentage parameter 

 

I implemented above code but the problem is everytime it re executes command at 3600 seconds interval, it will take $current value as 0 in every interval. Is there any workaround to acheive this ? 

 

wfa1.PNG

sinhaa
6,196 Views

Rutul,

    I think you will need to know what is and how to use a "Wait for condition" command. Now that's a different topic and needs a different thread from the original post.

 

Kindly post all your queries on a separate thread.

 

warm regards,

sinhaa

 

 

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