Commit Graph

1499 Commits (08c127d4eb3349df0428e07e0c58f8b8860ad0a1)

Author SHA1 Message Date
PiotrProkop 8465f96d8d Fix pagesize mount option name 2017-09-12 14:34:39 +02:00
andyzhangx 2a9cb3842c fix azure disk mounter issue
change loginfo level from 2 to 4
2017-09-12 02:01:51 +00:00
xiazhang 82c909cc99 enable azure disk mount on windows node
add initial work for mount azure file on windows

fix review comments

full implementation for attach azure file on windows node

working azure file mount

remove useless functions

add a workable implementation about mounting azure file on windows node

fix review comments and make the pod creating successful even azure file mount failed

fix according to review comments

add mount_windows_test

add implementation for IsLikelyNotMountPoint func

remove mount_windows_test.go temporaly

add back unit test for mount_windows.go

add normalizeWindowsPath func

fix normalizeWindowsPath func issue

implment azure disk on windows

update bazel BUILD

revert validation.go change as it's another PR

fix merge issue and compiling issue

fix windows compiling issue

fix according to review comments

fix according to review comments

fix cross-build failure

fix according to review comments

fix test build failure temporalily

fix darwin build failure

fix azure windows test failure

add empty implementation of MakeRShared on windows

fix gofmt errors
2017-09-12 01:52:48 +00:00
Hemant Kumar 77be9123f7 Fix glusterfs creating volumes in GiB
As per glusterfs documentation it can't create
volumes in GiB and all sizes must be specified in GB.

This code was slightly buggy because we were creating
volumes of sizes lesser than user asked for
2017-09-11 16:25:28 -04:00
Hemant Kumar 7e8b4a2d60 Glusterfs expands in units of GB not GiB 2017-09-11 14:04:04 -04:00
Yecheng Fu 8fa92e48a8 RBD Plugin: Omit volume.MetricsProvider field and add some testcases. 2017-09-11 02:18:52 +00:00
Di Xu 29249e0891 suspect nil pointer for HostPathType 2017-09-10 22:57:10 +08:00
Aditya Dani a967937ac5 Portworx driver changes dependent on updated vendor'ed code. 2017-09-09 19:45:28 +01:00
Vladimir Vivien 314859538e ScaleIO - Specify SDC GUID value via node label
The commit allow ScaleIO volume plugin to read SDC GUID value as a node label.
If binary drv_cfg is not installed, the plugin will still work properly.
If node label not found, it defaults to drv_cfg if installed.
2017-09-07 16:44:32 -04:00
Lars Lehtonen 5cc930a7fa
Move error check in TestFindDeviceForPath() 2017-09-07 12:20:12 -07:00
Jordan Liggitt 808c31ae1e
Make hugepages comparison work on 32-bit platforms 2017-09-05 18:24:54 -04:00
PiotrProkop 59a86e4cbc Adding getHugePagesMountOptions function and tests 2017-09-05 17:15:49 +02:00
Michał Stachowski 2dba8f1715 Support for hugetlbfs in empty dir volume plugin 2017-09-05 17:15:49 +02:00
saadali 3b834cf665 Modify VolumeZonePredicate to handle multi-zone PV
Modifies the VolumeZonePredicate to handle a PV that belongs to more
then one zone or region. This is indicated by the zone or region label
value containing a comma separated list.
2017-09-04 20:13:32 -07:00
saadali 680fb3421b Enable dynamic provisioning of GCE Regional PD
This is the code required to create a GCE Regional PD via the Kubernetes
dynamic provisioning and a GCE PD StorageClass.
2017-09-04 20:10:32 -07:00
Hemant Kumar cd2a68473a Implement controller for resizing volumes 2017-09-04 09:02:34 +02:00
Kubernetes Submit Queue 765d9089d2 Merge pull request #51706 from zhangxiaoyu-zidif/fix-format-local-follow-go
Automatic merge from submit-queue (batch tested with PRs 51819, 51706, 51761, 51818, 51500)

Fix local storage code to follow go style

**What this PR does / why we need it**:
Fix local storage code to follow go style
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-03 15:00:03 -07:00
Kubernetes Submit Queue f07279ada2 Merge pull request #51474 from verult/ProberTest
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Flexvolume dynamic plugin discovery: Prober unit tests and basic e2e test.

**What this PR does / why we need it**: Tests for changes introduced in PR #50031 .
As part of the prober unit test, I mocked filesystem, filesystem watch, and Flexvolume plugin initialization.
Moved the filesystem event goroutine to watcher implementation.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51147

**Special notes for your reviewer**:
First commit contains added functionality of the mock filesystem.
Second commit is the refactor for moving mock filesystem into a common util directory.
Third commit is the unit and e2e tests.

**Release note**:

```release-note
NONE
```
/release-note-none
/sig storage
/assign @saad-ali @liggitt 
/cc @mtaufen @chakri-nelluri @wongma7
2017-09-03 11:10:05 -07:00
Kubernetes Submit Queue 855c5e0e93 Merge pull request #51628 from jsafrane/fix-iscsi-attach
Automatic merge from submit-queue (batch tested with PRs 51628, 51637, 51490, 51279, 51302)

Fix iSCSI WaitForAttach not mounting a volume

WaitForAttach failed consistently with this error:
```
Heuristic determination of mount point failed:stat /var/lib/kubelet/plugins/kubernetes.io/iscsi/iface-default/10.128.0.3:3260-iqn.2003-01.org.linux-iscsi.f21.x8664:sn.4b0aae584f7c-lun-0: no such file or directory
```

We should ignore "no such file or directory" eror, the directory is created just few lines below.

Fixes: #51625



**Release note**:

```release-note
NONE
```

/sig storage
/assign @mtanino
2017-09-01 00:11:12 -07:00
Kubernetes Submit Queue 8c8b1b5e88 Merge pull request #51574 from dillaman/ceph-rbd-image-format
Automatic merge from submit-queue (batch tested with PRs 51574, 51534, 49257, 44680, 48836)

rbd: default image format to v2 instead of deprecated v1

**What this PR does / why we need it**:
Image format v1 has been deprecated since the Infernalis release of
Ceph over two years ago.

**Release note**:
```StorageClass Ceph RBD now defaults to using the v2 image format ```
2017-08-31 23:13:15 -07:00
Cheng Xing 52a77aaccd Added basic Flexvolume dynamic plugin discovery e2e test; added Flexvolume prober unit tests. 2017-08-31 16:50:02 -07:00
zhangxiaoyu-zidif 90cb1c16eb Fix local storage code to follow go style 2017-08-31 22:09:41 +08:00
Jan Safranek 540752d0a1 Fix iSCSI WaitForAttach not mounting a volume
WaitForAttach failed consistently with this error:
Heuristic determination of mount point failed:stat /var/lib/kubelet/plugins/kubernetes.io/iscsi/iface-default/10.128.0.3:3260-iqn.2003-01.org.linux-iscsi.f21.x8664:sn.4b0aae584f7c-lun-0: no such file or directory

We should ignore "no such file or directory" eror, the directory is created
just few lines below.
2017-08-30 15:34:49 +02:00
Kubernetes Submit Queue 5f8d229585 Merge pull request #51361 from yastij/iscsi-handle-failedMount
Automatic merge from submit-queue (batch tested with PRs 51439, 51361, 51140, 51539, 51585)

Iscsi handle failed mount

**What this PR does / why we need it**:

**Which issue this PR fixes**: fixes #50556

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-08-30 03:59:30 -07:00
Jason Dillaman 68c1eea2c6 rbd: default image format to v2 instead of deprecated v1
Image format v1 has been deprecated since the Infernalis release of
Ceph over two years ago.
2017-08-29 20:11:46 -04:00
Matthew Wong 5e772b8e4b Add storageClass.mountOptions and use it in all applicable plugins 2017-08-29 11:37:36 -04:00
Kubernetes Submit Queue ae17c1f2bf Merge pull request #50919 from wongma7/mount-options
Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296)

Take mount options to GA by adding PV.spec.mountOptions

**What this PR does / why we need it**: Implements https://github.com/kubernetes/community/pull/771

issue: https://github.com/kubernetes/features/issues/168

**Special notes for your reviewer**:

TODO:
- ~StorageClass mountOptions~

As described in proposal, this adds PV.spec.mountOptions + mountOptions parameter to every plugin that is both provisionable & supports mount options.

(personally, even having done all the work already, i don't agree w/ the proposal that mountOptions should be SC parameter but... :))

**Release note**:

```release-note
Add mount options field to PersistentVolume spec
```
2017-08-29 03:20:00 -07:00
Kubernetes Submit Queue 7100d00491 Merge pull request #51342 from wongma7/flex-nil
Automatic merge from submit-queue

Set flexvolumeplugin.host so that it's not nil

@TerraTech @MikaelCluseau  @chakri-nelluri @verult

I assume this line was removed inadvertently, without plugin.host set the flexvolume silently fails at Mount/Attach* time. https://github.com/kubernetes/kubernetes/pull/50843

https://github.com/kubernetes/kubernetes/issues/51123

Please review, thanks!

```release-note
NONE
```
2017-08-28 12:07:18 -07:00
Matthew Wong 0855f6a089 Add MountOptions field to PV spec 2017-08-28 14:18:34 -04:00
Kubernetes Submit Queue 2a2f499455 Merge pull request #50036 from wongma7/metrics
Automatic merge from submit-queue

Add volume operation metrics to operation executor and PV controller

This PR implements the proposal for high level volume metrics https://github.com/kubernetes/community/pull/809

**Special notes for your reviewer**:

~Differences from proposal:~ all resolved

~"verify_volume" is now "verify_volumes_are_attached" + "verify_volumes_are_attached_per_node" + "verify_controller_attached_volume." Which of them do we want?~

~There is no "mount_device" metric because the MountVolume operation combines MountDevice and mount (plugin.Setup). Do we want to extract the mount_device metric or is it okay to keep mountvolume as one? For attachable volumes, MountDevice is the actual mount and Setup is a bindmount + setvolumeownership. For unattachable, mountDevice does not occur and Setup is an actual mount + setvolumeownership.~

~PV controller metrics I did not implement following the proposal at all. I did not change goroutinemap nor scheduleOperation. Because provisionClaimOperation does not return an error, so it's impossible for the caller to know if there is actually a failure worth reporting. So I manually create a new metric inside the function according to some conditions.~

@gnufied 

I have tested the operationexecutor metrics but not provision & delete. Sample: 
![screen shot 2017-08-02 at 15 01 08](https://user-images.githubusercontent.com/13111288/28889980-a7093526-7793-11e7-9aa9-ad7158be76fa.png)


**Release note**:

```release-note
Add error count and time-taken metrics for storage operations such as mount and attach, per-volume-plugin.
```
2017-08-28 04:20:49 -07:00
allencloud c8c7139d21 refactor codes in volume iscsi to improve readability
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-08-27 12:05:21 +08:00
Kubernetes Submit Queue 496e71ef98 Merge pull request #50334 from mtanino/issue/48953
Automatic merge from submit-queue (batch tested with PRs 49849, 50334, 51414)

Support iscsi volume attach and detach

**What this PR does / why we need it**:

Support iSCSI volume attach and detach to enforce RWO access

**Which issue this PR fixes** : fixes #48953

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-08-26 18:09:30 -07:00
Lars Lehtonen 2493f7e936
Merge branch 'fix-host-path-swallowed-error' into fix-storageos-swallowed-err 2017-08-26 14:51:53 -07:00
Lars Lehtonen 6ada93683f
Merge branch 'fix-volume-util-swallowed-errs' into fix-storageos-swallowed-err 2017-08-26 14:48:10 -07:00
Lars Lehtonen a074035e29
Merge branch 'fix-portworx-swallowed-errors' into fix-storageos-swallowed-err 2017-08-26 14:47:14 -07:00
Lars Lehtonen 30b9038bbb
Merge branch 'fix-fc-swallowed-error' into fix-storageos-swallowed-err 2017-08-26 14:46:36 -07:00
Lars Lehtonen ed89907bb2
Merge branch 'fix-aws-ebs-swallowed-errors' into fix-storageos-swallowed-err 2017-08-26 14:45:45 -07:00
Lars Lehtonen 76a21a41f4
Merge branch 'fix-gce-pd-swallowed-errors' into fix-storageos-swallowed-err 2017-08-26 14:41:46 -07:00
Lars Lehtonen e61b040dd9
Merge branch 'fix-flocker-swallowed-error' into fix-storageos-swallowed-err 2017-08-26 14:39:30 -07:00
Kubernetes Submit Queue 036456a892 Merge pull request #51366 from sbezverk/cross_platform_fix
Automatic merge from submit-queue

Fixes cross platform build failure
2017-08-26 14:29:09 -07:00
mtanino e21b68b4ca Support iscsi volume attach and detach
Fixes #48953
2017-08-26 17:23:47 -04:00
mtanino 5ff9dc0b3b WaitForAttach refactoring for iSCSI attacher/detacher
This change is prerequisite for implementing iSCSI attacher
and detacher.

In order to use chap authentication at iSCSI plugin after
implementing attacher and detacher, secret is needed at
AttachDisk() which is called from WaitForAttach().
To obtain secret, pod information is required, but
WaitForAttach() doesn't pass pod information inside.

This patch adds 'pod' as an argument of WaitForAttach()
and adds changes to drivers who implements WaitForAttach().

Fixes #48953
2017-08-26 17:21:34 -04:00
Lars Lehtonen 09f4ecffac
Fix swallowed errors in aws_ebs tests 2017-08-26 09:25:42 -07:00
Kubernetes Submit Queue 223227eb59 Merge pull request #51391 from alrs/fix-iscsi-swallowed-error
Automatic merge from submit-queue

Fix swallowed error in iscsi package

**What this PR does / why we need it**: Fixes a swallowed error in the iscsi package.


```release-note NONE
```
2017-08-26 08:23:09 -07:00
Kubernetes Submit Queue f7eb492f0d Merge pull request #51390 from alrs/fix-photon-pd-swallowed-errors
Automatic merge from submit-queue

Fix swallowed errors in tests of photon_pd package

**What this PR does / why we need it**: Fixes swallowed errors in the tests of the photon_pd package.

```release-note NONE
```
2017-08-26 07:32:24 -07:00
Serguei Bezverkhi f2e89886a1 Fixes cross platform build failure
Closes #51358
2017-08-26 09:58:51 -04:00
Kubernetes Submit Queue 84d9778f22 Merge pull request #51388 from alrs/fix-scaleio-swallowed-error
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Fix swallowed error in scaleio package tests

**What this PR does / why we need it**: Fixes a dropped error in the tests of the scaleio package.

**Release note**:
```release-note NONE
```
2017-08-26 06:43:36 -07:00
Kubernetes Submit Queue 27fbb68f18 Merge pull request #51087 from oracle/for/upstream/master/ccm-instance-exists
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Add InstanceExistsByProviderID to cloud provider interface for CCM

**What this PR does / why we need it**:

Currently, [`MonitorNode()`](02b520f0a4/pkg/controller/cloud/nodecontroller.go (L240)) in the node controller checks with the CCM if a node still exists by calling `ExternalID(nodeName)`. `ExternalID` is supposed to return the provider id of a node which is not supported on every cloud. This means that any clouds who cannot infer the provider id by the node name from a remote location will never remove nodes that no longer exist. 


**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50985

**Special notes for your reviewer**:

We'll want to create a subsequent issue to track the implementation of these two new methods in the cloud providers.

**Release note**:

```release-note
Adds `InstanceExists` and `InstanceExistsByProviderID` to cloud provider interface for the cloud controller manager
```

/cc @wlan0 @thockin @andrewsykim @luxas @jhorwit2

/area cloudprovider
/sig cluster-lifecycle
2017-08-26 06:43:30 -07:00
Kubernetes Submit Queue 932e07af53 Merge pull request #50031 from verult/ConnectedProbe
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Dynamic Flexvolume plugin discovery, probing with filesystem watch.

**What this PR does / why we need it**: Enables dynamic Flexvolume plugin discovery. This model uses a filesystem watch (fsnotify library), which notifies the system that a probe is necessary only if something changes in the Flexvolume plugin directory.

This PR uses the dependency injection model in https://github.com/kubernetes/kubernetes/pull/49668.

**Release Note**:
```release-note
Dynamic Flexvolume plugin discovery. Flexvolume plugins can now be discovered on the fly rather than only at system initialization time.
```

/sig-storage

/assign @jsafrane @saad-ali 
/cc @bassam @chakri-nelluri @kokhang @liggitt @thockin
2017-08-26 02:05:34 -07:00
Lars Lehtonen e8a3424c1c
Fix swallowed error in fc 2017-08-25 21:34:40 -07:00
Lars Lehtonen 5abbd0f96f
Fix swallowed error in tests for flocker package 2017-08-25 21:28:30 -07:00
Lars Lehtonen 15dccee12d
Fix swallowed errors in tests of gce_pd 2017-08-25 21:16:34 -07:00
Lars Lehtonen f482646372
Fix swallowed error in tests of host_path package 2017-08-25 21:06:34 -07:00
Lars Lehtonen 47ee11437d
Fix swallowed error in iscsi package 2017-08-25 20:57:58 -07:00
Lars Lehtonen f77dd0ebac
Fix swallowed errors in tests of photon_pd package 2017-08-25 20:37:05 -07:00
Lars Lehtonen 4c86c891de
Fix swallowed errors in portworx tests 2017-08-25 20:28:24 -07:00
Lars Lehtonen 7ee91d6d54
Fix swallowed error in scaleio package tests
Test log improvement
2017-08-25 20:18:44 -07:00
Lars Lehtonen d564d06967
Fix swallowed error in storageos 2017-08-25 20:05:06 -07:00
Lars Lehtonen 14ad3b566e
Fix swallowed errs in volume util package 2017-08-25 19:56:47 -07:00
Kubernetes Submit Queue 85f963310e Merge pull request #50504 from yastij/fcVolume-handleFailedMount
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

handle failed mounts for fc volumes

**What this PR does / why we need it**: handles failed mounts for fc

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50502

**Special notes for your reviewer**: 

**Release note**:

```release-note
None
```
2017-08-25 19:40:38 -07:00
Kubernetes Submit Queue 9d7bdb6a5f Merge pull request #51274 from yastij/clean-cinder-detachLogError
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

Clean cinder detachlogerror

**What this PR does / why we need it**:

**Which issue this PR fixes** : fixes #50441

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-25 19:40:32 -07:00
Yassine TIJANI 588fe268dc handle iscsi failed mounts 2017-08-25 22:32:13 +02:00
Cheng Xing 396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Kubernetes Submit Queue dfd1ca7728 Merge pull request #49988 from sbezverk/fsgroup_check
Automatic merge from submit-queue (batch tested with PRs 50033, 49988, 51132, 49674, 51207)

Adding fsGroup check before mounting a volume

fsGroup check will be enforcing that if a volume has already been
mounted by one pod and another pod wants to mount it but has a different
fsGroup value, this mount operation will not be allowed.

Closes #45053
2017-08-25 11:07:09 -07:00
Matthew Wong 8b5b2e9927 Set flexvolumeplugin.host so that it's not nil 2017-08-25 13:36:17 -04:00
Kubernetes Submit Queue 256113f7b4 Merge pull request #51103 from jsafrane/exec-scaleio
Automatic merge from submit-queue (batch tested with PRs 50872, 51103, 51220, 51285, 50841)

ScaleIO:  Use VolumeHost.GetExec() to execute stuff in volume plugins

This PR updates ScaleIO volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec` + to use a fresh `mounter` for every `SetUp` / `TearDown` calls, as they may be different each time.

This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

**Special notes for your reviewer**:

* I needed to pass `mount.Exec` interface from the place where it is available down to `SioClient` where it's needed to execute stuff.


@kubernetes/sig-storage-pr-reviews 
/assign @vladimirvivien @rootfs 

**Release note**:
```release-note
NONE
```
2017-08-25 10:10:06 -07:00
Kubernetes Submit Queue 2b28555c2e Merge pull request #51169 from MikaelCluseau/wip-flexvolume-caps
Automatic merge from submit-queue (batch tested with PRs 46986, 51214, 51169, 50155, 51261)

refactor(flexvolume): simplify capabilities handling

```release-note
Simplify capabilities handling in FlexVolume.
```
2017-08-25 07:58:09 -07:00
Kubernetes Submit Queue d3dc9cd9ba Merge pull request #51114 from jsafrane/exec-rbd
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

rbd: Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:

This PR updates rbd volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-25 06:22:09 -07:00
Kubernetes Submit Queue 0f3f232b6f Merge pull request #51095 from cofyc/rbd_log
Automatic merge from submit-queue

RBD Plugin: Log RBD Attach/Mount/Unmout actions in addition to Detach

**What this PR does / why we need it**:

Currently, RBD Plugin can log a info message for a successful action of RBD Unmap, e.g.:

```
I0822 09:32:31.595162   15177 rbd_util.go:349] rbd: successfully unmap device /dev/rbd0
```

This PR adds logs for another three important actions: Attach, Mount and Unmount.

Logging these actions and associated info is *very* useful in diagnosing problems.

**Special notes for your reviewer**:

Example RBD Plugin logs of successful pod volume attaching and mounting:

```
I0822 09:30:27.512015   15177 rbd_util.go:148] lock list output "2017-08-22 09:30:27.493889 7fa4ae3c23c0 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.kube.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory\n"
W0822 09:30:27.547513   15177 rbd_util.go:460] rbd: no watchers on kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71
I0822 09:30:27.704703   15177 rbd_util.go:315] rbd: successfully map image kube/kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71 to /dev/rbd0
I0822 09:30:27.965603   15177 rbd_util.go:322] rbd: successfully mount image kube/kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71 at /var/lib/kubelet/plugins/kubernetes.io/rbd/rbd/kube-image-kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71
```

Example RBD Plugin logs of successful pod volume detaching and unmouting:

```
I0822 09:32:31.380124   15177 rbd_util.go:334] rbd: successfully umount mountpoint /var/lib/kubelet/plugins/kubernetes.io/rbd/rbd/kube-image-kubernetes-dynamic-pvc-83bfd49e-871c-11e7-b88e-000c291fbe71
I0822 09:32:31.459867   15177 rbd_util.go:148] lock list output "2017-08-22 09:32:31.443643 7f2bb8ab53c0 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.kube.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory\nThere is 1 exclusive lock on this image.\nLocker       ID                     Address                    \nclient.64117 kubelet_lock_magic_k8s 192.168.2.128:0/4124042516 \n"
I0822 09:32:31.595162   15177 rbd_util.go:349] rbd: successfully unmap device /dev/rbd0
```

It does not add too much logs, but admins/ops can know what RBD plugin are doing internally and exact time a RBD image is mapped, mounted or unmounted (in addition to unmapped).

**Release note**:

```release-note
NONE
```
2017-08-25 05:00:21 -07:00
Kubernetes Submit Queue 59a63be022 Merge pull request #51213 from humblec/glusterfs-error
Automatic merge from submit-queue (batch tested with PRs 51229, 50131, 51074, 51167, 51213)

Avoid explicit mention of plugin name in error strings.
2017-08-25 03:16:11 -07:00
Yassine TIJANI c02aeb7ec1 handle failed mounts for fc volumes 2017-08-25 09:59:42 +02:00
Josh Horwitz 2f1ea47c83 Add InstanceExists* methods to cloud provider interface for CCM 2017-08-24 20:41:28 -04:00
Serguei Bezverkhi 1be99dd78e Adding fsGroup check before mounting a volume
fsGroup check will be enforcing that if a volume has already been
mounted by one pod and another pod wants to mount it but has a different
fsGroup value, this mount operation will not be allowed.
2017-08-24 17:33:51 -04:00
Yassine TIJANI d433ecd6cb cleaning dettach logic since it's not needed 2017-08-24 22:22:58 +02:00
Huamin Chen 9e65623187 refactor CephFS PV spec to use SecretReference
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 18:49:05 +00:00
Yecheng Fu c648505f76 RBD Plugin: Log RBD Attach/Mount/Unmout actions at logging level 3 2017-08-24 15:43:15 +00:00
Huamin Chen 4525446af2 azure file volume: add secret namespace api
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 14:49:58 +00:00
Mikaël Cluseau 22d5e4810b refactor(flexvolume): simplify capabilities handling 2017-08-24 22:18:58 +11:00
Kubernetes Submit Queue 915371cfdc Merge pull request #51108 from jsafrane/exec-iscsi
Automatic merge from submit-queue (batch tested with PRs 51108, 51035, 50539, 51160, 50947)

iscsi: Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:

This PR updates iSCSI volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

**Release note**:
```release-note
NONE
```
2017-08-24 02:32:04 -07:00
Kubernetes Submit Queue c041567b5a Merge pull request #46597 from dixudx/implement_proposal_34058
Automatic merge from submit-queue (batch tested with PRs 51113, 46597, 50397, 51052, 51166)

implement proposal 34058: hostPath volume type

**What this PR does / why we need it**:
implement proposal #34058

**Which issue this PR fixes** : fixes #46549

**Special notes for your reviewer**:
cc @thockin @luxas @euank PTAL
2017-08-23 23:16:27 -07:00
Kubernetes Submit Queue 3f78723427 Merge pull request #51113 from jsafrane/exec-quobyte
Automatic merge from submit-queue

quobyte: Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:
This PR updates ~~nfs~~ quobyte volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 23:03:47 -07:00
Matthew Wong 3ed34183d0 Add volume operation metrics to operation executor and PV controller 2017-08-23 14:27:47 -04:00
Humble Chirammal 19f8bde90b Avoid explicit mention of plugin name in error strings.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-08-23 23:45:10 +05:30
Kubernetes Submit Queue 4ec38dce7e Merge pull request #51115 from jsafrane/exec-storageos
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

StorageOS: Use VolumeHost.GetExec() to execute stuff in volume plugins

Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:

This PR updates StorageOS volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 08:41:06 -07:00
Kubernetes Submit Queue 012e94b6be Merge pull request #50239 from FengyunPan/fix-no-exist-node
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Mark the volumes as detached when node does not exist

If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and do not return err.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
#50200

**Release note**:
```release-note
NONE
```
2017-08-23 08:41:04 -07:00
Kubernetes Submit Queue 7df5c63218 Merge pull request #38947 from xiangpengzhao/fix-testcase-errorf
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Call Fatalf instead of Errorf when mounter/unmounter is nil in volume tests

If we get a nil mounter or unmounter, a panic will occur. Should call `Fatalf` instead of `Errorf`.
2017-08-23 08:41:01 -07:00
Jan Safranek bc6ad1ad9f iscsi: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-23 14:56:51 +02:00
Kubernetes Submit Queue 6a4203eb4b Merge pull request #51107 from jsafrane/exec-gluster
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

gluster: Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:
This PR updates GlusterFS volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

**Special notes for your reviewer**:

There are two commits:
* The first one removes unused `plugin.execCommand` (so we don't need to update it to `VolumeHost.GetExec`)
* The second one does the `VolumeHost.GetExec` trick described above.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 05:51:31 -07:00
Kubernetes Submit Queue 4fb6c2891c Merge pull request #50843 from TerraTech/fvs-selinuxRelabel-init-1.8.x
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

FlexVolume: Add ability to control 'SupportsSELinux' during driver's init phase

**What this PR does / why we need it**:
Adds the ability to disable FlexVolume SELinux relabeling for filesystems that don't support it, e.g. fuse

**Which issue this PR fixes**:
This was reported in: https://github.com/lizardfs/lizardfs/issues/581

This is a reworked solution as per feedback from #50548 
https://github.com/kubernetes/kubernetes/pull/50548#issuecomment-322328679

**Special notes for your reviewer**:
/assign @thockin 
/cc @chakri-nelluri @verult @saad-ali 

**Release note**:

```release-note
NONE
```
2017-08-23 05:51:28 -07:00
Kubernetes Submit Queue fd31c3a5cf Merge pull request #51110 from jsafrane/exec-nfs
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

nfs: Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:

This PR updates nfs volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 05:51:25 -07:00
Kubernetes Submit Queue 57b1ea8b1c Merge pull request #51097 from jsafrane/exec-azure
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

azure: Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:

This PR updates Azure volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

To simplify testing, `/sys/bus/scsi/devices/*/model` and `.../vendor` are read using `ioutil.ReadFile` instead of `/bin/cat` in the first commit.

```release-note
NONE
```

@kubernetes/sig-storage-pr-reviews @kubernetes/sig-azure-misc
2017-08-23 05:51:21 -07:00
Kubernetes Submit Queue ac2d24b46e Merge pull request #51105 from jsafrane/exec-fc
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

fibre channel: Remove unused exe interface

**What this PR does / why we need it**:
`execCommand` is not used anywhere, let's remove it and associated `exe` field from several structs.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 05:51:19 -07:00
Kubernetes Submit Queue 7e208befd1 Merge pull request #51084 from humblec/glusterfs-clean
Automatic merge from submit-queue (batch tested with PRs 50229, 50973, 50976, 51085, 51084)

Correct error strings in glusterfs
2017-08-23 03:36:14 -07:00
Di Xu 504f89e3ac auto-gen 2017-08-23 15:23:34 +08:00
Di Xu 021d4de36c run nsenter in host namespace for containerized kubelet 2017-08-23 14:05:21 +08:00
Di Xu d0a4af133b set default HostPathType to empty 2017-08-23 14:05:21 +08:00
Di Xu 5c45db564f implement proposal 34058: hostPath volume type 2017-08-23 14:05:21 +08:00
Kubernetes Submit Queue 625eb9ab7a Merge pull request #51106 from jsafrane/humblec-approver
Automatic merge from submit-queue

Add Humble as GlusterFS approver.

@humblec has shown his commitment into GlusterFS by number of commits there
and by support on sig-storage slack channel.

@kubernetes/sig-storage-misc 

```release-note
NONE
```
2017-08-22 22:14:15 -07:00
Kubernetes Submit Queue 43fd8eebf0 Merge pull request #49922 from riverzhang/volume-cephfs
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

Fix Getpath() description

Modify the description of the word error



**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-22 19:45:32 -07:00
Kubernetes Submit Queue d235fa3f1c Merge pull request #48789 from mtanino/issue/47311
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

iSCSI volume plugin: iSCSI initiatorname support

**What this PR does / why we need it**:

This PR adds iSCSI initiatorname parameter to ISCSIVolumeSource to enable automatic configuration of initiator name per volume. This would allow for more fine grained configuration, and remove the need to configure the initiator name on the host by administrator.

**Which issue this PR fixes**: fixes #47311

**Special notes for your reviewer**:

/cc @rootfs @jsafrane @msau42

**Release note**:

```
iSCSI volume plugin: Support customization of iSCSI initiator name per volume
```
2017-08-22 19:45:29 -07:00
xiangpengzhao 35b45d60b2 Use Fatalf instead of Errorf when mounter/unmounter if nil in volume tests 2017-08-23 10:29:30 +08:00
Jan Safranek bf296b3e31 StorageOS: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 15:57:08 +02:00
Jan Safranek 73b101c14b rbd: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 15:49:21 +02:00
Jan Safranek 3eb9b9dfee quobyte: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 15:24:20 +02:00
Jan Safranek 85495bd102 nfs: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 15:17:07 +02:00
Jan Safranek 3636c0a4e2 gluster: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 14:58:00 +02:00
Jan Safranek 51b33e8abe gluster: Remove unused exe interface 2017-08-22 14:53:25 +02:00
Jan Safranek 36cb25fbfc Add Humble as GlusterFS approver.
@humblec has shown his commitment into GlusterFS by number of commits there
and by support on sig-storage slack channel.
2017-08-22 14:41:51 +02:00
Jan Safranek f744b12ee9 fibre channel: Remove unused exe interface 2017-08-22 14:28:10 +02:00
Jan Safranek 158017cef7 ScaleIO: Use VolumeHost.GetExec() to execute utilities
This prepares volume plugins to run things in containers instead of running
them on the host.

As consequence, a mount.Exec interface needs to be passed from VolumeHost
down to SioClient.
2017-08-22 13:27:59 +02:00
Jan Safranek dbaf41e92a ScaleIO: use a fresh mounter for every SetUp/TearDown
A volume plugin should not cache Mounter for a long time, it can get a
different one with each SetUp/TearDown call.
2017-08-22 13:25:09 +02:00
core 07cfade1fc FlexVolume: Add capability to disable SELinux Relabeling during the driver's init phase
Reference:  https://github.com/lizardfs/lizardfs/issues/581  (SELinux relabeling support)
2017-08-22 03:31:34 -07:00
Humble Chirammal 7755286f48 Correct error strings in glusterfs
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-08-22 14:27:46 +05:30
Jan Safranek 96827de948 azure: Use VolumeHost.GetExec() to execute stuff in volume plugins
This prepares volume plugins to run things in containers instead of running
them on the host.
2017-08-22 10:21:44 +02:00
Jan Safranek 9484d243ab azure: Don't exec 'cat' to read files. 2017-08-22 10:01:33 +02:00
Kubernetes Submit Queue 198e83588b Merge pull request #46458 from jsafrane/mount-prep
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

Prepare VolumeHost for running mount tools in containers

This is the first part of implementation of https://github.com/kubernetes/features/issues/278 - running mount utilities in containers.

It updates `VolumeHost` interface:

*  `GetMounter()` now requires volume plugin name, as it is going to return different mounter to different volume plugings, because mount utilities for these plugins can be on different places.
* New `GetExec()` method that should volume plugins use to execute any utilities. This new `Exec` interface will execute them on proper place.
* `SafeFormatAndMount` is updated to the new `Exec` interface.

This is just a preparation, `GetExec` right now leads to simple `os.Exec` and mount utilities are executed on the same place as before. Also, the volume plugins will be updated in subsequent PRs (split into separate PRs, some plugins required lot of changes).

```release-note
NONE
```

@kubernetes/sig-storage-pr-reviews 
@rootfs @gnufied
2017-08-21 18:11:16 -07:00
Kubernetes Submit Queue aa31d19310 Merge pull request #50693 from allencloud/fix-typos-in-quobyte
Automatic merge from submit-queue (batch tested with PRs 50693, 50831, 47506, 49119, 50871)

fix two typos in quobyte error message

Signed-off-by: allencloud <allen.sun@daocloud.io>



**What this PR does / why we need it**:
fix two typos in quobyte error message

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:
NONE

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-08-21 14:29:55 -07:00
mtanino b0d4664a27 Autogenerated files 2017-08-21 12:29:32 -04:00
Mitsuhiro Tanino a6e523f2e7 iSCSI volume plugin: iSCSI initiatorname support
This PR adds iSCSI initiatorname parameter to ISCSIVolumeSource
to enable automatic configuration of initiator name per volume.
This would allow for more fine grained configuration, and remove
the need to configure the initiator name on the host by
administrator.

fixes: #47311
2017-08-21 11:26:56 -04:00
Kubernetes Submit Queue 6a644c25f8 Merge pull request #50460 from vladimirvivien/set_fakeHost_node_labels_for_test
Automatic merge from submit-queue (batch tested with PRs 50626, 50683, 50679, 50684, 50460)

Specify node labels for fakeVolumeHost

**What this PR does / why we need it**:
Adds ability to set arbitrary node labels to type `fakeVolumeHost`.
Allows creation of tests of code that depends on reading node labels using `fakeVolumeHost.GetNodeLabels() `.

**Release note**:

```release-note
NONE
```
2017-08-15 10:28:30 -07:00
allencloud 5497b32865 fix two typos in quobyte error message
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-08-15 23:00:36 +08:00
riverzhang b35df24cbc fix some typo 2017-08-15 04:19:01 -05:00
riverzhang d9c9d1bbdc fix some typo 2017-08-15 04:16:20 -05:00
FengyunPan 63725e3e3c Mark the volumes as detached when node does not exist
If node doesn't exist, OpenStack Nova will assume the volumes
are not attached to it. So mark the volumes as detached and
return false without error.
Fix: #50200
2017-08-15 16:42:11 +08:00
Kubernetes Submit Queue acf7b5715c Merge pull request #50406 from alrs/fix-vsphere-volume-dropped-errors
Automatic merge from submit-queue

Fix dropped errors in vsphere_volume

**What this PR does / why we need it**: Error variables are being assigned in the vsphere_volume tests, but their values are being ignored.

**Release note**:

```release-note NONE
```
2017-08-14 18:23:51 -07:00
Jan Safranek 0e547bae22 SafeFormatAndMount should use volume.Exec provided by VolumeHost
We need to execute mkfs / fsck where the utilities are.
2017-08-14 12:16:27 +02:00
Jan Safranek bc0e170d9c Add pluginName to VolumeHost.GetMouter
Different plugins can get different mounter, depending where the mount
utilities are.
2017-08-14 12:16:26 +02:00
Jan Safranek 282404cbc9 Add Exec interface to VolumeHost
This exec should be used by volume plugins to execute mount utilities.
It will eventually execute things in mount containers.
2017-08-14 12:16:25 +02:00
Kubernetes Submit Queue 9c508f12fb Merge pull request #49596 from jingxu97/July/checkVolumeSpecNil
Automatic merge from submit-queue

Check volumespec is nil in FindPluginBySpec
2017-08-11 17:36:22 -07:00
Kubernetes Submit Queue 1bdf691f6c Merge pull request #50429 from houjun41544/20170810
Automatic merge from submit-queue

Remove repeated reviewer's names

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-11 15:52:47 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jeff Grafton cf55f9ed45 Autogenerate BUILD files 2017-08-11 09:30:23 -07:00
Kubernetes Submit Queue 68c4fd30f4 Merge pull request #50430 from x1957/glusterfs
Automatic merge from submit-queue

remove the duplicate address of glusterfs

**What this PR does / why we need it**:
remove the duplicate endpoint address of glusterfs.
If there is no duplicate address of user config or the duplicate address is ok, we can remove the unused addr map.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-08-11 05:07:57 -07:00
fangyuhao cade629d25 remove the duplicate address of glusterfs 2017-08-10 23:51:18 +08:00
Vladimir Vivien 130bb03549 Specify node labels for fakeVolumeHost when testing 2017-08-10 11:12:15 -04:00
mtanino 03e28476c4 FC plugin: Support WWID for volume identifier
This PR adds World Wide Identifier (WWID) parameter to
FCVolumeSource as an unique volume identifier.

fixes #48639
2017-08-10 09:59:31 -04:00
Kubernetes Submit Queue b21387e77a Merge pull request #49615 from jianglingxia/jlx72615
Automatic merge from submit-queue (batch tested with PRs 49615, 49321, 49982, 49788, 50355)

remove redundant comment

**What this PR does / why we need it**:
there has redundant comment and delete it!
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
   NONE
```
2017-08-09 23:55:58 -07:00
houjun dfd38ae947 Remove repeated reviewers names 2017-08-10 12:51:06 +08:00
Kubernetes Submit Queue a881405bd4 Merge pull request #49164 from vmware/vSphereCloudProviderCodeRefactoring
Automatic merge from submit-queue

VSphere cloud provider code refactoring

The current PR tracks the vSphere Cloud Provider code refactoring which includes the following changes.
- VCLib Package - A framework used by vSphere cloud provider for managing the vSphere entities. VCLib package mainly does the following:
  - Volume management on datastore (Create/Delete)
  - Volume management on Virtual Machines (Attach/Detach)
  - Storage Policy Management
- vSphere Cloud Provider changes to implement the cloud provider interfaces by calling into VCLib package.
- Modifications to e2e tests to accomodate the latest design changes.

@divyenpatel @rohitjogvmw @luomiao 

```release-note
vSphere cloud provider: vSphere cloud provider code refactoring
```
2017-08-09 18:18:58 -07:00
Lars Lehtonen f56bf94a21
Fix dropped errors in vsphere_volume 2017-08-09 16:07:07 -07:00
Kubernetes Submit Queue 6faaca02af Merge pull request #50016 from yastij/photon-checkAttach
Automatic merge from submit-queue

checking if disk is already attached for photon

**What this PR does / why we need it**: check if disk is already attached

**Which issue this PR fixes** : fixes #49621

**Release note**:

```release-note
```
2017-08-09 13:23:31 -07:00
Yassine TIJANI bc3ef455dd checking if disk is already attached for photon. 2017-08-09 11:35:37 +02:00
Kubernetes Submit Queue 5d24a2c199 Merge pull request #49300 from tklauser/syscall-to-x-sys-unix
Automatic merge from submit-queue

Switch from package syscall to golang.org/x/sys/unix

**What this PR does / why we need it**:

The syscall package is locked down and the comment in https://github.com/golang/go/blob/master/src/syscall/syscall.go#L21-L24 advises to switch code to use the corresponding package from golang.org/x/sys. This PR does so and replaces usage of package syscall with package golang.org/x/sys/unix where applicable. This will also allow to get updates and fixes
without having to use a new go version.

In order to get the latest functionality, golang.org/x/sys/ is re-vendored. This also allows to use Eventfd() from this package instead of calling the eventfd() C function.

**Special notes for your reviewer**:

This follows previous works in other Go projects, see e.g. moby/moby#33399, cilium/cilium#588

**Release note**:

```release-note
NONE
```
2017-08-03 04:02:12 -07:00
Balu Dontu f4e39933f6 vSphere Cloud Provider code refactoring 2017-08-02 08:06:09 -07:00
Kubernetes Submit Queue 0cb5ec7517 Merge pull request #48999 from vladimirvivien/scaleio-vol-attribs-update
Automatic merge from submit-queue (batch tested with PRs 49871, 49422, 49092, 49858, 48999)

ScaleIO Volume Plugin - Volume attribute fixes and updates

**What this PR does / why we need it**:
This is a housekeeping PR for small enhancements and fixes to the ScaleIO volume plugin to address issues:
- Enforcement of fsGroup
- Enable ScaleIO multiple-instance volume mapping
- Tighter validation of PVC parameters
- Injection of default PVC capacity when omitted
- Better alignment of PVC, PV, and volume names for dynamic provisioning

**Special notes for your reviewer**:

**Release note**:

```release-note
Enforcement of fsGroup; enable ScaleIO multiple-instance volume mapping; default PVC capacity; alignment of PVC, PV, and volume names for dynamic provisioning
```
2017-08-01 23:35:58 -07:00
Kubernetes Submit Queue 2672f1cd1d Merge pull request #49416 from mtanino/issue/49392
Automatic merge from submit-queue (batch tested with PRs 49870, 49416, 49872, 49892, 49908)

FC volume plugin: remove block device at DetachDisk

**What this PR does / why we need it**:

After a volume is unmounted from pod and worker node, and then PV and PVC are deleted, cluster admin or external-provisioner might delete the disk from storage, therefore block device on the node should be cleaned up beforehand.

The photon volume plugin already has same functionality.

**Which issue this PR fixes**: fixes #49392

**Special notes for your reviewer**:

/assign @rootfs  
/cc @jsafrane @saad-ali 

**Release note**:

```
NONE
```
2017-08-01 19:52:59 -07:00
rong.zhang e018887501 Fix Getpath() description
Modify the description of the word error
2017-08-02 09:39:07 +08:00
Kubernetes Submit Queue 6748543145 Merge pull request #49526 from portworx/fix-vol-param-parsing
Automatic merge from submit-queue (batch tested with PRs 49284, 49555, 47639, 49526, 49724)

Supply Portworx StorageClass paramters in volume spec labels for server-side processing

**What this PR does / why we need it**:
This change offloads the requirement of successfully parsing all existing and new portworx volume parameters to it's server-side components. As a result, for fixing bugs in existing volume parameters parsing and adding new support, we will not need to submit a k8s PR.

**Which issue this PR fixes**: fixes #49525 

**Release note**:
```release-note
Fix incorrect parsing of io_priority in Portworx volume StorageClass and add support for new paramters.
```
2017-08-01 01:42:00 -07:00
Kubernetes Submit Queue 54c5374778 Merge pull request #49555 from jianglingxia/jlx72517
Automatic merge from submit-queue (batch tested with PRs 49284, 49555, 47639, 49526, 49724)

amend spec.PersistentVolume.Spec 

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-01 01:41:56 -07:00
Kubernetes Submit Queue 2e519c73ff Merge pull request #49707 from jianglingxia/jlx72717
Automatic merge from submit-queue (batch tested with PRs 49651, 49707, 49662, 47019, 49747)

remove the redundant err define

**What this PR does / why we need it**:
some place has define err  ,like 
class, err := volutil.GetClassForVolume(d.plugin.host.GetKubeClient(), d.spec)
so delete the err define!
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-31 16:56:53 -07:00
Vladimir Vivien fda99bd78e ScaleIO Volume Plugin - volume attribute updates
This commit introduces the following updates and fixes:
- Enable scaleIO volume multip-mapping based on accessMode
- No longer uses "default" as default values for storagepool & protection domain
- validates capacity when capacity is zero
- Better naming for PV and volume
- make mount ro when accessModes contains ROM
2017-07-31 16:51:45 -04:00
mtanino ed46466b95 FC volume plugin: remove block device at DetachDisk
After a volume is unmounted from pod and worker node,
cluster admin or external-provisioner might delete
the disk from storage, therefore block device on
the node should be cleaned up beforehand.

The photon volume plugin already has same functionality.

Fixes #49392
2017-07-31 15:36:39 -04:00
jianglingxia acc2062db5 amend the message 2017-07-31 16:00:59 +08:00
Kubernetes Submit Queue 4a73f19aed Merge pull request #49744 from dims/volunteer-as-cinder-approver
Automatic merge from submit-queue

Volunteer to review Cinder related code

**What this PR does / why we need it**:

Since i am currently helping with the OpenStack cloud provider, happy
to do the same with cinder package as well as they are related.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-28 08:15:29 -07:00
Kubernetes Submit Queue 97f74e81aa Merge pull request #49670 from mtanino/issue/49669
Automatic merge from submit-queue (batch tested with PRs 49712, 49694, 49714, 49670, 49717)

FC volume plugin: remove unmount of global mount

**What this PR does / why we need it**:

The unmount operation for global mount should be done by reconciler.go instead of executing inside the FC Plugin since attacher/detacher for FC plugin was merged recently.

**Which issue this PR fixes** : fixes #49669

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-07-28 08:15:06 -07:00
Kubernetes Submit Queue ee632be5b0 Merge pull request #49598 from sbezverk/local_vol_metrics
Automatic merge from submit-queue (batch tested with PRs 49619, 49598, 47267, 49597, 49638)

Adding metrics support to local volume

Adding metrics support to local volume plugin.
Fixes #49601
2017-07-28 05:08:03 -07:00
Kubernetes Submit Queue ea89d62710 Merge pull request #48486 from cofyc/rbd_metrics
Automatic merge from submit-queue (batch tested with PRs 49081, 49318, 49219, 48989, 48486)

Use MetricsStatsFs to expose RBD volume plugin metrics.

**What this PR does / why we need it**:

We need to monitor RBD volume usage of our cluster and configure alerts if RBD volume is nearly full. Users of cluster also need to see usage history graph on Grafana.

This PR use MetricsStatsFs to implement MetricsProvider interface of RBD plugin (same as `gce_pd`), so kubelet /stat/summary can expose RBD volume stats.

**Special notes for your reviewer**:

cc @rootfs

**Release note**:

```release-note
NONE
```
2017-07-28 04:03:44 -07:00
jianglingxia dee9470152 squash the commits into one 2017-07-28 10:11:31 +08:00
Harsh Desai c692710876 Add comment for parameter parsing logic in Portworx volume create 2017-07-27 16:12:26 -07:00
Harsh Desai 33221ee2b6 Supply Portworx StorageClass paramters in volume spec labels for server-side processing 2017-07-27 16:07:32 -07:00
Davanum Srinivas ad98f109ef Volunteer to review Cinder related code
Since i am currently helping with the OpenStack cloud provider, happy
to do the same with cinder package as well as they are related.
2017-07-27 16:01:12 -04:00
Kubernetes Submit Queue 3a0d8f8fea Merge pull request #45532 from jsafrane/cinder-approver
Automatic merge from submit-queue

Tune Cinder approvers

I don't want to be single approver for cinder PRs, @anguslees is OpenStack maintainer and should be able to help with Cinder.

Any other volunteers from @kubernetes/sig-storage-pr-reviews or @k8s-sig-openstack-pr-reviews?

Note: @justinsb **is** still reviewer, he was just listed twice.

```release-note
NONE
```
2017-07-27 03:14:42 -07:00
Yecheng Fu 777595ef6e Use MetricsStatsFs to expose RBD volume plugin metrics. 2017-07-27 08:13:55 +00:00
mtanino 0c262ba9de FC volume plugin: remove unmount of global mount 2017-07-26 19:45:15 -04:00
Jing Xu c18ecb0825 Check volumespec is nil in FindPluginBySpec
This PR fixes issue #49513
2017-07-26 13:45:32 -07:00
Kubernetes Submit Queue 74b3d47392 Merge pull request #49271 from dixudx/fix_rbd_deleter_adminid
Automatic merge from submit-queue (batch tested with PRs 47357, 49514, 49271, 49572, 49476)

set default adminid for rbd deleter if unset

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49225

**Special notes for your reviewer**:
/cc @BastiPaeltz @sjenning

**Release note**:

```release-note
set default adminid for rbd deleter if unset 
```
2017-07-26 12:03:47 -07:00
Serguei Bezverkhi fb67f1189b Adding metrics support to local volume
Adding metrics support to local volume plugin
2017-07-26 12:24:23 -04:00
jianglingxia 0710d86291 remove redundant comment 2017-07-26 15:34:11 +08:00
Andrei Vagin ad0ec2388f flexvol: remove a mount directory in a error case
flexVolumeMounter.SetUpAt creates a directory, where a volume has to be
mounted, and we have to remove this directory in error cases. Otherwise
we will see errors like this:

Orphaned pod 673b66d9-70f7-11e7-a5fa-525400307392 found, but volume paths are still present on disk

https://github.com/kubernetes/kubernetes/issues/49383
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-25 10:38:39 -07:00
deads2k 94e9993900 remove deads2k from volume reviewer 2017-07-25 08:52:25 -04:00
Kubernetes Submit Queue 8d1b090d6e Merge pull request #49496 from rootfs/iscsi-fc-reviewer
Automatic merge from submit-queue (batch tested with PRs 49479, 49496)

tune iscsi and fc volume owner

**What this PR does / why we need it**:
add @mtanino to iscsi and fc volume reviewer

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
@kubernetes/sig-storage-misc 
**Release note**:

```release-note
NONE
```
2017-07-25 01:41:31 -07:00
Di Xu 6addd4c9dd set default adminid for rbd deleter 2017-07-25 12:51:10 +08:00
Kubernetes Submit Queue ee7eb4a241 Merge pull request #49274 from dixudx/add_const_for_rbd
Automatic merge from submit-queue (batch tested with PRs 48911, 49475, 49438, 49362, 49274)

set RBD default values as constant vars

**What this PR does / why we need it**:

When working on #49225, I found some [default RBD parameters](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#ceph-rbd) had not been declared as constant values, which will be error-prone.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
set RBD default values as constant vars
```
2017-07-24 20:39:22 -07:00
Kubernetes Submit Queue 159dcbfbe4 Merge pull request #49475 from jsafrane/fix-gluster-make
Automatic merge from submit-queue (batch tested with PRs 48911, 49475, 49438, 49362, 49274)

Fixed glusterfs mount options

Capacity of a slice is the third argument, not the second one.
We use append() to fill the slice, so it should be empty at the beginning
and with the right capacity.

```release-note
NONE
```
2017-07-24 20:39:13 -07:00
Kubernetes Submit Queue 1feb0fa6aa Merge pull request #49118 from adelton/flex-bind-mount
Automatic merge from submit-queue (batch tested with PRs 49444, 47864, 48584, 49395, 49118)

Allow unmounting bind-mounted directories.

**What this PR does / why we need it**:

For files, we cannot use `path/..`;
we could use `filepath.Dir` but for bind-mounted, `isNotMounted` which calls `IsLikelyNotMountPoint` would not work anyway.
Let's just have the driver do the work.

Addressing
```
Error: UnmountVolume.TearDown failed for volume "..." (volume.spec.Name: "...") pod "..." (UID: "...") with: lstat /path/.../test-flex/..: not a directory
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

N/A

**Special notes for your reviewer**:

N/A

**Release note**:

```release-note
It is now posible to use flexVolumes to bind mount directories and files.
```
2017-07-24 13:52:42 -07:00
Kubernetes Submit Queue d286f56221 Merge pull request #45345 from codablock/storageclass_fstype
Automatic merge from submit-queue (batch tested with PRs 45345, 49470, 49407, 49448, 49486)

Support "fstype" parameter in dynamically provisioned PVs

This PR is a replacement for https://github.com/kubernetes/kubernetes/pull/40805. I was not able to push fixes and rebases to the original branch as I don't have access to the Github organization anymore.

I assume the PR will need a new "ok to test" 

**ORIGINAL PR DESCRIPTION**

**What this PR does / why we need it**: This PR allows specifying the desired FSType when dynamically provisioning volumes with storage classes. The FSType can now be set as a parameter:
```yaml
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: test
provisioner: kubernetes.io/azure-disk
parameters:
  fstype: xfs
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #37801

**Special notes for your reviewer**:
The PR also implicitly adds checks for unsupported parameters.

**Release note**:

```release-note
Support specifying of FSType in StorageClass
```
2017-07-24 07:40:47 -07:00
Huamin Chen 3b91bdc261 tune iscsi and fc volume owner
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-07-24 13:59:06 +00:00
Jan Pazdziora 6b7d4b7922 Allow unmounting bind-mounted directories.
For bind-mounted directories, the isNotMounted which calls
IsLikelyNotMountPoint fails because the filesystem of the mounted
location and the parent directory are the same.

Addressing:
unmounter.go:59] Warning: Path: /path/.../test-dir already unmounted
2017-07-24 13:33:10 +02:00
Jan Safranek f6a8436504 Fixed glusterfs mount options
Capacity of a slice is the third argument, not the second one.
We use append() to fill the slice, so it should be empty at the beginning
and with the right capacity.
2017-07-24 10:20:39 +02:00
Hemant Kumar 0b1d61db00 Fix controller crash because of nil volume spec
For volumes that don't support bulk volume verifiction, a nil
volume spec can cause crash of controller.
2017-07-21 18:42:11 -04:00
Tobias Klauser 4a69005fa1 switch from package syscall to x/sys/unix
The syscall package is locked down and the comment in [1] advises to
switch code to use the corresponding package from golang.org/x/sys. Do
so and replace usage of package syscall with package
golang.org/x/sys/unix where applicable.

  [1] https://github.com/golang/go/blob/master/src/syscall/syscall.go#L21-L24

This will also allow to get updates and fixes for syscall wrappers
without having to use a new go version.

Errno, Signal and SysProcAttr aren't changed as they haven't been
implemented in /x/sys/. Stat_t from syscall is used if standard library
packages (e.g. os) require it. syscall.SIGTERM is used for
cross-platform files.
2017-07-21 12:14:42 +02:00
Kubernetes Submit Queue 010858262f Merge pull request #49127 from humblec/backupvol-count
Automatic merge from submit-queue (batch tested with PRs 49328, 49285, 49307, 49127, 49163)

Make definite mount timeout for glusterfs volume mount.

The `backup-volfile-servers` mount option allows to specify more than 
one server to be contacted in single mount command. With this option in place,
it is not required to iterate over all the servers in the addrlist.
A mount attempt with this option  will fetch all the servers mentioned in
the list, Reference # https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Native_Client.html

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-21 03:00:21 -07:00
ymqytw 9b393a83d4 update godep 2017-07-20 11:03:49 -07:00
ymqytw 3dfc8bf7f3 update import 2017-07-20 11:03:49 -07:00
Humble Chirammal 413380e557 The `backup-volfile-servers` mount option allows to specify more than
one server to be contacted in single mount command. With this option in place,
it is not required to iterate over all the servers in the addrlist.
A mount attempt with this option  will fetch all the servers mentioned in
the list, Reference # https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Native_Client.html

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-20 23:17:32 +05:30
Kubernetes Submit Queue 67ec254ef3 Merge pull request #49203 from adelton/flexvolume-TestCanSupport-init-fail
Automatic merge from submit-queue (batch tested with PRs 49212, 49203, 49255)

If the init fails for whatever reason, plugin is nil and cannot be used.

**What this PR does / why we need it**:

Addressing
```
=== RUN   TestCanSupport
E0719 13:48:19.829849    2289 driver-call.go:232] init command failed, status: Successx, reason:
--- FAIL: TestCanSupport (0.00s)
	flexvolume_test.go:180: Can't find the plugin by name
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x11fc5b5]
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

N/A

**Special notes for your reviewer**:

N/A

**Release note**:

```release-note
NONE
```
2017-07-20 02:35:13 -07:00
Di Xu 50bfe02fea make default values as const vars 2017-07-20 16:13:17 +08:00
Kubernetes Submit Queue db1956b876 Merge pull request #48460 from cosmincojocar/azure_file_cloud_environment
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

Fix the Azure file to work within different cloud environments

**What this PR does / why we need it**:
Fix the Azure file plugin to work within different cloud environments.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #46081

cc @rootfs @brendandburns
2017-07-19 20:05:37 -07:00
Kubernetes Submit Queue 25d3523359 Merge pull request #48940 from rootfs/fc-fencing
Automatic merge from submit-queue (batch tested with PRs 48377, 48940, 49144, 49062, 49148)

support fc volume attach and detach

**What this PR does / why we need it**:
Support FC volume attach and detach to enforce RWO access

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #48953

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-19 19:10:12 -07:00
Kubernetes Submit Queue 7eb53ce85c Merge pull request #48171 from sdkfzv/master
Automatic merge from submit-queue

Improve the warning message if the rbd command is not found.

**What this PR does / why we need it**:
The previous warning msg is not correct if there is no rbd cmd.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #


**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-07-19 07:14:19 -07:00
Jan Pazdziora 1ebd51aa70 If the init fails for whatever reason, plugin is nil and cannot be used.
Addressing
=== RUN   TestCanSupport
E0719 13:48:19.829849    2289 driver-call.go:232] init command failed, status: Successx, reason:
--- FAIL: TestCanSupport (0.00s)
	flexvolume_test.go:180: Can't find the plugin by name
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x11fc5b5]
2017-07-19 16:08:45 +02:00
Alexander Block 8057056d1c Support "fstype" parameter in dynamically provisioned PVs 2017-07-19 10:34:13 +02:00
Cosmin Cojocar 95cf81f833 Remove clientset from azure file test build 2017-07-19 10:18:51 +02:00
Cosmin Cojocar 7ae381207e Remove unused import after rebase 2017-07-19 08:59:32 +02:00
Cosmin Cojocar 6c3a853149 Add the fake cloud provider to azure file build 2017-07-19 08:56:12 +02:00
Cosmin Cojocar 5c4290d4f2 Add tests for other cloud providers 2017-07-19 08:56:12 +02:00
Cosmin Cojocar 4378c7ae8e Restrict the dir and file permissions of the mounted volume 2017-07-19 08:56:12 +02:00
Cosmin Cojocar 44210092c1 Fix comment to conform to golint 2017-07-19 08:56:12 +02:00
Cosmin Cojocar a3506c8e16 Fall back on Azure public cloud endpoint when no Azure cloud provider is found 2017-07-19 08:56:12 +02:00
Cosmin Cojocar 599ab98f86 Add the azure cloud provider dependency to azure file plugin 2017-07-19 08:56:12 +02:00
Cosmin Cojocar b79a7a12c8 Fix the Azure file to work within different cloud environments 2017-07-19 08:55:24 +02:00
Kubernetes Submit Queue fc1d2b3be7 Merge pull request #48256 from xiangpengzhao/move-pkg-util
Automatic merge from submit-queue (batch tested with PRs 48481, 48256)

Refactor: pkg/util into sub-pkgs

**What this PR does / why we need it**:
- move code in pkg/util into sub-pkgs
- delete some unused funcs

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #15634

**Special notes for your reviewer**:
This is the final work of #15634. It will close that issue.
/cc @thockin 

**Release note**:

```release-note
NONE
```
2017-07-18 18:19:19 -07:00
Humble Chirammal b432854f17 This patch add new storage class parameter called
`volumeoptions` which can be used to set various volume options.
for eg# if you want to enable encryption on volumes,
the values like `client.ssl on`, `server.ssl on`..etc can be passed
to `volumeoptions` parameter in storageclass.

Issue # https://github.com/kubernetes/kubernetes/issues/28454

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-18 19:45:38 +05:30
xiangpengzhao 01daf707c5 Refactor: pkg/util into sub-pkgs 2017-07-18 14:34:08 +08:00
sdkfzv cb388d0c7e Merge branch 'master' into master 2017-07-18 09:37:29 +08:00
zhangningmin 01b6fc78cd Improve the warning message if the rbd command is not found. 2017-07-18 09:33:24 +08:00
Jacob Simpson 2c70e5df35 Manual changes. 2017-07-17 15:05:37 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Kubernetes Submit Queue 2c1c33d416 Merge pull request #48898 from portworx/fix-px-volume-calls
Automatic merge from submit-queue (batch tested with PRs 48997, 48595, 48898, 48711, 48972)

Use local PX endpoint for mount, unmount, detach and attach calls

**What this PR does / why we need it**:
This PR fixes an issue with Setup and TearDown of Portworx volumes which has side-effects such a Pod using a Portworx volume not being able to start on the minion.

**Which issue this PR fixes**: fixes #49034 
This PR addresses an issue that fails to mount, attach, unmount or detach a volume when Kubernetes sends these requests to Portworx when it's API server on that particular minion is down. 

Portworx mount, unmount, attach and detach requests need to be received on the minion where the pod is running. So these calls need to talk to the Portworx API server running locally on that node (and NOT to the Portworx k8s service since it may route the request to any node in the cluster). This PR explicitly makes such requests local only.

**Release note**:
```release-note
NONE
```
2017-07-17 13:23:52 -07:00
Kubernetes Submit Queue 1cbb7b1405 Merge pull request #47417 from xilabao/print-non-existent-key
Automatic merge from submit-queue (batch tested with PRs 47417, 47638, 46930)

print non-existent key in configmap

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #41573

**Special notes for your reviewer**:
carry from #41574
**Release note**:

```release-note
NONE
```
2017-07-16 16:33:01 -07:00
Kubernetes Submit Queue 86a42b8796 Merge pull request #46973 from php-coder/improve_flex_logging
Automatic merge from submit-queue (batch tested with PRs 46973, 48556)

Improve error reporting when flex driver has failed to initialize

**What this PR does / why we need it**:

This PR improves error reporting for the case when flex driver is failing to initialize. There are 2 improvements:

1) show only the plugin name instead of a full struct. This makes a message shorter and removes useless and internal information.

Before:
>E0605 16:44:59.330215   26786 plugins.go:359] Failed to load volume plugin &{k8s/nfs /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s~nfs %!s(*kubelet.kubeletVolumeHost=&{0xc431ea5800 {{1 0} map[kubernetes.io/downward-api:0xc431ee3f20 kubernetes.io/aws-ebs:0xc431ee3eb0 kubernetes.io/git-repo:0xc431ee3ef0 kubernetes.io/host-path:0xc430e985f0 kubernetes.io/rbd:0xc42bfab840 kubernetes.io/quobyte:0xc431ee3f00 kubernetes.io/fc:0xc42bfab980 kubernetes.io/empty-dir:0xc431ee3ed0 kubernetes.io/nfs:0xc430e98640 kubernetes.io/iscsi:0xc42bfab720 kubernetes.io/glusterfs:0xc430faaba0 kubernetes.io/cinder:0xc42bfab8c0 kubernetes.io/gce-pd:0xc431ee3ee0 kubernetes.io/secret:0xc42bfab6a0 kubernetes.io/flocker:0xc431ee3f30 kubernetes.io/cephfs:0xc431ee3f10]} 0xc42698cf40}) %!s(*exec.executor=&{}) {%!s(int32=0) %!s(uint32=0)} []}, error: unexpected end of JSON input

After:
>E0605 16:59:45.520185   29041 plugins.go:359] Failed to load volume plugin k8s/nfs, error: unexpected end of JSON input

2) quote script output. In case the output was empty, messages look a bit better:

Before:
> E0605 16:44:59.330077   26786 driver-call.go:212] Failed to unmarshal output for command: init, **output: **, error: unexpected end of JSON input
> W0605 16:44:59.330170   26786 driver-call.go:140] FlexVolume: driver call failed: executable: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs, args: [init], error: fork/exec /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs: permission denied, **output: **

After:
>E0605 16:59:45.519906   29041 driver-call.go:212] Failed to unmarshal output for command: init, **output: ""**, error: unexpected end of JSON input
>W0605 16:59:45.520109   29041 driver-call.go:140] FlexVolume: driver call failed: executable: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs, args: [init], error: fork/exec /usr/libexec/kubernetes/kubelet-plugins/volume/exec/k8s\~nfs/nfs: permission denied, **output: ""**
2017-07-15 18:02:36 -07:00
Kubernetes Submit Queue c3e8bd04a9 Merge pull request #48949 from php-coder/minor_cleanup
Automatic merge from submit-queue

Fix comments and typo in the error message

**What this PR does / why we need it**:
This PR fixes outdated comments and typo in the error message.

**Release note**:
```release-note
NONE
```

CC @simo5
2017-07-15 16:04:21 -07:00
Kubernetes Submit Queue f736f3121f Merge pull request #48326 from karataliu/afd.dev
Automatic merge from submit-queue

Fix share name generation in azure file provisioner.

**What this PR does / why we need it**:
Azure file share name has a length limit of 63, but currently the code is using data volume's limit 75.

**Which issue this PR fixes**
With current implementation, when the cluster name is long, the resulting file share name could have a length of 75.

Also function `GenerateVolumeName` would produce double '-' when clusterName containing '-' is to be truncated.

In both cases, service would reject the creating file share request.

**Special notes for your reviewer**:
Please refer to:
https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata#share-names

- Share names must be from 3 through 63 characters long.
- The name cannot contain two consecutive hyphens.

@rootfs @colemickens 

**Release note**:
2017-07-14 19:50:14 -07:00
Huamin Chen b887776880 add fc volume attacher
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-07-14 16:34:53 -04:00
Harsh Desai 90919e3e4e Add more detailed comment for localOnly flag in getPortworxDriver function 2017-07-14 13:20:16 -07:00
Harsh Desai 7268e2e2e8 Fix logging levels in Portworx volume driver and add doc for getPortworxDriver function 2017-07-14 13:20:06 -07:00
Harsh Desai 8d0dec7078 Use local PX endpoint for mount, unmount, detach and attach calls 2017-07-14 13:20:06 -07:00
Kubernetes Submit Queue 8532cdfd69 Merge pull request #48886 from mikedanese/cleanup
Automatic merge from submit-queue

remove some people from OWNERS so they don't get reviews anymore

These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- @bprashanth
- @rjnagal
- @vmarmol
2017-07-14 11:46:10 -07:00
Slava Semushin ae147a737c Fix comments and typo in the error message. 2017-07-14 19:17:12 +02:00
Khaled Henidak & Andy Zhang 677e593d86 Add Azure managed disk support 2017-07-14 14:09:44 +08:00
Mike Danese c201553f27 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol
2017-07-13 10:02:21 -07:00
Kubernetes Submit Queue 494ffa4650 Merge pull request #48457 from cofyc/rbd_error
Automatic merge from submit-queue (batch tested with PRs 48425, 41680, 48457, 48619, 48635)

"rbd: image xxx is locked by other nodes" is misleading

**What this PR does / why we need it**:

For RWO PV, RBD plugin tries to fence it first, but there are many situations which may cause lock to fail, e.g.

- userSecret is incorrect
- monitor addresses are incorrect or node cannot access ceph cluster temporarily
- image is locked by other nodes
- maybe more...

So, original "image xxx is locked by other nodes" is incorrect in some cases and misleading in diagnosis.

This PR change the error to be correct and not misleading first. We may add detail error descriptions later.

**Special notes for your reviewer**:

New FailedMount event example if RBD plugin cannot lock image:

```
...		FailedMount		MountVolume.SetUp failed for volume "pvc-ee37a9c8-608e-11e7-b3a7-000c291fbe71" : rbd: failed to lock image kubernetes-dynamic-pvc-ee3b9911-608e-11e7-97b6-000c291fbe71 (maybe locked by other nodes), error exit status 22
```

**Release note**:

```release-note
NONE
```
2017-07-12 10:57:17 -07:00
Kubernetes Submit Queue f5f9894efc Merge pull request #48709 from jsafrane/gluster-autumount
Automatic merge from submit-queue (batch tested with PRs 48672, 47140, 48709, 48786, 48757)

glusterfs: retry without auto_unmount only when it's not supported

GlusterFS volume plugin should not blindly retry all failed mounts without
auto_unmount, it should retry them only when we are sure that auto_unmount
was the reason the first attempt failed.

@kubernetes/sig-storage-pr-reviews 
/assign @humblec 

```release-note
NONE
```
2017-07-12 09:02:55 -07:00
Kubernetes Submit Queue 65b48aaec1 Merge pull request #48672 from dixudx/resolve_hard_coded_path_sep_atomic
Automatic merge from submit-queue (batch tested with PRs 48672, 47140, 48709, 48786, 48757)

use built-in path separator instead of hard coded

**What this PR does / why we need it**:

We should use built-in path separator to avoid hard coded strings.

**Which issue this PR fixes** :

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-07-12 09:02:51 -07:00
Kubernetes Submit Queue 03360d7b65 Merge pull request #48402 from ianchakeres/local-storage-teardown-fix
Automatic merge from submit-queue

Local storage teardown fix

**What this PR does / why we need it**: Local storage uses bindmounts and the method IsLikelyNotMountPoint does not detect these as mountpoints. Therefore, local PVs are not properly unmounted when they are deleted.

**Which issue this PR fixes**: fixes #48331

**Special notes for your reviewer**:

You can use these e2e tests to reproduce the issue and validate the fix works appropriately https://github.com/kubernetes/kubernetes/pull/47999

The existing method IsLikelyNotMountPoint purposely does not check mountpoints reliability (4c5b22d4c6/pkg/util/mount/mount_linux.go (L161)), since the number of mountpoints can be large. 4c5b22d4c6/pkg/util/mount/mount.go (L46)

This implementation changes the behavior for local storage to detect mountpoints reliably, and avoids changing the behavior for any other callers to a UnmountPath.

**Release note**:

```
Fixes bind-mount teardown failure with non-mount point Local volumes (issue https://github.com/kubernetes/kubernetes/issues/48331).
```
2017-07-11 20:35:29 -07:00
Ian Chakeres 2b18d3b6f7 Fixes bind-mount teardown failure with non-mount point Local volumes
Added IsNotMountPoint method to mount utils (pkg/util/mount/mount.go)
Added UnmountMountPoint method to volume utils (pkg/volume/util/util.go)
Call UnmountMountPoint method from local storage (pkg/volume/local/local.go)
IsLikelyNotMountPoint behavior was not modified, so the logic/behavior for UnmountPath is not modified
2017-07-11 17:19:58 -04:00
Jan Safranek c20b4f7e4e glusterfs: retry without auto_unmount only when it's not supported
GlusterFS volume plugin should not blindly retry all failed mounts without
auto_unmount, it should retry them only when we are sure that auto_unmount
was the reason the first attempt failed.
2017-07-10 14:33:56 +02:00
Di Xu a76ccf5a5a use built-in path separator instead of hard coded 2017-07-09 23:24:34 +08:00
Yecheng Fu 29030d2b42 "rbd: image xxx is locked by other nodes" is misleading 2017-07-04 07:54:31 +00:00
Kubernetes Submit Queue d026286d39 Merge pull request #48055 from yiqinguo/yiqinguo_remove_err_ignored
Automatic merge from submit-queue

Add err judgment

I do not think that the error can be ignored here.

**Release note**:
```release-note
NONE
```
2017-07-02 20:05:39 -07:00
Kubernetes Submit Queue 4fe05d8191 Merge pull request #48264 from johscheuer/set-quota-for-volumes
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

Set quota for volumes

**What this PR does / why we need it**:
This PR allows users of the Quobyte Storage class to specify if automatically a Quota for the volume should be created. With a Quota a Quobyte volume can only grow in the specified size.

**Special notes for your reviewer**:
Update the Quobyte API version for the needed functionality.
2017-06-30 20:58:24 -07:00
Dong Liu ba3e49b56d Fix share name generation in azure file provisioner. 2017-06-30 15:42:40 +08:00
Kubernetes Submit Queue ad077c4ccb Merge pull request #47619 from mtanino/iscsi-remove-redundant-nil-check
Automatic merge from submit-queue (batch tested with PRs 47619, 47951, 46260, 48277)

iSCSi plugin: Remove redundant nil check

**What this PR does / why we need it**:

This patch is for cleanup of redundant nil check in iSCSI plugin.
This was mentioned at the code review on origin github thread.

https://github.com/openshift/origin/pull/14565

**Which issue this PR fixes** 

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-06-29 14:05:24 -07:00
Johannes Scheuermann e631550ef3 Make the Quota creation optional 2017-06-29 13:12:24 +02:00
Johannes Scheuermann 6a88a03d59 Set a Quobyte quota for newly created volumes 2017-06-29 09:21:58 +02:00
Kubernetes Submit Queue 4fd040afc7 Merge pull request #47647 from humblec/glusterfs-unused-var
Automatic merge from submit-queue (batch tested with PRs 48074, 47971, 48044, 47514, 47647)

Use more meaningful and consistent variable names in glusterfs plugin.
2017-06-26 11:41:01 -07:00
Jan Safranek c2dc5b5bf1 Move LoadPodFromFile to volume utils
SavePodToFile is not used anywhere and LoadPodFromFile is used only by PV
recycler.
2017-06-26 16:02:43 +02:00
yiqinguo b664a0db3d Add err judgment 2017-06-26 19:04:10 +08:00
Kubernetes Submit Queue e554dd6d3d Merge pull request #45805 from weiwei04/ceph-imageformat-2
Automatic merge from submit-queue

storageclass ceph add imageformat parameter

**What this PR does / why we need it**:
Add a imageformat parameter for StorageClass(ceph rbd)

k8s hard coded ceph imageformat 1, according to [ceph manual](http://docs.ceph.com/docs/master/man/8/rbd/), imageformat 1 was deprecated, we should add an extra ceph parameter to set ceph rbd imageformat. Ceph rbd imageformat can only be 1 or 2, set the default value to 1.

**Release note**:
```release-note
Allow StorageClass Ceph RBD to specify image format and image features.
```
2017-06-23 16:43:37 -07:00
Humble Chirammal 5f91b02a61 detach getClusterNodes() func from provisioner method.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-06-23 21:18:07 +05:30
Humble Chirammal a41e1c52ef Add annotation constants to glusterfs plugin.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-06-23 19:03:07 +05:30
Kubernetes Submit Queue 62b801ef91 Merge pull request #47241 from NickrenREN/cephfs-loglevel
Automatic merge from submit-queue (batch tested with PRs 47922, 47195, 47241, 47095, 47401)

Change cephfs secret related logs level

Fixes: #45387
**Release note**:

```release-note
NONE
```

/cc @rootfs
2017-06-22 21:33:29 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue d021db8204 Merge pull request #47503 from chakri-nelluri/flexcap
Automatic merge from submit-queue (batch tested with PRs 47878, 47503, 47857)

Remove controller node plugin driver dependency for non-attachable fl…

…ex volume drivers (Ex: NFS).

**What this PR does / why we need it**:
Removes requirement to install flex volume drivers on master node for non-attachable drivers likes NFS.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47109


```release-note
Fixes issue w/Flex volume, introduced in 1.6.0, where drivers without an attacher would fail (node indefinitely waiting for attach). Drivers that don't implement attach should return `attach: false` on `init`.
```
2017-06-21 21:12:15 -07:00
Kubernetes Submit Queue 03014f486c Merge pull request #47824 from mbohlool/revert2
Automatic merge from submit-queue (batch tested with PRs 47851, 47824, 47858, 46099)

Revert 44714 manually

#44714 broke backward compatibility for old swagger spec that kubectl still uses. The decision on #47448 was to revert this change but the change was not automatically revertible. Here I semi-manually remove all references to UnixUserID and UnixGroupID and updated generated files accordingly.

Please wait for tests to pass then review that as there may still be tests that are failing.

Fixes #47448

Adding release note just because the original PR has a release note. If possible, we should remove both release notes as they cancel each other.

**Release note**: (removed by caesarxuchao)

UnixUserID and UnixGroupID is reverted back as int64 to keep backward compatibility.
2017-06-21 15:21:14 -07:00
Kubernetes Submit Queue 1184ce869a Merge pull request #47236 from dixudx/not_allow_backsteps_in_local_volume
Automatic merge from submit-queue (batch tested with PRs 34515, 47236, 46694, 47819, 47792)

not allow backsteps in local volume plugin

**Which issue this PR fixes** : fixes #47207

**Special notes for your reviewer**:
cc @msau42 @ddysher
Just follow @liggitt [commented](https://github.com/kubernetes/kubernetes/issues/47107#issuecomment-306831175).

**Release note**:
```release-note
NONE
```
2017-06-21 13:30:09 -07:00
Kubernetes Submit Queue 0a6d307700 Merge pull request #34515 from jimengliu/master
Automatic merge from submit-queue (batch tested with PRs 34515, 47236, 46694, 47819, 47792)

remove unused constant

**What this PR does / why we need it**:

In flexvolume constant definitions, fix typo StatusFailure string to "Failure", not "Failed" at 

b359034817/pkg/volume/flexvolume/flexvolume_util.go (L45)

**Which issue this PR fixes** _(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)_: fixes #
#34510

**Special notes for your reviewer**:
Simple string literal change, but hopefully will prevent future confusion for developers.
2017-06-21 13:30:04 -07:00
mbohlool c91a12d205 Remove all references to types.UnixUserID and types.UnixGroupID 2017-06-21 04:09:07 -07:00
Humble Chirammal 8cb70cd0e6 Use more meaningful and consistent variable names in glusterfs plugin.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-06-20 11:12:47 +05:30
Huamin Chen 14c94fad2b manually revert #45528
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-06-19 17:57:37 +00:00
Chakravarthy Nelluri 894b9b2add Remove controller node plugin driver dependency for non-attachable flex volume drivers (Ex: NFS). 2017-06-17 14:12:43 -04:00
Di Xu aa23ed53c2 not allow backsteps in local volume plugin 2017-06-17 14:37:34 +08:00
Kubernetes Submit Queue 098e1df3b6 Merge pull request #47290 from jhorwit2/jah/hostpath-psp-backstep-check
Automatic merge from submit-queue (batch tested with PRs 47626, 47674, 47683, 47290, 47688)

validate host paths on the kubelet for backsteps

**What this PR does / why we need it**:

This PR adds validation on the kubelet to ensure the host path does not contain backsteps that could allow the volume to escape the PSP's allowed host paths. Currently, there is validation done at in API server; however, that does not account for mismatch of OS's on the kubelet vs api server. 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47107

**Special notes for your reviewer**:

cc @liggitt

**Release note**:


```release-note
Paths containing backsteps (for example, "../bar") are no longer allowed in hostPath volume paths, or in volumeMount subpaths
```
2017-06-16 19:57:01 -07:00
Kubernetes Submit Queue fdc6746818 Merge pull request #46382 from verult/FlexVolumeMinorPatches
Automatic merge from submit-queue (batch tested with PRs 38751, 44282, 46382, 47603, 47606)

Adding 'flexvolume' prefix to FlexVolume plugin names.

**What this PR does / why we need it**: Adds a prefix to FlexVolume plugin names in order to more easily identify plugins as FlexVolume. Improves debugging.

**Special notes for your reviewer**: Unfortunately the delimiter after 'flexvolume' is restricted to either '-' or '.' . This makes the prefix seem like it's part of the vendor name. Not sure if this could cause issues later on.

**Release note**:

```release-note
NONE
```
2017-06-16 18:05:51 -07:00
Josh Horwitz 48b3fb84ab do not allow backsteps in host volume plugin
Fixes #47107
2017-06-16 16:48:24 -04:00
Yecheng Fu 4e5e9ca0cd Only `layering` RBD image format 2 feature should be supported for now. 2017-06-16 18:07:03 +00:00
Yecheng Fu 0c7cdf773b Add `imageFeatures` parameter for RBD volume plugin, which is used to
customize RBD image format 2 features.
Update RBD docs in examples/persistent-volume-provisioning/README.md.
2017-06-16 18:07:03 +00:00
Wei Wei 2632bdd5e0 storageclass ceph add imageformat parameter 2017-06-16 18:07:03 +00:00
Mitsuhiro Tanino 285ac8935f iSCSi plugin: Remove redundant nil check 2017-06-15 18:00:29 -04:00
xilabao 6abed5883f print non-existent key in configmap 2017-06-15 10:57:19 +08:00
Kubernetes Submit Queue eb26aa5553 Merge pull request #47400 from chakri-nelluri/fixgetvolumename
Automatic merge from submit-queue (batch tested with PRs 47204, 46808, 47432, 47400, 47099)

Remove broken getvolumename and pass PV or volume name to attach call

Cherry-picking https://github.com/kubernetes/kubernetes/pull/46249 to master

What this PR does / why we need it:
Flex getvolumename is broken in 1.6. It needs to be fixed comprehensively in 1.7 release. Removing the api in 1.6. Also pass PV or volume name to the driver during attach call. Detach uses PV or volume name, so plugin can use that information to map to PV.
Which issue this PR fixes (optional, in fixes #(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Fixes - #44737
2017-06-14 17:14:06 -07:00
Kubernetes Submit Queue 03c5fd4b2a Merge pull request #46016 from kokhang/rbd-modprobe
Automatic merge from submit-queue (batch tested with PRs 47084, 46016, 46372)

Warn, instead of failing, if 'modprobe rbd' fails

Modprobe is a kernel operation that should only be done once to load the
RBD module. The admin could've done this on the Kubernetes nodes. The
RBD plugin can still try to load the module but it shouldnt fail the
workflow if it doesnt succeed.

Partially addresses #45190
2017-06-13 16:53:41 -07:00
Kubernetes Submit Queue 38837b018b Merge pull request #47274 from wongma7/accessmodes-provision
Automatic merge from submit-queue (batch tested with PRs 46929, 47391, 47399, 47428, 47274)

Don't provision for PVCs with AccessModes unsupported by plugin

Fail early in case the user actually expects e.g. RWM from AWS when in reality that isn't possible.
@eparis @gnufied 

edit: this needs release note because it's a breaking bugfix; will write one.

https://github.com/kubernetes/kubernetes/issues/46540
```release-note
Fix dynamic provisioning of PVs with inaccurate AccessModes by refusing to provision when PVCs ask for AccessModes that can't be satisfied by the PVs' underlying volume plugin
```
2017-06-13 10:52:17 -07:00
Kubernetes Submit Queue 0b0ec9b581 Merge pull request #46342 from vaibhavsood/master
Automatic merge from submit-queue (batch tested with PRs 47075, 46342)

Remove hardcode for blocksize, use stat(), fixes test failure on SLES

**What this PR does / why we need it**:
Removes hardcoding for blocksize, fixes test failure on SLES
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #44022

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-12 23:50:03 -07:00
Chakravarthy Nelluri 7885aaf689 Remove broken getvolumename and pass PV or volume name to attach call 2017-06-13 00:32:38 -04:00
Cheng Xing 8b2e1b55e0 Adding 'flexvolume' prefix to FlexVolume plugin names. 2017-06-12 18:03:40 -07:00
Matthew Wong 5e788a6a67 Don't provision for PVCs with AccessModes unsupported by plugin 2017-06-12 12:56:41 -04:00
mtanino b1f06aaed5 iSCSI plugin: Update devicepath with filepath.Glob result
If iscsiTransport is not tcp, iSCSI plugin tries to
find devicepath using filepath.Glob but never updates
devicepath with the filepath.Glob result.

This patch fixes the problem.

Fixes #47253
2017-06-09 22:54:25 -04:00
NickrenREN 7dc9f9196e Change cephfs secret related logs level 2017-06-09 20:20:00 +08:00
Simon Croome 5e2503e71f Add StorageOS volume plugin 2017-06-09 13:19:27 +01:00
Kubernetes Submit Queue a1ed965cc6 Merge pull request #47018 from FengyunPan/fix-attach
Automatic merge from submit-queue (batch tested with PRs 46977, 47005, 47018, 47061, 46809)

Waiting attach operation to be finished rather than returning nil

Fixes #46882
2017-06-07 08:10:43 -07:00
Kubernetes Submit Queue 5c9b9ae0cb Merge pull request #47021 from liggitt/projected-err
Automatic merge from submit-queue (batch tested with PRs 46997, 47021)

Block on projected volume data fetch failure

Fixes #47020
2017-06-06 20:12:18 -07:00
FengyunPan 1f47323187 Waiting attach operation to be finished rather than returning nil 2017-06-06 22:58:44 +08:00
Jordan Liggitt 3fd4e16eb0
Block on projected volume data fetch failure 2017-06-06 00:34:24 -04:00
Slava Semushin ec12e6cc9d Improve error reporting when flex driver has failed to initialize. 2017-06-05 17:07:33 +02:00
mtanino 82ce37d973 bkpPortal should be initialized beforehand
This patch is a follow up patch for the PR#46239.
The bkpPortal in DetachDisk() path should be initialized
before using it.
2017-06-05 10:22:57 -04:00
Kubernetes Submit Queue 974606544d Merge pull request #43852 from ailusazh/AddSuccessfulMountVolumeMsgToEvent
Automatic merge from submit-queue

Add SuccessfulMountVolume message to the events of pod

**What this PR does / why we need it:**
When creating a pod with volume, the volume mount may failed at first, but eventually succeed after retry several times. kubectl describe pod can only see the failed messages, so i think it will be better to add the SuccessfulMountVolume message to the pod events too.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Fixes #42867
2017-06-05 01:46:36 -07:00
Kubernetes Submit Queue 348bf1e032 Merge pull request #46627 from deads2k/api-12-labels
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

move labels to components which own the APIs

During the apimachinery split in 1.6, we accidentally moved several label APIs into apimachinery.  They don't belong there, since the individual APIs are not general machinery concerns, but instead are the concern of particular components: most commonly the kubelet.  This pull moves the labels into their owning components and out of API machinery.

@kubernetes/sig-api-machinery-misc @kubernetes/api-reviewers @kubernetes/api-approvers 
@derekwaynecarr  since most of these are related to the kubelet
2017-06-02 23:37:38 -07:00
Kubernetes Submit Queue fcf183dcaa Merge pull request #46239 from mtanino/issue/45394
Automatic merge from submit-queue

Log out from multiple target portals when using iscsi storage plugin

**What this PR does / why we need it**:

When using iscsi storage with multiple target portal (TP) addresses
and multipathing the volume manager logs on to the IQN for all
portal addresses, but when a pod gets destroyed the volume manager
only logs out for the primary TP and sessions for another TPs are
always remained.

This patch adds mount points for all TPs, and then log out from all
TPs when a pod is destroyed. If a TP is referred from another pods,
the connection will be remained as usual.



**Which issue this PR fixes** 
fixes #45394

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-06-02 23:27:14 -07:00
ailusazh f57224c0d2 Add SuccessfulMountVolume message to the events of pod 2017-06-01 17:56:47 +08:00
Kubernetes Submit Queue c13d8917c2 Merge pull request #46470 from shyamjvs/configmap-interface
Automatic merge from submit-queue

Migrate kubelet to ConfigMapManager interface and use TTL-based caching manager

Fixes #41379
Sometime ago we moved to a secret manager interface for kubelet to manage secrets.
This PR's first commit moves config map management also to a similar interface.
The second commit adds TTL-based CachingConfigMapManager (similar to CachingSecretManager) and makes kubelet use it.

/cc @kubernetes/sig-node-pr-reviews @kubernetes/sig-scalability-misc @wojtek-t @dchen1107
2017-06-01 01:53:34 -07:00
mtanino aebaee39d5 Log out from multiple portals with iscsi storage plugin
When using iscsi storage with multiple target portal (TP)
addresses and multipathing the volume manager logs on to
the IQN for all portal addresses, but when a pod gets
destroyed the volume manager only logs out for the primary
TP and sessions for another TPs are always remained.

This patch adds methods to store and load iscsi disk
configrations, then uses the stored config at DetachDisk
path.

Fix #45394
2017-05-31 16:53:47 -04:00
deads2k 954eb3ceb9 move labels to components which own the APIs 2017-05-31 10:32:06 -04:00
vaibhavsood a4809bc3c9 Update metrics_du_test.go 2017-05-31 17:21:46 +05:30
Kubernetes Submit Queue f0962765a7 Merge pull request #46182 from FengyunPan/check_detach
Automatic merge from submit-queue

Check volume's status before detaching volume

When volume's status is 'detaching', controllermanager will detach
it again and return err. It is necessary to check volume's status
before detaching volume.

same issue: #44536
2017-05-31 02:40:45 -07:00
Shyam Jeedigunta 4425864707 Migrate kubelet configmap management logic to an interface 2017-05-31 10:39:36 +02:00
Kubernetes Submit Queue 50c6a38c1e Merge pull request #46562 from dixudx/volume_manager_function_format
Automatic merge from submit-queue (batch tested with PRs 46661, 46562, 46657, 46655, 46640)

remove redundant carriage return for readable

**What this PR does / why we need it**:

remove redundant carriage to make it more readable.
2017-05-31 01:08:01 -07:00
Kubernetes Submit Queue 0aad9d30e3 Merge pull request #44897 from msau42/local-storage-plugin
Automatic merge from submit-queue (batch tested with PRs 46076, 43879, 44897, 46556, 46654)

Local storage plugin

**What this PR does / why we need it**:
Volume plugin implementation for local persistent volumes.  Scheduler predicate will direct already-bound PVCs to the node that the local PV is at.  PVC binding still happens independently.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
Part of #43640

**Release note**:

```
Alpha feature: Local volume plugin allows local directories to be created and consumed as a Persistent Volume.  These volumes have node affinity and pods will only be scheduled to the node that the volume is at.
```
2017-05-30 23:20:02 -07:00
FengyunPan 300f531389 Wait for detach operation to complete
When volume's status is 'detaching', controllermanager will detach
it again and return err. It is necessary to wait for detach
operation to complete within the alloted time.
2017-05-31 07:52:15 +08:00
Humble Chirammal 357cff5f11 Remove glusterfs fuse client mount library version check
for `auto_unmount` mount option.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-30 14:13:25 +05:30
Di Xu caeb584230 remove redundant carriage return (cont'd) 2017-05-30 16:29:21 +08:00
Kubernetes Submit Queue ef1febf789 Merge pull request #46367 from bobveznat/master
Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

Move MountVolume.SetUp succeeded to debug level

This message is verbose and repeated over and over again in log files
creating a lot of noise. Leave the message in, but require a -v in
order to actually log it.

**What this PR does / why we need it**: Moves a verbose log message to actually be verbose.

**Which issue this PR fixes** fixes #46364
Fixes #29059
2017-05-26 18:49:04 -07:00
Kubernetes Submit Queue c34b359bd7 Merge pull request #45923 from verult/cxing/NodeStatusUpdaterFix
Automatic merge from submit-queue (batch tested with PRs 46383, 45645, 45923, 44884, 46294)

Node status updater now deletes the node entry in attach updates...

… when node is missing in NodeInformer cache.

- Added RemoveNodeFromAttachUpdates as part of node status updater operations.



**What this PR does / why we need it**: Fixes issue of unnecessary node status updates when node is deleted.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #42438

**Special notes for your reviewer**: Unit tested added, but a more comprehensive test involving the attach detach controller requires certain testing functionality that is currently absent, and will require larger effort. Will be added at a later time.

There is an edge case caused by the following steps:
1) A node is deleted and restarted. The node exists, but is not yet recognized by Kubernetes.
2) A pod requiring a volume attach with nodeName specifically set to this node.

This would make the pod stuck in ContainerCreating state. This is low-pri since it's a specific edge case that can be avoided.

**Release note**:

```release-note
NONE
```
2017-05-26 12:58:02 -07:00
Michelle Au f385dfcb3b Address review comments 2017-05-26 11:48:31 -07:00
Bob Van Zant aca05c922c Move MountVolume.SetUp succeeded to debug level
This message is verbose and repeated over and over again in log files
creating a lot of noise. Leave the messsage in, but require a -v in
order to actually log it.

Fixes #29059
2017-05-26 10:54:34 -07:00
NickrenREN a02d6cd5d8 Add createdby annotation for rbd and quobyte and make dynamical createdby key const
make dynamical createdby key const
2017-05-26 16:55:11 +08:00
Kubernetes Submit Queue 07038c9417 Merge pull request #46395 from mindprince/issue-46204-45803-kubelet-volumes-test-flake
Automatic merge from submit-queue (batch tested with PRs 46429, 46308, 46395, 45867, 45492)

Implement FakeVolumePlugin's ConstructVolumeSpec method according to interface expectation.

This fixes #45803 and #46204.

**Release note**:
```release-note
NONE
```
2017-05-25 22:42:06 -07:00