Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master and backup extra heartbeat direct cable(to avoid master and backup hold the vip at the same time(brain split)) how to configure in /etc/keepalived/keepalived.conf #2526

Open
roronoaihxn opened this issue Jan 11, 2025 · 0 comments

Comments

@roronoaihxn
Copy link

roronoaihxn commented Jan 11, 2025

Support requests should be sent via https://groups.io/g/keepalived-users

Describe why you are unable to send the support request to the above email list
I am new to the github, do not see the email list.

Describe what you need help/support for
master and backup extra heartbeat direct cable(to avoid master and backup hold the vip at the same time(brain split)) how to configure in /etc/keepalived/keepalived.conf

Details of what you would like to do with keepalived
I have A (10.10.26.198)and B(10.10.26.199) server, one as master one as backup, they are the save except ip address.
The server has two ethernet interfaces(eth0 and eth1) and use eth0 interface to connect to the router.
I want to config another interface eth1 to direct link A and B server to avoid the "brain split". Now I do not known how to configure the extra heartbeat line between A and B server. For now i just configure one interface eth0. I have a question: when i configure two interfaces eth0 and eth1 in keepalived, the keepalived will transfer state when two interface both error or any one error? Thanks

Keepalived version
Keepalived v2.3.1 (05/24,2024)

Distro (please complete the following information):

  • Name [e.g. Fedora, Ubuntu]
  • Version [e.g. 29]
  • Architecture [e.g. x86_64]

Details of any containerisation or hosted service (e.g. AWS)
on a hosted service

Configuration file:
Full copy of your configuration file, obfuscated if necessary to protect passwords and IP addresses

[root@localhost ~]# cat /etc/keepalived/keepalived.conf
! Configuration File for keepalived

global_defs {
   router_id UQI_ROBOT
   vrrp_skip_check_adv_addr
   vrrp_garp_interval 0
   vrrp_gna_interval 0
}


vrrp_script check_health {
    script "/opt/check_health.sh"
    user root
    interval 60
    fall 2
    weight -20
    timeout 30
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 51
    priority 100
    track_script {
      check_health
    }
    notify_master "/opt/change_to_role.sh MASTER"
    notify_backup "/opt/change_to_role.sh BACKUP"
    notify_fault "/opt/change_to_role.sh FAULT"
    notify_stop "/opt/change_to_role.sh STOP"
    nopreempt
    unicast_src_ip 10.10.26.198
    unicast_peer { 10.10.26.199 }
    advert_int 60
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress { 10.10.26.250/24 }
}

Notify and track scripts
If any notify or track scripts are in use, please provide copies of them

System Log entries
Full keepalived system log entries from when keepalived started, if applicable

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant