Adding support for failover situation
This commit is contained in:
parent
55ee7e50e1
commit
30fdbbdae7
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue