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

vrrp: T1972: Ability to set IP address on not vrrp interface #1143

Merged
merged 1 commit into from Jan 9, 2022

Conversation

sever-sever
Copy link
Member

@sever-sever sever-sever commented Jan 8, 2022

Change Summary

Ability to set virtual_address on not vrrp-listen interface 192.168.222.222/24 dev eth2
Add ability don't track primary vrrp interface - dont_track_primary option
Add ability to set tracking (state UP/Down) on desired interfaces
For example, eth0 is used for vrrp and we want to track another eth1
interface that does not belong to any vrrp-group
Add track-options,

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

vrrp

Proposed changes

How to test

VyOS configuration:

set high-availability vrrp group WAN address 192.0.2.55/24
set high-availability vrrp group WAN address 192.168.222.222/24 interface 'eth2'
set high-availability vrrp group WAN address 198.51.100.111/24
set high-availability vrrp group WAN interface 'eth0'
set high-availability vrrp group WAN no-preempt
set high-availability vrrp group WAN priority '200'
set high-availability vrrp group WAN track exclude-vrrp-interface
set high-availability vrrp group WAN track interface 'eth2'
set high-availability vrrp group WAN track interface 'eth1'
set high-availability vrrp group WAN vrid '100'

Keepalived conf, expected dont_track_primary and 192.168.222.222/24 dev eth2 and track_interface:

vrrp_instance WAN {
    state BACKUP
    interface eth0
    virtual_router_id 100
    priority 200
    advert_int 1
    dont_track_primary
    nopreempt
    virtual_ipaddress {
        192.0.2.55/24
        192.168.222.222/24 dev eth2
        198.51.100.111/24
    }
    track_interface {
        eth2
        eth1
    }
}

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@c-po
Copy link
Member

c-po commented Jan 8, 2022

Can we change the CLI and remove redundant words?

set high-availability vrrp group WAN track interface 'eth2'
set high-availability vrrp group WAN track exclude-vrrp-interface

@sever-sever
Copy link
Member Author

Can we change the CLI and remove redundant words?

set high-availability vrrp group WAN track interface 'eth2' set high-availability vrrp group WAN track exclude-vrrp-interface

Done

Ability to set virtual_address on not vrrp-listen interface
Add ability don't track primary vrrp interface "exclude-vrrp-interface"
Add ability to set tracking (state UP/Down) on desired interfaces
For example eth0 is used for vrrp and we want to track another eth1
interface that not belong to any vrrp-group
@c-po c-po merged commit dfb2b58 into vyos:current Jan 9, 2022
@c-po
Copy link
Member

c-po commented Jan 10, 2022

@sever-sever can you please also update the VRRP/HA documentation to reflect this new functionality?

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