Skip to content

[NXOS] Fix bfd spec mapping to feature configuration#259

Merged
felix-kaestner merged 1 commit intomainfrom
fix-bfd
Mar 26, 2026
Merged

[NXOS] Fix bfd spec mapping to feature configuration#259
felix-kaestner merged 1 commit intomainfrom
fix-bfd

Conversation

@felix-kaestner
Copy link
Contributor

@felix-kaestner felix-kaestner commented Mar 25, 2026

Commit 838ddc7 introduced a regression, where we would configure the BFD
of the interface unconditionally, even in the case where the feature is
not even activated, leading to BFD feature is not enabled Commit Failed
errors.

This issue is fixed with this change, which correctly differentiates the
BFD spec cases according to the following mappings.

.spec.bfd.enabled = true

interface Ethernet1/1
  bfd interval ...

.spec.bfd.enabled = false

interface Ethernet1/1
  no bfd

.spec.bfd = nil

interface Ethernet1/1
  <absent>

It also covers some additional fixes related to BFD.

Fix nil pointer dereferences in EnsureISIS when accessing BFD.Enabled
on interfaces without BFD configuration.

Fix inverted BFD control logic in EnsureOSPF where .spec.bfd.enabled=true
was incorrectly mapped to OspfBfdCtrlDisabled and vice versa.

@felix-kaestner felix-kaestner requested a review from a team as a code owner March 25, 2026 17:11
@felix-kaestner felix-kaestner force-pushed the fix-bfd branch 2 times, most recently from 0d228ed to 13b131a Compare March 25, 2026 21:33
Commit 838ddc7 introduced a regression, where we would configure the BFD
of the interface unconditionally, even in the case where the feature is
not even activated, leading to `BFD feature is not enabled Commit Failed`
errors.

This issue is fixed with this change, which correctly differentiates the
BFD spec cases between enabled, disabled and nil/unspecified. It also
covers some additional fixes related to BFD.

Fix nil pointer dereferences in EnsureISIS when accessing BFD.Enabled
on interfaces without BFD configuration.

Fix inverted BFD control logic in EnsureOSPF where .spec.bfd.enabled=true
was incorrectly mapped to OspfBfdCtrlDisabled and vice versa.
@felix-kaestner felix-kaestner changed the title [NXOS] Only configure bfd on interfaces when features is enabled [NXOS] Fix bfd spec mapping to feature configuration Mar 25, 2026
@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 10.61% (-0.06%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/provider.go 0.06% (-0.00%) 1554 (+12) 1 1553 (+12) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Mar 26, 2026
@hardikdr hardikdr added this to Roadmap Mar 26, 2026
@felix-kaestner felix-kaestner merged commit 24f27fa into main Mar 26, 2026
10 checks passed
@felix-kaestner felix-kaestner deleted the fix-bfd branch March 26, 2026 10:34
@github-project-automation github-project-automation bot moved this to Done in Roadmap Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants