Files
kubernetes/pkg/util
Kubernetes Submit Queue 2aced6d9e4 Merge pull request #63248 from andyzhangx/formatAndMount-windows
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.go
b87a392b1a/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
2018-06-01 21:25:57 -07:00
..
2018-02-16 13:43:01 -08:00
2018-02-27 11:18:11 -08:00
2018-02-16 13:43:01 -08:00
2018-02-16 13:43:01 -08:00
2018-02-16 13:43:01 -08:00
2018-02-15 18:04:04 -05:00
2017-12-23 13:12:11 -08:00
2018-02-16 13:43:01 -08:00
2017-10-15 18:18:13 -07:00
2018-05-22 11:20:47 +08:00
2017-10-15 18:18:13 -07:00
2018-02-27 11:18:11 -08:00
2018-02-16 13:43:01 -08:00
2018-02-16 13:43:01 -08:00
2018-05-23 10:21:21 +02:00
2018-02-16 13:43:01 -08:00
2018-05-30 11:15:47 -07:00
2018-05-23 10:21:20 +02:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2018-02-16 13:43:01 -08:00
2017-10-15 18:18:13 -07:00
2017-12-23 13:12:11 -08:00
2017-10-15 18:18:13 -07:00
2018-05-30 11:15:47 -07:00