Fix vPC pair physical interface deployment#338
Conversation
allenrobel
left a comment
There was a problem hiding this comment.
Code review
Reviewed the switch-scoped deploy refactor for correctness and CLAUDE.md compliance. Three findings inline: a missing workaround marker (CLAUDE.md-mandated), an unchecked 207 multi-status response that can mask per-switch deploy failures, and a now-stale custom_vpc_deploy docstring. No issues found in the integration-test or unit-test changes.
🤖 Generated with Claude Code
|
Hi Allen, Thanks for the review. I rechecked the physical vPC pair behavior against ND/UI. The earlier assumption was that physical peer-link vPC creation needed a different deploy path. After checking the actual UI/API behavior, that is not the real issue. The issue is not that physical peer-link vPC pairing needs a switch-level deploy workaround. The issue is that for VXLAN iBGP/eBGP fabrics, ND/UI only supports the simple pair payload with The UI itself does not send or accept I removed the switch deploy workaround from the PR. The PR now only blocks unsupported So the earlier comments on So the original switch-level deploy workaround is no longer needed. I removed that change from the PR. The PR now focuses only on validating the input earlier:
Kindly re-review the updated diff when you get a chance and also share your comments on this |
Have re-reviewed based on your analysis of the root cause and this looks good. Thank you @sivakasi-cisco! |
sivakasi-cisco
left a comment
There was a problem hiding this comment.
Addressed the comments
60e52b5 to
2c055e1
Compare
High:
|
… strip inherited details on blocked fabrics, gate detail-bearing integration cases and TC23b assertions
Changed failed_when: false → ignore_errors: true so the failure is actually captured; gated the fabric-detail test cases TC1, 7, 8, 12, 13 and 23b so they only run on fabrics that support them. For example, on an eBGP VXLAN fabric, when it was senidng the whole vpc_pair_details which is rejected by module and gets aborted. Now, it is skipped there and asserts with the rejection message. |
Fixed them up to use respective deploy method. Now, we look up the fabric and only deploy the switches that are actually out of sync via ../switchActions/deploy for type:switch. The global still does the whole-fabric deploy. Save stays on configSave for both. Added unit tests for the endpoint + payload of each scope. Not deferred to #368 anymore |
|
Verified the changes with IT on the latest changes |
Related Issue(s)
Problem Statement
The nd_manage_vpc_pair was failing when creating a vPC pair with a physical peer-link.
The vpc_pair module was able to tell ND what vPC pair we wanted, but the final deploy step failed before the configuration could actually be pushed to the switches. This only happened for physical peer-links with member interfaces. Virtual peer-links were working fine.
Root cause
The module was using the fabric-level deploy flow:
actions/configSave+actions/deployThat path fails in ND for physical vPC peer-link creation because ND tries to generate the configuration fabric-wide and incorrectly reports that the peer-link member port is already part of the vPC pair.
The same configuration works when deployed directly at the switch level using
switchActions/deploySo the problem was the deploy API path being used.Proposed Changes
Updated
nd_manage_vpc_pairso the default switch-scoped deployment usesswitchActions/deploywith the affected switch serial numbers.This means the module now asks ND to deploy only to the switches involved in the vPC pair, which avoids the failing fabric-level config-save path and allows physical peer-link vPC pair creation to complete successfully.
The fabric-level deploy path is still kept for global deployment mode or fallback cases.
Test Notes
Updated the vPC pair integration task assertions for merge, replace, override, and delete flows to verify that switch-level deployment uses
/switchActions/deployinstead of the fabric-level/actions/configSavepath.