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.
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
In-Tree to CSI Migration logic for PersistentVolume Attach/Detach #69830
In-Tree to CSI Migration logic for PersistentVolume Attach/Detach #69830
Changes from all commits
5dde1df
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im wondering why do we need to
MarkVolumeAsAttached
withoriginalSpec
but not migrated spec?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since in desired state of world the desired volume is the original volume, we want to mark the original volume as attached. Otherwise the reconciler will continuously try to attach the object since we "desire the in-tree volume to be attached" and we have "actually attached the CSI volume"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the easiest is to mandate that migration of PVs and inline volumes for a plugin must happen at the same time. Otherwise it gets really messy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is hard to do that since CSI In-line volume support is also going alpha this quarter so the dependency there is kind of tight. I guess during Q4 alpha of migration this specific functionality can be broken and fixed in 1.14. It is a non-standard codepath anyway (only hit on A/D controller restart when pod was deleted in meantime).
/cc @saad-ali
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coupling this feature with the CSI inline feature will slow everything down. This case is an edge case. Let's document it as a known issue with the alpha release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok for alpha to develop them separately, but IMO inline volumes should go beta and GA before or together with the migration. It's not full feature if you migrate just the easier part :-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsafrane we plan to have in-line volumes migrated by Q1 for alpha as well. Ideally they will go Beta together Q2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feels its more explicit/simply to do a translation from in-tree volume name to csi volume name in this case. This could be a new method provided by translation library. With this, the magic
isAttachment
logic in csi plugin is also avoided.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm I think this might be possible:
For example for GCE the volume name will be the
PDName
, for CSI it will bedriverName^volumeHandle^
where the volume handle is the volume ID the driver returns which for GCE contains the project, zone, and PDName.However I dont know if all volumes will be able to have all the information from the volume name translated from in-tree to CSI and vice-versa...