Uh oh!
There was an error while loading. Please reload this page.
fix: preserve backend volume associations during reconciliation - #1167
fix: preserve backend volume associations during reconciliation#1167s-starostin wants to merge 1 commit into
Conversation
torirevilla
commented
Jul 16, 2026
If you wish to contribute to Trident please complete the necessary steps outlined in the CONTRIBUTING.md file, including the signed CCLA. Sign and submit NetApp's Contributor License Agreement. You must sign and submit the Corporate Contributor License Agreement (CCLA) in order to contribute. |
s-starostin
commented
Jul 16, 2026
Thanks. The CCLA has been submitted for VI.Tech and includes my GitHub username, @s-starostin. Please let me know if any additional information is required. |
s-starostin
commented
Jul 27, 2026
Hi @torirevilla, just a friendly follow-up. The CCLA was submitted almost two weeks ago and includes my github username. Could you please confirm whether it has been processed and whether the PR is ready for review? Thanks! |
sjpeeris
commented
Jul 29, 2026
Hi @s-starostin Thanks for submitting CCLA. We will review the PR soon. |
Change description
Preserve backend volume associations during concurrent backend reconciliation.
When controller concurrency is enabled, periodic backend reconciliation may replace an existing backend object with a newly initialized backend object. The replacement backend starts with an empty backend-local volume map.
The global volume cache remains intact, so
tridentctl get volumecontinues to return all managed volumes with the correct backend UUIDs. However,tridentctl get backendreportsVOLUMES=0because the replacement backend no longer contains the existing volume associations.The empty backend-local volume map may also affect node access reconciliation because backend volume associations are consulted before the replacement backend is written to the concurrent cache.
This change copies the existing backend-local volume associations from the original backend to the replacement backend before node access reconciliation and cache replacement.
The copy is performed entirely in memory and does not call the storage driver for every volume. Explicit backend update workflows continue to use the existing volume validation path where storage-side validation is required.
Fixes#1166
Project tracking
External community bug fix tracked by GitHub issue #1166 .
Do any added TODOs have an issue in the backlog?
No TODOs added.
Did you add unit tests? Why not?
Yes.
Added focused unit coverage for copying backend volume associations, including:
Extended concurrent backend reconciliation coverage to verify that a backend replacement caused by a backend pools change preserves all existing backend volume associations.
The regression test verifies that both the global volume cache and the replacement backend-local volume map remain populated after
reconcileBackendState.Does this code need functional testing?
Yes.
Targeted functional validation is recommended because the issue is triggered by periodic backend reconciliation with controller concurrency enabled.
The functional validation should:
tridentctl get backendreports the expected volume counts after bootstrap.tridentctl get volumecontinues to return the same volumes and backend UUIDs.Is a code review walkthrough needed? why or why not?
Yes, a brief walkthrough is recommended.
The code change is small, but its placement is important. Existing volume associations must be copied to the replacement backend before node access reconciliation and before the backend is replaced in the concurrent cache.
The walkthrough should also confirm that the existing concurrent cache locking guarantees prevent volume association changes while the backend replacement is in progress.
Should additional test coverage be executed in addition to pre-merge?
Yes.
In addition to the standard pre-merge test suite, run the focused concurrent-core tests with the Go race detector and repeat the reconciliation regression test multiple times.
Recommended validation:
Does this code need a note in the changelog?
/needs-changelog
This affects backend state reporting and backend-to-volume associations when controller concurrency is enabled.
Changelog
Fixed concurrent backend reconciliation to preserve existing backend volume associations when replacing a backend object.
Does this code require documentation changes?
No.
Additional Information
The issue was reproduced with controller concurrency enabled.
Observed behavior:
onlineandnormal;tridentctl get backendreportedVOLUMES=0;volumesarrays;tridentctl get volumecontinued to return all managed volumes with valid backend UUIDs;The behavior was reproduced on released versions v26.02.1 and v26.06.0.
Example observed state on v26.06.0:
At the same time, the global volume cache remained populated: