Skip to content

[NXOS] Fix interface reconciliation loop#243

Merged
nikatza merged 1 commit intomainfrom
fix-interface-reconciliation
Mar 16, 2026
Merged

[NXOS] Fix interface reconciliation loop#243
nikatza merged 1 commit intomainfrom
fix-interface-reconciliation

Conversation

@nikatza
Copy link
Contributor

@nikatza nikatza commented Mar 15, 2026

No description provided.

@nikatza nikatza force-pushed the fix-interface-reconciliation branch 3 times, most recently from ea998c1 to d0e4b57 Compare March 15, 2026 11:17
@nikatza nikatza marked this pull request as ready for review March 15, 2026 11:17
@nikatza nikatza requested a review from a team as a code owner March 15, 2026 11:17
@nikatza nikatza changed the title [core] Fix interface reconciliation [NXOS] Fix interface reconciliation loop Mar 15, 2026
@nikatza nikatza force-pushed the fix-interface-reconciliation branch 2 times, most recently from e9ca1fb to 2082b47 Compare March 15, 2026 22:48
@hardikdr hardikdr added the area/metal-automation Automation processes within the Metal project. label Mar 16, 2026
@hardikdr hardikdr added this to Roadmap Mar 16, 2026
Copy link
Contributor

@felix-kaestner felix-kaestner left a comment

Choose a reason for hiding this comment

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

Thanks for this fix!

Could you add a little description when you merge why this change was done, i.e. that we currently update the configuration in YANG on every reconcile as we missed the default value of this field?

@nikatza nikatza force-pushed the fix-interface-reconciliation branch from 2082b47 to b2341f1 Compare March 16, 2026 08:44
… loop

Pysical interfaces are currently being continuosly reconciled because we
miss one of the default values. This happens because the method
EnsureInterface() calls Default() to initialize PhysIf structs. The
Default() method did not set FecMode, leaving it as empty string. This
caused a mismatch: the controller expected empty string while NX-OS
devices default to "auto". During reconciliation, GetConfig() would read
"auto" from the device but the desired config had "", triggering an
update.  As  NX-OS kept returning "auto", we got into  an infinite
reconciliation loop. Fixed by initializing FecMode to FecModeAuto in
Default() to match the NX-OS default.
@nikatza nikatza force-pushed the fix-interface-reconciliation branch from b2341f1 to d325dbb Compare March 16, 2026 08:52
@github-actions
Copy link

Merging this branch will not change overall coverage

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

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/intf.go 17.81% (-0.12%) 146 (+1) 26 120 (+1) 👎

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.

Changed unit test files

  • github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/intf_test.go

@nikatza nikatza merged commit d5135f7 into main Mar 16, 2026
11 checks passed
@nikatza nikatza deleted the fix-interface-reconciliation branch March 16, 2026 09:02
@github-project-automation github-project-automation bot moved this to Done in Roadmap Mar 16, 2026
@nikatza
Copy link
Contributor Author

nikatza commented Mar 16, 2026

Pysical interfaces are currently being continuosly reconciled because we
miss one of the default values. This happens because the method
EnsureInterface() calls Default() to initialize PhysIf structs. The
Default() method did not set FecMode, leaving it as empty string. This
caused a mismatch: the controller expected empty string while NX-OS
devices default to "auto". During reconciliation, GetConfig() would read
"auto" from the device but the desired config had "", triggering an
update. As NX-OS kept returning "auto", we got into an infinite
reconciliation loop. Fixed by initializing FecMode to FecModeAuto in
Default() to match the NX-OS default.

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

Labels

area/metal-automation Automation processes within the Metal project.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants