Skip to content

Conversation

hedrok
Copy link
Contributor

@hedrok hedrok commented Oct 9, 2025

Make failover support dhcp-interface

  • Refactor XML a little: move common dhcp-interface properties to separate include file
  • Add failover support for dhcp-interface
  • Add test for DHCP in failover protocol
  • Change vyos.template.get_dhcp_router to use '*.lease' file instead of '.leases' file - in 'leases' there can be several last leases and current one may not be the first one in file

Command sample:

    set protocols failover route 203.0.113.0/24 dhcp-interface eth1 interface eth1
    set protocols failover route 203.0.113.0/24 dhcp-interface eth1 metric 30
    set protocols failover route 203.0.113.0/24 dhcp-interface eth1 check target 10.25.0.47
    set protocols failover route 203.0.113.0/24 dhcp-interface eth1 check timeout 1

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)

How to test / Smoketest result

I've added test case:

$ /usr/libexec/vyos/tests/smoke/cli/test_protocols_failover.py
test_01_basic (__main__.TestProtocolsFailover.test_01_basic) ... ok
test_02_vrf (__main__.TestProtocolsFailover.test_02_vrf) ... ok
test_03_config (__main__.TestProtocolsFailover.test_03_config) ... ok
test_04_dhcp (__main__.TestProtocolsFailover.test_04_dhcp) ... ok

-->

Checklist:

* Refactor XML a little: move common dhcp-interface properties to
  separate include file
* Add failover support for dhcp-interface
* Add test for DHCP in failover protocol
* Change vyos.template.get_dhcp_router to use '*.lease' file instead
  of '.leases' file - in 'leases' there can be several last leases
  and current one may not be the first one in file
Copy link

github-actions bot commented Oct 9, 2025

👍
No issues in PR Title / Commit Title

Copy link

github-actions bot commented Oct 9, 2025

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) ❌ failed
  • CLI Smoketests VPP 👍 passed
  • CLI Smoketests (interfaces only) ❌ failed
  • Config tests 👍 passed
  • Config tests VPP 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

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

Successfully merging this pull request may close these issues.

1 participant