Adding support for failover situation

master
Micke Nordin 8 years ago
parent 55ee7e50e1
commit 30fdbbdae7

@ -213,6 +213,10 @@ sub run {
# If we have an active shared cronfile, we should also have an old shared
# See if I am the one
if (is_active(get_nodes) ){
if(compare($cronfile, $passivesharedcronfile)) == 0) {
print "There has been a failover, switching to active cronfile\n";
copy($activesharedcronfile, $cronfile);
}
my $tempfile = tmpnam();
my $compare = cron_compare($cronfile, $activesharedcronfile, $oldactivesharedcronfile );
# The other node has changed the file

Loading…
Cancel
Save