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.
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 think we should return an error in ConstructVolumeSpec() instead if we can't support reconstruction, like here.
This will cause the Unmount() to happen, which will fix the filesystem-based paths, however block-based paths will not work because UnmountDevice() is still not called.
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.
Does raw block reconstruction have a similar issue? We don't have tests for raw block reconstruction: #74545
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.
cc @gnufied
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 discussed some more with @jingxu97, and she pointed out that even if we return error in ConstructVolumeSpec(), the volumeSpec will still be nil here, so we still need this check.
It looks like this check was introduced as part of CSI migration. 1) This should be feature gated, and 2) can
useCSIPlugin
return false if volume spec is nil? Does that make sense for all operations? cc @davidz627There 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.
for 1) I've submitted a PR to make sure we do the migration feature gate check before doing anything else.
For 2) I think I need to do some more investigation and address it in the CSI Migration Reconstruction design.