kubernetes/pkg/volume
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
..
aws_ebs Implement volume plugin changes for volume limits 2018-06-01 19:17:30 -04:00
azure_dd Merge pull request #63270 from andyzhangx/volume-partition-azure-fix 2018-06-04 00:47:26 -07:00
azure_file Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
cephfs fix cephfs fuse mount bug when use is not admin 2018-03-28 09:20:32 +08:00
cinder API updates for Cinder Volumes to support for user specified Secrets in the future 2018-06-02 22:16:50 -04:00
configmap Fix nested volume mounts for read-only API data volumes 2018-02-27 07:41:39 -07:00
csi CSI fix for gRPC conn leak, test updates 2018-05-31 23:05:41 -04:00
downwardapi Use filepath.Clean() instead of path.Clean() 2018-04-17 10:44:30 +08:00
empty_dir Use consts defined in api instead of defining another ones. 2018-02-28 00:40:58 +08:00
fc Return error in mount_unsupported for unsupported platforms 2018-03-29 14:17:07 -07:00
flexvolume Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
flocker Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
gce_pd Implement volume plugin changes for volume limits 2018-06-01 19:17:30 -04:00
git_repo GitRepo command hardening 2018-06-01 12:42:53 -07:00
glusterfs Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
host_path Merge pull request #64447 from jsafrane/block-provision 2018-06-01 12:12:23 -07:00
iscsi Fix iSCSI and RBD UnmountDevice with mount containers. 2018-05-09 09:52:37 +02:00
local Merge pull request #62903 from cofyc/fixfsgroupcheckinlocal 2018-05-02 20:13:11 -07:00
nfs pkg/volume/nfs/nfs.go: correct error messages. 2018-03-05 12:12:51 +01:00
photon_pd Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
portworx Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
projected Fix nested volume mounts for read-only API data volumes 2018-02-27 07:41:39 -07:00
quobyte Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
rbd Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
scaleio Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
secret Fix nested volume mounts for read-only API data volumes 2018-02-27 07:41:39 -07:00
storageos Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
testing implement kubelet side online file system resize for volume 2018-05-31 17:10:24 +08:00
util Implement volume plugin changes for volume limits 2018-06-01 19:17:30 -04:00
validation Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
vsphere_volume Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
BUILD Report events to apiserver in local volume plugin. 2018-04-18 11:19:36 +08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
metrics_cached.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
metrics_du.go update import 2018-02-27 20:23:35 +08:00
metrics_du_test.go switch from package syscall to x/sys/unix 2017-07-21 12:14:42 +02:00
metrics_errors.go Disambiguate unsupported metrics from metrics errors 2016-09-15 10:05:30 +10:00
metrics_nil.go Disambiguate unsupported metrics from metrics errors 2016-09-15 10:05:30 +10:00
metrics_nil_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
metrics_statfs.go update import 2018-02-27 20:23:35 +08:00
metrics_statfs_test.go add volume timestamps 2017-03-02 15:01:59 -08:00
OWNERS Update volume OWNERS to reflect active sig-storage reviewers 2017-10-26 13:26:33 -07:00
plugins.go Implement volume plugin changes for volume limits 2018-06-01 19:17:30 -04:00
plugins_test.go correct the expected value in plugintest 2018-02-25 15:14:55 +08:00
volume.go Add GetSELinuxSupport to mounter. 2018-05-17 13:36:37 +02:00
volume_linux.go Add more volume types in e2e and fix part of them. 2018-05-02 10:31:42 +08:00
volume_unsupported.go Add more volume types in e2e and fix part of them. 2018-05-02 10:31:42 +08:00