Skip to content

Fix Hyperdisk Resize That Requires Iops/Throughput Adjustment #2054

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 1 commit into from
Apr 22, 2025

Conversation

sunnylovestiramisu
Copy link
Contributor

@sunnylovestiramisu sunnylovestiramisu commented Apr 11, 2025

What type of PR is this?
/kind bug

What this PR does / why we need it:
Currently resizing for Hyperdisk is failing for cases that require IOPS or throughput getting updated in the same resize call.

Which issue(s) this PR fixes:
A hyperdisk-balanced with size 4Gi needs exactly 2000 IOPS, and 5Gi needs exactly 2500 IOPS. Disks 6Gi and more need a minimum of 3000 IOPS. When resizing a hyperdisk, there is a need to update IOPS as well.

For hyperdisk-extreme the min IOPS value is 2 IOPS per GiB, if a 64 GiB hyperdisk-extreme disk with 128 IOPS is resized to 65 GiB, the IOPS also need to be updated to 130.

For hyperdisk-ml it is more complicated, min IOPS is 16 IOPS per MBps of provisioned throughput, min throughput is the greater of 0.12 MBps per GiB and 400 MBps per disk. A 3334GiB hyperdisk-ml with 400 MBps throughput and initial 6400 IOPS resize to larger capacity will also need to update both throughput and IOPS.

Fixes #

Special notes for your reviewer:
Tested end to end in GCE clusters.

Type From Size to Size Notes
hyperdisk-balanced 4 Gib to 5Gi n4-standard-4 IOPS: 2000 -> 2500 Throughput: 140MB/s(no change)
hyperdisk-balanced 5Gi to 20Gi n4-standard-4 IOPS: 2500->3000 Throughput: 145MB/s(no change)
hyperdisk-balanced-high-availability 5Gi to 6Gi c3-standard-4 IOPS: 2500->3000 Throughput: 145MB/s(no change)
hyperdisk-extreme 64Gi to 70Gi IOPS: 128 to 140
hyperdisk-throughput 2Ti to 3Ti c3-standard-4 Throughput: 20MB/s to 30MB/s
hyperdisk-ml 3334Gi to 3500Gi c3-standard-4 Throughput: 400MB/s to 420MB/s

Does this PR introduce a user-facing change?:

Fix Hyperdisk Resize That Requires Iops/Throughput Adjustment

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 11, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 11, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 14, 2025
@sunnylovestiramisu sunnylovestiramisu force-pushed the resizeFix branch 3 times, most recently from f338a59 to e2f6679 Compare April 14, 2025 20:49
@sunnylovestiramisu
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-e2e

@sunnylovestiramisu sunnylovestiramisu force-pushed the resizeFix branch 2 times, most recently from 285b158 to 675de42 Compare April 14, 2025 23:32
@sunnylovestiramisu
Copy link
Contributor Author

/assign @msau42

@sunnylovestiramisu
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-verify

@sunnylovestiramisu
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-e2e

@mattcary
Copy link
Contributor

This should be easy to add an e2e test for the presubmit?

Let's submit this now though and add e2e later (which I think would be preferable to an internal GKE test).

The e2e test could just be for the simple HdB case, testing thoughput and such gets harder with machine compatibility.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 22, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattcary, sunnylovestiramisu

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:
  • OWNERS [mattcary,sunnylovestiramisu]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 2858b94 into kubernetes-sigs:master Apr 22, 2025
9 checks passed
@sunnylovestiramisu
Copy link
Contributor Author

/cherry-pick release-1.17

@k8s-infra-cherrypick-robot

@sunnylovestiramisu: #2054 failed to apply on top of branch "release-1.17":

Applying: Fix Hyperdisk Resize That Requires Iops/Throughput Adjustment
Using index info to reconstruct a base tree...
M	pkg/common/utils.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/common/utils.go
CONFLICT (content): Merge conflict in pkg/common/utils.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Fix Hyperdisk Resize That Requires Iops/Throughput Adjustment

In response to this:

/cherry-pick release-1.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

sunnylovestiramisu pushed a commit to sunnylovestiramisu/gcp-compute-persistent-disk-csi-driver that referenced this pull request Apr 22, 2025
…eFix

Fix Hyperdisk Resize That Requires Iops/Throughput Adjustment

(cherry picked from commit 2858b94)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants