kubernetes-sigs / azuredisk-csi-driver

Azure Disk CSI Driver
Apache License 2.0
147 stars 192 forks source link

fix: resize failure when cloning a volume with bigger size on Windows #2503

Closed andyzhangx closed 2 months ago

andyzhangx commented 2 months ago

What type of PR is this? /kind bug

What this PR does / why we need it: fix: resize failure when cloning a volume with bigger size on Windows

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

``` I0911 03:33:45.082561 8340 utils.go:105] GRPC call: /csi.v1.Node/NodeStageVolume I0911 03:33:45.082588 8340 utils.go:106] GRPC request: {"publish_context":{"LUN":"3"},"staging_target_path":"\\var\\lib\\kubelet\\plugins\\kubernetes.io\\csi\\disk.csi.azure.com\\72bb2b07b6028371cea50fb631344dc9113f0846681814572edb765f698195da\\globalmount","volume_capability":{"AccessType":{"Mount":{}},"access_mode":{"mode":7}},"volume_context":{"csi.storage.k8s.io/pv/name":"pvc-3842e94f-15b1-41fa-80aa-407b03b6f624","csi.storage.k8s.io/pvc/name":"pvc-azuredisk-cloning2","csi.storage.k8s.io/pvc/namespace":"default","requestedsizegib":"20","resizeRequired":"true","skuName":"StandardSSD_LRS","storage.kubernetes.io/csiProvisionerIdentity":"1725956355085-3370-disk.csi.azure.com","tags":"dmFsdWUtMiwgdmFsdWUtMwo="},"volume_id":"/subscriptions/b9d2281e-dcd5-4dfd-9a97-0d50377cdf76/resourceGroups/MC_andy-aks129_andy-aks129_eastus2/providers/Microsoft.Compute/disks/pvc-3842e94f-15b1-41fa-80aa-407b03b6f624"} W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Bus=0 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Device=63667 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Function=30747 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Port=0 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Bus=0 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Device=63667 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Function=30747 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Port=0 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Bus=0 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Device=63667 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Function=30747 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Port=0 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Bus=0 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Device=63667 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Function=30747 W0911 03:33:48.937290 8340 disk.go:87] Got unknown field : Port=0 I0911 03:33:48.937290 8340 nodeserver.go:157] NodeStageVolume: formatting 5 and mounting at \var\lib\kubelet\plugins\kubernetes.io\csi\disk.csi.azure.com\72bb2b07b6028371cea50fb631344dc9113f0846681814572edb765f698195da\globalmount with mount options([]) I0911 03:33:53.653154 8340 disk.go:363] Disk 5 already initialized I0911 03:33:55.585607 8340 disk.go:380] Disk 5 already partitioned I0911 03:34:04.266556 8340 nodeserver.go:161] NodeStageVolume: format 5 and mounting at \var\lib\kubelet\plugins\kubernetes.io\csi\disk.csi.azure.com\72bb2b07b6028371cea50fb631344dc9113f0846681814572edb765f698195da\globalmount successfully. I0911 03:34:04.266556 8340 nodeserver.go:175] NodeStageVolume: fs resize initiating on target(\var\lib\kubelet\plugins\kubernetes.io\csi\disk.csi.azure.com\72bb2b07b6028371cea50fb631344dc9113f0846681814572edb765f698195da\globalmount) volumeid(/subscriptions/b9d2281e-dcd5-4dfd-9a97-0d50377cdf76/resourceGroups/MC_andy-aks129_andy-aks129_eastus2/providers/Microsoft.Compute/disks/pvc-3842e94f-15b1-41fa-80aa-407b03b6f624) E0911 03:34:07.707909 8340 utils.go:110] GRPC error: rpc error: code = Internal desc = NodeStageVolume: could not resize volume 5 (\var\lib\kubelet\plugins\kubernetes.io\csi\disk.csi.azure.com\72bb2b07b6028371cea50fb631344dc9113f0846681814572edb765f698195da\globalmount): error getting sizemin,sizemax from mount. cmd: Get-Volume -UniqueId "$Env:volumeID" | Get-partition | Get-PartitionSupportedSize | Select SizeMax | ConvertTo-Json, output: Get-Volume : No MSFT_Volume objects found with property 'UniqueId' equal to '5'. Verify the value of the property and ```

Release note:

fix: resize failure when cloning a volume with bigger size on Windows
k8s-ci-robot commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

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](https://github.com/kubernetes-sigs/azuredisk-csi-driver/blob/master/OWNERS)~~ [andyzhangx] 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 commented 2 months ago

@andyzhangx: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-azuredisk-csi-driver-external-e2e-single-az 752dff7d8e7008167ce298826316bb9ce454c9aa link true /test pull-azuredisk-csi-driver-external-e2e-single-az
pull-azuredisk-csi-driver-e2e-capz-windows-2019-hostprocess 752dff7d8e7008167ce298826316bb9ce454c9aa link true /test pull-azuredisk-csi-driver-e2e-capz-windows-2019-hostprocess

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
andyzhangx commented 2 months ago

/cherrypick release-1.30

andyzhangx commented 2 months ago

/cherrypick release-1.29

andyzhangx commented 2 months ago

/cherrypick release-1.28

k8s-infra-cherrypick-robot commented 2 months ago

@andyzhangx: new pull request created: #2504

In response to [this](https://github.com/kubernetes-sigs/azuredisk-csi-driver/pull/2503#issuecomment-2343182801): >/cherrypick release-1.30 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
k8s-infra-cherrypick-robot commented 2 months ago

@andyzhangx: new pull request created: #2505

In response to [this](https://github.com/kubernetes-sigs/azuredisk-csi-driver/pull/2503#issuecomment-2343182982): >/cherrypick release-1.29 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
k8s-infra-cherrypick-robot commented 2 months ago

@andyzhangx: new pull request created: #2506

In response to [this](https://github.com/kubernetes-sigs/azuredisk-csi-driver/pull/2503#issuecomment-2343183095): >/cherrypick release-1.28 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.