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

T5504: Keepalived VRRP ability to set more than one peer-address #3056

Merged
merged 2 commits into from Feb 29, 2024

Conversation

natali-rs1985
Copy link
Contributor

@natali-rs1985 natali-rs1985 commented Feb 28, 2024

Change Summary

Keepalived VRRP ability to set more than one peer-address

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)

Related PR(s)

Component(s) name

high-availability

Proposed changes

Added ability to set up more then 1 peer-address

vyos@vyos# cat /run/keepalived/keepalived.conf | sed -n "/^vrrp_instance foo/,/^}/p"
vrrp_instance foo {
    state BACKUP
    interface eth1
    virtual_router_id 101
    priority 123
    advert_int 1
    preempt_delay 0
    unicast_peer {
        192.0.2.2
        192.0.2.3
    }
    unicast_src_ip 192.0.2.1
    virtual_ipaddress {
        192.0.2.254/32
    }
}

How to test

set high-availability vrrp group foo address 192.0.2.254/32
set high-availability vrrp group foo hello-source-address '192.0.2.1'
set high-availability vrrp group foo interface 'eth1'
set high-availability vrrp group foo peer-address '192.0.2.2'
set high-availability vrrp group foo peer-address '192.0.2.3'
set high-availability vrrp group foo priority '123'
set high-availability vrrp group foo vrid '101'
commit

Check unicast_peer configuration:

vyos@vyos# cat /run/keepalived/keepalived.conf | sed -n "/^vrrp_instance foo/,/^}/p"
vrrp_instance foo {
    state BACKUP
    interface eth1
    virtual_router_id 101
    priority 123
    advert_int 1
    preempt_delay 0
    unicast_peer {
        192.0.2.3
        192.0.2.2
    }
    unicast_src_ip 192.0.2.1
    virtual_ipaddress {
        192.0.2.254/32
    }
}

Smoketest result

vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_high-availability_vrrp.py
test_01_default_values (__main__.TestVRRP.test_01_default_values) ... ok
test_02_simple_options (__main__.TestVRRP.test_02_simple_options) ... ok
test_03_sync_group (__main__.TestVRRP.test_03_sync_group) ... ok
test_04_exclude_vrrp_interface (__main__.TestVRRP.test_04_exclude_vrrp_interface) ... ok
test_05_set_multiple_peer_address (__main__.TestVRRP.test_05_set_multiple_peer_address) ... ok

----------------------------------------------------------------------
Ran 5 tests in 51.968s

OK

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

@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, jestabro, sever-sever and c-po and removed request for a team February 28, 2024 11:34
Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I think we should add smoke test for it right away.

@natali-rs1985
Copy link
Contributor Author

Looks good, but I think we should add smoke test for it right away.

Added smoke test

@c-po c-po merged commit 9ffb0d6 into vyos:current Feb 29, 2024
6 of 7 checks passed
@c-po
Copy link
Member

c-po commented Feb 29, 2024

@Mergifyio backport sagitta

Copy link

mergify bot commented Feb 29, 2024

backport sagitta

✅ Backports have been created

c-po added a commit that referenced this pull request Feb 29, 2024
T5504: Keepalived VRRP ability to set more than one peer-address (backport #3056)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants