fix for replacing cluster id with new supervisor id #3175
+87
−77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
When TKG-HA feature was introduced in the vCenter, we changed cluster-id to supervisor-id, as with TKGS-HA we have support for stretching supervisor to multiple clusters.
We have a code in the full sync to update volume metadata with older cluster-id with new supervisor-id. Unfortunately we used QueryAllVolume API to fetch metadata, but QueryAllVolume API does not return metadata.
We need to fix this by calling QueryVolumeAsync API with list of VolumeIDs with older cluster id to fetch metdata and then issue update volume metadata with new supervisor cluster id.
Without this fix, we see CreateVolume API calls happening for volumes created using older cluster-id before upgrade.
Every full sync is issuing unnecessary create volume calls with new supervisor, as volumes are not updated with new supervisor-id. and all these CreateVolume calls are failing with CnsAlreadyRegisteredFault.
Testing done:
Created Volume with new Supervisor-ID.
From Backend changed Supervisor-ID to Older Cluster-ID which is Cluster-Moref
Applied this change.
Observed two UpdateVolumemetadata calls which replaced cluster id with new supervisor-id
Special notes for your reviewer:
Release note: