Wait for host to go offline and come back online

BatchPatch Forums Home Forums BatchPatch Support Forum Wait for host to go offline and come back online

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9150
    Franklin Rodrigues
    Participant

    Dear All,

    I have been trying to use this special action, but even after the host is successfully restarted, the referenced task hangs there.

    After changing the Global timeout settings, I added a notification action and got the following message: “fri-10:30:35> Job Queue: Execution continuing. Timeout reached before host went offline and/or came back online.”

    The actions I am running are:

    Start pinging

    Wait 1 minute

    Get pending reboot status + reboot if required

    Wait 1 minute

    Download and install updates

    Reboot (force, if required)

    Wait for host to go offline and come back online

    Send email notification

    WMI is indeed running as I can get information such as model or boot time. Is there anything wrong with my queue?

    Thanks and Regards, Franklin

    #11044
    doug
    Moderator

    Hi Franklin –

    Is the target computer in this case a virtual machine that reboots very quickly? Based on what you have described, it sounds like BatchPatch is not detecting that the computer is ever going offline in the first place, so when it comes back online BatchPatch is still waiting for it to go offline. The only thing that can really cause this behavior to occur is when the reboot completes so quickly that BP isn’t even able to detect the computer was ever offline. We have only ever seen this happen with virtual machines on occasion, since they can sometimes reboot extremely rapidly.

    The default behavior has BatchPatch waiting for 3 failed ping attempts before considering a host to have gone offline. If the host reboots before 3 ping failures occur, then BatchPatch will never mark the host as having gone offline, and then it will produce the situation that you are experiencing. For computers that reboot extremely quickly you could set this 2 pings or even 1 ping. However, if it’s set to just 1 ping, then any time there is an intermittent ping timeout with any online computer, BP would think it went offline. You can imagine how this could be a problem since occasionally, depending on network activity or a computer’s activity level, a machine that is online might not respond to every single ping. What we have observed is that in most cases 3 is the best number to use in this settings. We have seen some cases where 2 is needed, particularly with very fast rebooting VMs. We have never observed 1 being needed, so my recommendation to you is to try 2 and see how it goes.

    ‘Tools > Settings > Grid Preferences > Hosts are considered offline after X ping timeouts’

    Unfortunately programmatically determining that a computer has truly gone offline and come back online is actually not quite as simple as it seems like it might be. BatchPatch uses a combination of ping attempts and WMI connection attempts to strike the most reasonable balance for finding the truth in this scenario.

    I hope this helps.

    -Doug

    #11040
    Franklin Rodrigues
    Participant

    Hi Doug, thanks for your quickly reply.

    You are right. That is happening against VMs which do restart extremely fast.

    I will try decrease the PING option you mentioned, however I am not sure where to decrease that from 3 to 2.

    Would you please advise that as well?

    Thanks and Regards, Franklin.

    #11038
    doug
    Moderator

    Oops – Forgot to tell you where the setting is located! 🙂 Go to ‘Tools > Settings > Grid Preferences > Hosts are considered offline after X ping timeouts’

    -Doug

    #11039
    Franklin Rodrigues
    Participant

    Thanks Doug. The setting has been changed to 2 and the special action worked as expected…

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.