mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-15 01:22:24 +00:00
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix formatAndMount func issue on Windows **What this PR does / why we need it**: disk format code is missing in formatAndMount func on Windows, currently it only has mount related code:b87a392b1a/pkg/util/mount/mount_windows.go (L356-L377)format code is now here, which is not correct(invoked in `azuredisk.WaitForAttach` operation, it's not correct, these code should be in `formatAndMount` func and invoked by `MountDevice` operation finally)b87a392b1a/pkg/volume/azure_dd/azure_common_windows.go (L100-L117)**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #63236 **Special notes for your reviewer**: This is the first PR, in second PR, I will remove disk format code in azure_common_windows.gob87a392b1a/pkg/volume/azure_dd/azure_common_windows.go (L100-L117)Also need to mention that there would not be issue if following command invoked twice(by `WaitForAttach` and `formatAndMount`) ``` Get-Disk -Number 4 | Where partitionstyle -eq 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem ntfs -Confirm:$false ``` **Release note**: ``` fix formatAndMount func issue on Windows ``` /sig windows /assign @rootfs cc @msau42