Release Automation

 View Only
  • 1.  How to handle a server reboot in a process?

    Posted May 05, 2016 03:00 PM

    Hi,

     

    I have an installer that reboots the machine. What is the best way to handle this reboot in a process?

     

    The other way I could do this is to force the installer to not reboot the machine, but then I would need to conditionally reboot the machine in the process, is there a way to conditionally reboot a windows server based on the return value of another action?

     

    Many thanks for any pointers.


    Regards,

     

     

    Ivan



  • 2.  Re: How to handle a server reboot in a process?
    Best Answer

    Posted May 05, 2016 03:37 PM

    You have two options

    1. use restart host action - this way the action will restart the server and will continue the process execution once the server is up again

    2. use wait for manual restart  , this way the process execution waiting until manual restart is done (e.g using other scripts) and the process will continue once the server is up again.

     

    I hope this help

    Thanks

    Jacky



  • 3.  Re: How to handle a server reboot in a process?

    Posted May 05, 2016 03:43 PM

    Thanks Jacky!

    With the "Wait for manual restart" what happens if the computer does not reboot? The installer only reboots if a restart is required, is there any option to wait for manual restart only if the installer returns a certain value?



  • 4.  Re: How to handle a server reboot in a process?

    Posted May 05, 2016 04:39 PM

    This is what I ended up with as a test, it is OK because I can return a different code if restarting, the problem is that there is no nice way to handle a real failure (e.g. still want to pause).

     

    Perhaps the way to do this better is to use the "Compare Two Numbers" and then decide if the particular return code means a restart is in progress, vs a real error:

     

    This seems to work pretty well. How ugly is this? Any better suggestions?

     

    Thanks for the help.


    Regards,

     

     

    Ivan



  • 5.  Re: How to handle a server reboot in a process?

    Posted May 06, 2016 11:43 AM

    That's not ugly at all, and similar to the way I've handled that issue in the past.

     

    But.....your final "run-command-line" will never execute, because it's impossible for BOTH green-arrows to be true.

     

    Remember.....ALL inputs to an action must evaluate to "true" before the action can be executed......so.....

     

    The arrow from the "Compare" action should be unconditional and the arrow from the "Wait..." action should be on "Success or Cancel".

     

    Does that make sense?  I know the logic is not always the simplest, but it does make sense when you get used to it



  • 6.  Re: How to handle a server reboot in a process?

    Posted May 06, 2016 01:30 PM

    Thanks ChipRab, that is indeed the last piece of the puzzle ("Success or Cancel") much appreciated.