1 Reply Latest reply on Jun 5, 2018 5:39 PM by mesverrum

    Asynchronous Component Execution


      We're using this application template to monitor our VBR servers Veeam Backup and Replication Management Server v9.5.apm-template


      However, there seems to be a bug that's acknowledged by Veeam caused by scripts running without cleanly connecting/disconnecting. Unfortunately this application is causing this bug as it's leaving sessions open and causing satellite processes to hang.


      To fix this, in the interim before its patched, Veeam have mentioned it would require:



      cmdlets to run at the start and end of each script.


      However, on testing, it seems that as all the components are running concurrently it causes the subsequent component to fail when a previous component runs the disconnect cmdlet.


      My question is, is there a way of running components staggered - so they are asynchronous? Therefore each script could have the connect/disconnect cmdlet.


      Alternatively, is there a way of having the entire template run the connect/disconnect as an umbrella command?


      Thanks for reading!

        • Re: Asynchronous Component Execution

          Off the top of my head here's an idea.  What if you added two more scripts to the set, one that launches the connect, and one that closes it.  Then add a wait type command to all of the scripts except the "opener", so all scripts would launch at the same time but all scripts except the one you want to run first, for powershell the command is start-sleep, Start-Sleep.  So add a start-sleep -s 15 to the scripts that are already part of the template.  For the "closer" script add in a wait for however long you need to in order to complete the previous calls, I guess I'd probably just make this value a bit shorter than the overall timeout, which is 300 seconds for this template.


          Polling interval starts at 00:00

          00:00 "start" script runs and opens connection

          00:15 other scripts begin their business....

          04:30 closer script kills the connection


          and at 05:00 we open another connection and cycle through again.