kubernetes/pkg
Kubernetes Submit Queue 1635393bd1
Merge pull request #63270 from andyzhangx/volume-partition-azure-fix
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 data loss issue if using existing azure disk with partitions in disk mount 

**What this PR does / why we need it**:
When use an existing azure disk(also called [static provisioning](https://github.com/andyzhangx/demo/tree/master/linux/azuredisk#static-provisioning-for-azure-disk)) in pod, if that disk has multiple partitions, the disk will be formatted in the pod mounting.

This PR removes `formatIfNotFormatted` func in `WaitForAttach` which uses `lsblk` command to check whether disk is formatted or not
b87a392b1a/pkg/volume/azure_dd/azure_common_linux.go (L213-L215)

And finally the format disk operation will happen in `MountDevice` in which it uses common k8s code(`SafeFormatAndMount.GetDiskFormat`) using `blkid` to detect disk format, `blkid` could detect multiple partitions
b87a392b1a/pkg/util/mount/mount_linux.go (L541-L543)

 - so if we use common k8s code(`SafeFormatAndMount.GetDiskFormat`), following error will be returned for mulitple partition disks, which is expected:

**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 #63235

**Special notes for your reviewer**:
This PR depends on https://github.com/kubernetes/kubernetes/pull/63248

**Release note**:

```
fix data loss issue if using existing azure disk with partitions in disk mount 
```

/sig azure
/assign @khenidak
2018-06-04 00:47:26 -07:00
..
api API updates for Cinder Volumes to support for user specified Secrets in the future 2018-06-02 22:16:50 -04:00
apis Updated generated files 2018-06-02 22:20:39 -04:00
auth add myself as an approver in various auth related directories 2018-05-17 11:32:37 -07:00
capabilities Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
client Autogenerated code 2018-05-15 21:38:54 +02:00
cloudprovider Merge pull request #64528 from MrHohn/gce-backend-service-beta 2018-05-30 22:54:15 -07:00
controller Merge pull request #64368 from justinsb/ccm_instanceid_fix 2018-06-02 04:48:38 -07:00
credentialprovider Use new clients in Azure credential provider 2018-04-26 09:38:48 +08:00
features Merge pull request #64154 from gnufied/impelemnt-volume-count 2018-06-02 06:30:19 -07:00
fieldpath Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
generated Generated 2018-05-12 02:01:09 -04:00
kubeapiserver Merge pull request #64326 from andrewsykim/default-disable-pvl 2018-05-28 03:19:17 -07:00
kubectl Merge pull request #64573 from juanvallejo/jvallejo/remove-extraneous-path-shortcuts 2018-06-02 06:30:16 -07:00
kubelet Merge pull request #64644 from Random-Liu/address-comments-in-#64006 2018-06-03 06:31:26 -07:00
kubemark Remove signal handler registration from pkg/kubelet 2018-05-24 20:44:12 +01:00
master Merge pull request #63774 from wgliang/master.test-master 2018-05-31 14:12:18 -07:00
printers API updates for Cinder Volumes to support for user specified Secrets in the future 2018-06-02 22:16:50 -04:00
probe Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
proxy Merge pull request #61077 from islinwb/fix_ipvs_warninfo 2018-05-31 20:01:26 -07:00
quota Resources prefixed with *kubernetes.io/ should remain unscheduled if they are not exposed on the node. 2018-03-28 17:24:30 -07:00
registry Merge pull request #64639 from sttts/sttts-int64-json 2018-06-02 06:30:22 -07:00
routes Remove /ui/ redirect 2018-02-12 10:54:33 -05:00
scheduler Implement scheduler changes for volume limits 2018-06-01 19:17:31 -04:00
security Replace UserIDRange/GroupIDRange by IDRange in internal type to reduce difference with external type. 2018-05-04 18:31:42 +02:00
securitycontext remove unused code in securitycontext 2018-03-29 23:32:48 -07:00
serviceaccount add myself as an approver in various auth related directories 2018-05-17 11:32:37 -07:00
ssh Use Dial with context 2018-05-19 08:14:37 +10:00
util Merge pull request #63248 from andyzhangx/formatAndMount-windows 2018-06-01 21:25:57 -07:00
version Require boilerplate on Bazel Skylark source files 2018-02-16 13:44:04 -08:00
volume Merge pull request #63270 from andyzhangx/volume-partition-azure-fix 2018-06-04 00:47:26 -07:00
watch/json remove outdate package 2018-01-15 23:17:19 +08:00
windows/service Add support for binaries to run as Windows services 2018-03-07 00:51:36 +01:00
.import-restrictions
BUILD pkg/api/unversioned related cleanup 2018-03-13 17:20:16 +08:00
OWNERS