0

I want to start/stop a freeradius depending on the master (start) or the backup (stop) state of the keepalived instance. The freeradius is listening for accounting messages on the shared virtual ip.

I tried to reach this with notify_master and notify_backup in the keepalived.conf.

Sharing of the virtual IPs works fine, but freeradius won’t start or stop on changing of the state (master to backup and vice versa) on both of my servers. It only works with notify_stop, which actually stops freeradius when i stop the keepalived service. Also a NAS should be mounted, which works also as intended and gets mounted/unmounted depending on the state.

I added both the config files for master and backup systems.

Any idea why this does not work with freeradius? Thank you!

master configuration:

global_defs {
    router_id master01
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 8     
    priority 100            
    advert_int 5         
    authentication {
        auth_type PASS
        auth_pass **
    }
    unicast_peer {
        10.156.8.6 
    }
    virtual_ipaddress {
        10.156.8.199 
    }
    virtual_ipaddress_excluded {
        2001:...
    }
    notify_master "/usr/bin/systemctl start radiusd.service"
    notify_master "mount -t nfs intern.nas.**.de:/intern/data /opt/services"
    
    notify_backup "/usr/bin/systemctl stop radiusd.service"
    notify_backup "umount -f -l /opt/services"
    
    notify_stop "/usr/bin/systemctl stop radiusd.service"
}

backup configuration:

global_defs {
    router_id backup02
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 8   
    priority 50           
    advert_int 5
    authentication {
        auth_type PASS
        auth_pass **
    }
    unicast_peer {
        10.156.8.2   
    }
    virtual_ipaddress {
        10.156.8.199 
    }
    virtual_ipaddress_excluded {
        2001:...
    }
    notify_master "/usr/bin/systemctl start radiusd.service"
    notify_master "mount -t nfs intern.nas.**.de:/intern/data /opt/services"
    
    notify_backup "/usr/bin/systemctl stop radiusd.service"
    notify_backup "umount -f -l /opt/services"
    
    notify_stop "/usr/bin/systemctl stop radiusd.service"
}

both systems work with:

SUSE Linux Enterprise Server 15 SP2
Keepalived v2.0.19
FreeRADIUS Version 3.0.21
ryudo
  • 1

1 Answers1

0

solved it by myself...

it's not possible to call notify_master or notify_back two times in the keepalived config file.

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
ryudo
  • 1