Skip to content

fix: adjust the batch size as per the number of disks allowed #3039

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

Conversation

nearora-msft
Copy link
Contributor

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

Release note:

none

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 19, 2025
@k8s-ci-robot k8s-ci-robot requested review from cvvz and ZeroMagic April 19, 2025 17:57
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 19, 2025
@nearora-msft
Copy link
Contributor Author

/test all

Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

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

thanks for the PR, I have left some comments.

@andyzhangx
Copy link
Member

andyzhangx commented Apr 21, 2025

btw, the original Elastic issue is mainly contributed by retry-after value returned by CRP during polling, this MaximumDataDisksExceeded error still happens some times, and from the CRP logs, I could see the next VMScaleSetVMs.VMScaleSetVMsOperation.PUT would succeed very soon in a few seconds, that means it could recover very soon.

On the other hand, I think this PR is still valuable which could make most disk attach succeed in the beginning. Thanks for the fix.

@nearora-msft nearora-msft force-pushed the nearora/batching_fixes branch from 8b880e3 to 186c5c0 Compare May 2, 2025 16:53
@nearora-msft nearora-msft force-pushed the nearora/batching_fixes branch from 186c5c0 to 6a08037 Compare May 2, 2025 18:03
@nearora-msft nearora-msft marked this pull request as ready for review May 2, 2025 18:12
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 2, 2025
@k8s-ci-robot k8s-ci-robot requested a review from andyzhangx May 2, 2025 18:12
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 6, 2025
@nearora-msft
Copy link
Contributor Author

/retest

1 similar comment
@andyzhangx
Copy link
Member

/retest

@@ -444,16 +445,16 @@ func (d *Driver) NodeGetInfo(ctx context.Context, _ *csi.NodeGetInfoRequest) (*c
}, nil
}

func getMaxDataDiskCount(instanceType string) int64 {
func getMaxDataDiskCount(instanceType string) (int64, bool) {
Copy link
Member

@andyzhangx andyzhangx May 7, 2025

Choose a reason for hiding this comment

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

can you add ut for returned bool value check in another PR? thx

Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

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

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, nearora-msft

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2025
@k8s-ci-robot k8s-ci-robot merged commit cfc77ad into kubernetes-sigs:master May 7, 2025
22 checks passed
@andyzhangx
Copy link
Member

/cherrypick release-1.32

@andyzhangx
Copy link
Member

/cherrypick release-1.31

@k8s-infra-cherrypick-robot

@andyzhangx: #3039 failed to apply on top of branch "release-1.31":

Applying: fix: remove disks from the batch if it exceeds maxdatadisks limit
Applying: Revert "fix: wait for detach disk finish first"
Using index info to reconstruct a base tree...
M	pkg/azuredisk/azure_controller_common.go
M	pkg/azuredisk/azure_controller_common_test.go
M	pkg/azuredisk/azuredisk.go
M	pkg/azuredisk/controllerserver.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/azuredisk/controllerserver.go
Auto-merging pkg/azuredisk/azuredisk.go
Auto-merging pkg/azuredisk/azure_controller_common_test.go
Auto-merging pkg/azuredisk/azure_controller_common.go
Applying: address review comments
Using index info to reconstruct a base tree...
M	pkg/azuredisk/azure_controller_common.go
M	pkg/azuredisk/azuredisk.go
M	pkg/azuredisk/controllerserver.go
M	pkg/azuredisk/nodeserver.go
M	pkg/azuredisk/nodeserver_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/azuredisk/nodeserver_test.go
Auto-merging pkg/azuredisk/nodeserver.go
Auto-merging pkg/azuredisk/controllerserver.go
Auto-merging pkg/azuredisk/azuredisk.go
Auto-merging pkg/azuredisk/azure_controller_common.go
CONFLICT (content): Merge conflict in pkg/azuredisk/azure_controller_common.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 0003 address review comments

In response to this:

/cherrypick release-1.31

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.

@k8s-infra-cherrypick-robot

@andyzhangx: new pull request created: #3073

In response to this:

/cherrypick release-1.32

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.

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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants