New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prevent calling register volume in parallel for same vmdk #1398
prevent calling register volume in parallel for same vmdk #1398
Conversation
|
@chethanv28 I have updated "testing done" section on the PR. Can you review this PR? |
|
[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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@chethanv28 can we merge this PR? |
|
Started vanilla Block pipeline... Build Number: 104 |
|
These failures are not related to the change. On the setup @chethanv28 we can merge this PR safely. |
|
/lgtm |
* prevent calling register volume in parallel for same vmdk (#1398) * Fix parsing of volume path (#1451) Remove datastore name from VolumePath using TrimPrefix. Trim will remove all matching characters from the end of the VolumePath, e.g. it can remove "vmdk" if the datastore name contains charactes "v", "m", "d" and "k" (anywhere in the datastore name). * v2.2.3-rc.1 yaml files * linter fixes Co-authored-by: Jan Šafránek <jsafrane@redhat.com>
* prevent calling register volume in parallel for same vmdk (#1398) * Fix parsing of volume path (#1451) Remove datastore name from VolumePath using TrimPrefix. Trim will remove all matching characters from the end of the VolumePath, e.g. it can remove "vmdk" if the datastore name contains charactes "v", "m", "d" and "k" (anywhere in the datastore name). * updating driver tags for v2.3.1-rc.1 release * linter fixes Co-authored-by: Jan Šafránek <jsafrane@redhat.com>
What this PR does / why we need it:
We have a bug in the FCD which might generate different FCD IDs for the same vmdk. If this happens, migrated volume is not guaranteed to be used with the cached Volume ID in the VolumeMigrationService.
This PR prevents calling Register Volume in parallel for the same vmdk.
This PR also prevents calling RegisterVolume from the CSI Controller Pod. Only the syncer container will be able to perform volume registration after this PR is merged. If for any reason, volume registration fails, the syncer container can attempt to re-register the volume during a full sync cycle. If vSphere CSI controller gets any call to operate on the migrated volume before it is registered, it will return an error, and CSI driver will retry the operation in the next attempt.
Testing done:
Verified enabling Migration when syncer is down, so migrated PV did not register before creating the Pod.
During Pod Creation, Controller Publish failed with an expected error.
and later when the syncer container has registered vmdk as FCD, attach operation succeeded.
cc: @bandyopadhyays-vmware @chethanv28
Release note: