Closed divyenpatel closed 1 month ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: chethanv28, divyenpatel
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/hold
/hold cancel
What this PR does / why we need it: We have a bug in the vSphere CSI Driver full sync logic for TKC volumes. During each full sync, the update volume metadata API is called unnecessarily for every TKC volume, even when there is no metadata to update.
The root cause of this issue lies in the isUpdateRequired function, which checks whether the ClusterDistribution is set on the volume. This check was introduced to populate the ClusterDistribution field for vSphere 7.0u2 and above. ClusterDistribution is incorrectly considered unset when the ContainerClusterArray contains two entry, which is consistently the case for TKC volumes. As a result, the UpdateVolume metadata API is invoked for every TKC volume during each full sync cycle.
This PR is fixing full sync in the supervisor cluster for TKC volumes for which continues update volume metadata calls were observed.
Testing done: Unit tests result
Verified full log is no longer observing update required for the TKC volumes: b5a149bd-b566-4426-91da-e5ba236b5fbd, 81e34368-bc19-46ac-ad0c-b528c8ffb4a3 and 423f2387-fe31-4503-8c6d-9657bfb2f313
Logs after the fix
Logs before the fix
Special notes for your reviewer:
Release note: