Jump to content


Photo

Start Script on Virtual Server Failover

Script Failover Server

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 Markus Völkl

Markus Völkl
  • Members
  • 23 posts

Posted 27 October 2017 - 01:14 AM

I want to implement a script that is started after a server failover on the new active machine. In the server properties ther is a "Custom Scripts" Section with "Start Script"  Field. Is this Script fired when the failover has been processed?

 

My intention is to send some arpings for our virtual ip's. Becasue i have the problem that some of the public ips are not going up when a failover occurs. After a manual arping via ssh, it's up... 



#2 Michael Zoller

Michael Zoller
  • Barracuda Team Members
  • 209 posts

Posted 30 October 2017 - 04:15 AM

Yes, this script is executed every time the virtual server starts / stops (depending on which custom script you use). So during a failover from the primary to the secondary, the start script would run on the now-active secondary firewall.



#3 Markus Völkl

Markus Völkl
  • Members
  • 23 posts

Posted 30 October 2017 - 08:03 AM

Perfect. Is the script then executed synchronous or asynchronous? What happens if i put there a "sleep" command?

Is the virtual server starting anyway?



#4 Michael Zoller

Michael Zoller
  • Barracuda Team Members
  • 209 posts

Posted 30 October 2017 - 09:12 AM

The script must be finished before the services are started. So putting a sleep in the script would delay starting the services, not wait for the services to come up.



#5 Thomas Heymans

Thomas Heymans
  • Members
  • 11 posts

Posted 03 November 2017 - 03:45 AM

Michael, doesn't it behave like this ?

 

- startup scripts are executed after the server is started

- stop scripts are executed before the server is stopped.



#6 Markus Völkl

Markus Völkl
  • Members
  • 23 posts

Posted 07 November 2017 - 03:23 AM

I made a test yesterday. I have added arping for all of our public ip's (37) with a count of 4 for each command.

On Failover it took much longer until the server status of the secondary machine changed to ok.  So it seems

that the script is running synchronous.

But it does what i expected, all ip addresses are going up.  :)