Skip to content

report capacity after volume expansion to Block-mode PVC #1061

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

Merged
merged 2 commits into from
Jun 25, 2025

Conversation

molpako
Copy link
Contributor

@molpako molpako commented Jun 20, 2025

When node-expansion disabled for block-mode PVC, the external-resizer receives the expanded volume capacity and sets it as the PVC status.

This change modifies TopoLVM driver's ControllerExpandVolume to report the expanded volume capacity in such cases.

@molpako molpako requested a review from a team as a code owner June 20, 2025 08:24
@molpako molpako requested review from pluser and skoya76 June 20, 2025 08:24
@molpako molpako requested review from llamerada-jp and ushitora-anqou and removed request for pluser and skoya76 June 20, 2025 08:24
@llamerada-jp llamerada-jp marked this pull request as draft June 20, 2025 08:36
@llamerada-jp llamerada-jp moved this from To do to In progress in Development Jun 20, 2025
If volumeMode is set to Block, executing NodeExpandVolume to expand
filesystem is unnecessary.

Signed-off-by: Kyori Sakao <sakaok@cybozu.co.jp>
@molpako molpako force-pushed the fix/1039-controllerexpandvolume-return-acualsize branch from a83fadd to 3686165 Compare June 20, 2025 14:27
@molpako molpako changed the title fix: return actual lv size from ControllerExpandVolume report capacity after volume expansion to block-mode PVC Jun 20, 2025
@molpako molpako changed the title report capacity after volume expansion to block-mode PVC report capacity after volume expansion to Block-mode PVC Jun 22, 2025
@@ -638,13 +638,14 @@ func (s controllerServerNoLocked) ControllerExpandVolume(ctx context.Context, re
currentSize = &lv.Spec.Size
}

_, nodeExpansionRequired := req.VolumeCapability.GetAccessType().(*csi.VolumeCapability_Mount)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose a variable name that emphasizes its intended use rather than a state-like name such as isMount. Please let me know if you have any feedback.

Signed-off-by: Kyori Sakao <sakaok@cybozu.co.jp>
@molpako molpako force-pushed the fix/1039-controllerexpandvolume-return-acualsize branch from 3686165 to 6deddfa Compare June 23, 2025 00:24
@molpako molpako marked this pull request as ready for review June 23, 2025 02:46
@peng225 peng225 moved this from In progress to Review in progress in Development Jun 23, 2025
@llamerada-jp llamerada-jp merged commit cd1179b into main Jun 25, 2025
24 checks passed
@llamerada-jp llamerada-jp deleted the fix/1039-controllerexpandvolume-return-acualsize branch June 25, 2025 02:04
@github-project-automation github-project-automation bot moved this from Review in progress to Done in Development Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants