Commit Graph

1298 Commits (cd25bbee468fe00c2bc6ea7eefc7de7e6846e526)

Author SHA1 Message Date
Kubernetes Submit Queue 2d914ee703 Merge pull request #53984 from sttts/sttts-legacyscheme
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

pkg/api: extract Scheme/Registry/Codecs into pkg/api/legacyscheme

This serves as

- a preparation for the pkg/api->pkg/apis/core move
- and makes the dependency to the scheme explicit when vizualizing
  left depenncies.

The later helps with our our efforts to split up the monolithic repo
into self-contained sub-repos, e.g. for kubectl, controller-manager
and kube-apiserver in the future.
2017-10-18 10:49:10 -07:00
Dr. Stefan Schimanski cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Kubernetes Submit Queue 1e356871a4 Merge pull request #53958 from dixudx/fix_pv_recycle_multiarch
Automatic merge from submit-queue (batch tested with PRs 53958, 53947). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix PV Recycle issue when running on multi-arch

**What this PR does / why we need it**:
Currently PV Recycle uses image `gcr.io/google_containers/busybox`, which is an amd64 image, not applied for multi-arch , to start pod `"pv-recycler"`. For other non-x86 platforms, like `ppc64le` and `arm64`, the pod cannot get started due to the busybox image.


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

**Special notes for your reviewer**:
/cc @gyliu513 @mkumatag 
/assign @saad-ali @jsafrane 

**Release note**:

```release-note
fix PV Recycle failed on non-amd64 platfrom
```
2017-10-18 06:44:00 -07:00
Kubernetes Submit Queue 6265d2170b Merge pull request #53719 from dixudx/fix_azure_disk_format_log_error
Automatic merge from submit-queue (batch tested with PRs 53872, 53719). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix azureDisk warns about disk format failure

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-10-18 05:47:55 -07:00
Di Xu f9e9fc84aa fix PV Recycle issue when running on multi-arch 2017-10-18 10:44:33 +08:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
FengyunPan 30e7a5c118 Volunteer to help with sig/openstack
I would like to do some code review/approve for OpenStack cloud
provider and cinder volume.
2017-10-13 16:49:59 +08:00
houjun 80c3d2df14 Fix errors in cephfs_test.go 2017-10-12 15:06:01 +08:00
Di Xu f2f88204f4 fix azureDisk warns about disk format failure 2017-10-12 08:07:51 +08:00
Kubernetes Submit Queue aaf14d4619 Merge pull request #53525 from sttts/sttts-scheme-copier-romoval
Automatic merge from submit-queue (batch tested with PRs 53525, 53652). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apimachinery: remove ObjectCopier interface(s)

The big commit is a mechanical, transitive removal of the copier interfaces in all structs and function calls.
2017-10-10 08:31:41 -07:00
Kubernetes Submit Queue 3752a511a4 Merge pull request #52662 from xiangpengzhao/volume-const
Automatic merge from submit-queue (batch tested with PRs 52662, 53547, 53588, 53573, 53599). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use const instead of hard code for volume plugin

**What this PR does / why we need it**:
nits: cleanup hard-coded volume plugin name

**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-10-09 12:51:14 -07:00
Kubernetes Submit Queue 92210a7d76 Merge pull request #53523 from zetaab/ignore_volume_label
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add possibility to ignore volume label in dynamic provisioning

**What this PR does / why we need it**: this is needed if openstack cinder zone name does not match to compute zone names. For instance if there is only one cinder zone and many compute zones.

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

**Special notes for your reviewer**: 

```release-note
NONE
```
2017-10-09 09:17:04 -07:00
Jesse Haka e45457b0d8 add possibility to ignore volume label in dynamic provisioning
ignorelabel -> addlabel

FIX tests

small fix to test

fixes according what was asked

fix test

fix test
2017-10-09 09:52:42 +03:00
Kubernetes Submit Queue 85b252d47e Merge pull request #51771 from dixudx/refactor_nsenter
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor nsenter

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

**Special notes for your reviewer**:
/assign @jsafrane 

**Release note**:

```release-note
None
```
2017-10-08 23:27:32 -07:00
Dr. Stefan Schimanski ecb65a6a71 Update generated files 2017-10-07 11:28:47 +02:00
Dr. Stefan Schimanski 509df603b1 apimachinery: mechanical removal of ObjectCopier plumbing 2017-10-06 19:21:03 +02:00
Kubernetes Submit Queue c08ef7b99f Merge pull request #52771 from vsimon/fix-azure-unittest-darwin
Automatic merge from submit-queue (batch tested with PRs 51765, 53053, 52771, 52860, 53284). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

TestIoHandler should not run on unsupported platforms

Fix for failing test on darwin/osx. Skip the test on unsupported (non-windows and non-linux) platforms.



**What this PR does / why we need it**:
`make test WHAT=./pkg/volume/azure_dd` doesn't pass on my OSX setup (10.12.6, go1.9, docker 17.06.2) on master. Our [docs on unit tests](https://github.com/kubernetes/community/blob/master/contributors/devel/testing.md#unit-tests)  say they should pass on OS X. This PR allows it to pass.

**Release note**:

```release-note
NONE
```
2017-10-03 09:02:35 -07:00
Hemant Kumar 0ad846cb18 Add documentation comments for volume expand controller
These comments help clear out some of the design choices made
in code.
2017-09-26 22:25:23 -04:00
Di Xu 542bd17e36 auto-gen 2017-09-26 09:57:13 +08:00
Di Xu 57ead4898b use GetFileType per mount.Interface to check hostpath type 2017-09-26 09:57:06 +08:00
Kubernetes Submit Queue 8e7f5d8c8b Merge pull request #52855 from NickrenREN/remove-rackspace
Automatic merge from submit-queue (batch tested with PRs 52880, 52855, 52761, 52885, 52929). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Remove cloud provider rackspace

**What this PR does / why we need it**:
For now, we have to implement functions in both `rackspace` and `openstack` packages if we want to add function for cinder, for example [resize for cinder](https://github.com/kubernetes/kubernetes/pull/51498).  Since openstack has implemented all the functions rackspace has,  and rackspace is considered deprecated for a long time, [rackspace deprecated](https://github.com/rackspace/gophercloud/issues/592) ,
after talking with @mikedanese  and @jamiehannaford offline ,  i sent this PR to remove `rackspace` in favor of `openstack`

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

**Special notes for your reviewer**:

**Release note**:
```release-note
The Rackspace cloud provider has been removed after a long deprecation period. It was deprecated because it duplicates a lot of the OpenStack logic and can no longer be maintained. Please use the OpenStack cloud provider instead.
```
2017-09-24 04:30:04 -07:00
Kubernetes Submit Queue 5dcd4d31c5 Merge pull request #52763 from NickrenREN/gluster-minor
Automatic merge from submit-queue (batch tested with PRs 52831, 52764, 52763, 52673, 52558). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Minor fix: make sure that glusterfsPlugin implements interface ExpandableVolumePlugin

Attempting an assignment to make sure that `glusterfsPlugin`  implements interface `ExpandableVolumePlugin`, just as we did for `DeletableVolumePlugin`, `PersistentVolumePlugin`


**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
```

/assign @gnufied
2017-09-23 22:57:52 -07:00
Kubernetes Submit Queue 17ba22aa85 Merge pull request #52469 from andyzhangx/azurefile-mount-windows
Automatic merge from submit-queue (batch tested with PRs 52469, 52574, 52330, 52689, 52829). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

add feature: azurefile mount on windows node

**What this PR does / why we need it**:
feature: azurefile mount on windows node. I created this new PR, close the original one(https://github.com/kubernetes/kubernetes/pull/50233) as there is a big rebase change.
Currently only SMB(a nfs protocol) is supported for windows container in the new Windows 2016 RS3 image, and windows container in RS3 could only use New-SmbGlobalMapping cmdlet for volume mapping, "net use" command does not work for windows container.

**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**:
As there is a known blocking issue in Windows 2016 server when mounting a SMB(a NFS protocol in Windows) share on a container host and then bind that share to a container ( Azure file on Windows is using SMB protocol), this PR still could not mount an azure file on current windows 2016 server node, it depends on 2016 RS3 release, and it will still succeed (as a workaround) if customer want to mount an azure file on current windows node.


Main code logic is similar to what it does in Linux node:

1. create target directory in Windows host
2. Use New-SmbGlobalMapping powershell cmdlet to mount SMB azure file to a drive in Windows host
3. Use mklink command to link target directory to the mounted drive

K8s would bind target directory to the container directory
source in mount function would be like:
`\\[accountname].file.core.windows.net\test`

target in mount function would be like:
`c:\var\lib\kubelet\pods\5f679f75-7ce3-11e7-b718-000d3a31dac4\volumes\kubernetes.io~azure-file`

sample azure file config file:
```
apiVersion: v1
kind: Pod
metadata:
 name: iis
spec:
 containers:
  - image: microsoft/iis
    name: iis
    volumeMounts:
      - name: azure
        mountPath: "d:"
 nodeSelector:
   beta.kubernetes.io/os: windows
 volumes:
      - name: azure
        azureFile:
          secretName: azure-secret
          shareName: k8stest
          readOnly: false
```

**Release note**:

```release-note
```
2017-09-23 21:52:46 -07:00
Kubernetes Submit Queue 63cc42a861 Merge pull request #52131 from vmware/BulkVerifyVolumesImplVsphere
Automatic merge from submit-queue (batch tested with PRs 50068, 52406, 52394, 48551, 52131). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Implement bulk polling of volumes for vSphere

This PR implements bulk polling of volumes - BulkVerifyVolumes() API for vSphere. 

With the existing implementation, vSphere makes multiple calls to VC to check if the volume is attached to a node. If there are "N" volumes attached on "M" nodes, vSphere makes "N" VCenter calls to check if the volumes are attached to VC for all "N" volumes. Also, by default Kubernetes queries if the volumes are attached to nodes every 1 minute. This will substantially increase the number of calls made by vSphere cloud provider to vCenter.

Inorder to prevent this, vSphere cloud provider implements the BulkVerifyVolumes() API in which only a single call is made to vCenter to check if all the volumes are attached to the respective nodes. Irrespective of the number of volumes attached to nodes, the number of vCenter calls will always be 1 on a query to BulkVerifyVolumes() API by kubernetes.

@rohitjogvmw @divyenpatel @luomiao

```release-note
BulkVerifyVolumes() implementation for vSphere
```
2017-09-23 20:55:54 -07:00
Kubernetes Submit Queue a1a441f7b5 Merge pull request #52687 from mtanino/teardown-refactor
Automatic merge from submit-queue (batch tested with PRs 51902, 52718, 52687, 52137, 52697). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Refactoring and improvements for iSCSI and FC storage plugins

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

This PR makes following changes.

- Simplify volume tearDown path for iSCSI and FC using
  util.UnmountPath().
- Log lastErr during iscsi connection
  If iscsid fails to connect second portal, currently
  the error is ignored silently. The lastErr should be
  logged to find the root cause of problem.
- Remove iscsi plugin directory after iscsi connection
  is successfully closed.

**Which issue this PR fixes** : No related issues.

**Special notes for your reviewer**:

/cc @rootfs @jsafrane 

**Release note**:

```
NONE
```
2017-09-23 19:49:52 -07:00
Kubernetes Submit Queue ac91b19cfc Merge pull request #52718 from foxyriver/ingress
Automatic merge from submit-queue (batch tested with PRs 51902, 52718, 52687, 52137, 52697). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

stop the Timer

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

Ticker stop twice, and does not stop Timer.
2017-09-23 19:49:49 -07:00
Kubernetes Submit Queue d6f76a000d Merge pull request #49539 from avagin/flexvol
Automatic merge from submit-queue (batch tested with PRs 47806, 49539, 48763, 47049, 50600). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

flexvolume: remove a mount directory in a error case

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

flexVolumeMounter.SetUpAt creates a directory, where a volume has to be
mounted, and we have to remove this directory in a error case. Otherwise
we see errors like this:

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

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

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

**Special notes for your reviewer**:

**Release note**:

Fix a rollback code for the flexvolume mount operation
2017-09-22 21:20:51 -07:00
NickrenREN 39c48d3605 remove rackspace related code 2017-09-22 18:06:50 +08:00
Kubernetes Submit Queue 0d0f2e559a Merge pull request #52365 from grebois/patch-1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

GlusterFS plugin fails to mount volumes in 1.7.3 branch #50463
2017-09-22 01:48:16 -07:00
Marcelo Grebois a2aa36210f Checking GlusterFS error output https://github.com/kubernetes/kubernetes/issues/50463 2017-09-22 08:31:18 +02:00
Kubernetes Submit Queue 158f6b78da Merge pull request #52246 from dixudx/suspect_hostpathtype_nil_ptr
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

suspect nil HostPathType

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

Nil `HostPathType` is suspicious. @luxas Will help re-verify.

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

**Special notes for your reviewer**:
/assign @luxas @thockin 

**Release note**:

```release-note
None
```
2017-09-20 22:22:45 -07:00
Kubernetes Submit Queue 1a15b3db36 Merge pull request #52132 from portworx/kubelet_weird_output_fix
Automatic merge from submit-queue (batch tested with PRs 51064, 52132). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Kubelet weird output fix

**What this PR does / why we need it**:
All kube binaries print the following message at the top when executed:
```
2017/08/28 21:37:12 proto: duplicate proto type registered: google.protobuf.Any
2017/08/28 21:37:12 proto: duplicate proto type registered: google.protobuf.Duration
2017/08/28 21:37:12 proto: duplicate proto type registered: google.protobuf.Timestamp
```
This PR addresses the above issue
It involves the following two changes:
1. Updating vendor packages
- Removes everything under the repo ``go.pedge.io``
- Updates repo libopenstorage/openstorage (which was using the above package)
2. Updates the portworx volume native driver to adhere to the newly vendor'ed code.



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

fixes #51452

**Special notes for your reviewer**:
I have divided the changes into 2 commits
1. Vendor'ed changes
2. Changes in portworx volume driver.

```release-note
Remove duplicate proto errors in kubelet.
```
2017-09-20 14:32:59 -07:00
Kubernetes Submit Queue 26bb28b046 Merge pull request #52691 from mtanino/issue/52690
Automatic merge from submit-queue (batch tested with PRs 52675, 52691). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

FC plugin: Return target wwn + lun at GetVolumeName()

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

At volume attach/detach controller, GetVolumeName() is
expected to return unique volume identifier, but FC
plugin didn't return unique identifier if user specified
FC volume using target wwn and lun.

In order to return unique identifier, GetVolumeName()
should use combination of target wwn and lun.

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

**Special notes for your reviewer**:

Should we use same format of unique volume identifier between v1.7 and v1.8 `for the purpose of backward compatibility?`

- At v1.7(before introducing attach/detach function), unique ID was pod's uuid + volume name
```
I0918 22:47:13.113481   44661 reconciler.go:257] operationExecutor.MountVolume started for volume "pv0001" (UniqueName: "kubernetes.io/fc/d6c66980-9ce4-11e7-8bb7-f8bc12550954-pv0001") pod "nginx-pod1" (UID: "d6c66980-9ce4-11e7-8bb7-f8bc12550954")  
I0918 22:47:15.116584   44661 operation_generator.go:476] MountVolume.SetUp succeeded for volume "pv0001" (UniqueName: "kubernetes.io/fc/d6c66980-9ce4-11e7-8bb7-f8bc12550954-pv0001") pod "nginx-pod1" (UID: "d6c66980-9ce4-11e7-8bb7-f8bc12550954")  
```

- At latest master, unique ID is targetWWNs.(if a user specifies a volume using target wwn + lun)
```
I0918 22:23:48.389339    1016 reconciler.go:212] operationExecutor.VerifyControllerAttachedVolume started for volume "pv0001" (UniqueName: "kubernetes.io/fc/[78060e801049abcd]") pod "nginx-pod3" (UID: "8f76b894-9ce1-11e7-b8f4-f8bc12550954")  
```

/cc @jsafrane @rootfs @msau42 @jingxu97 

**Release note**:

```
NONE
```
2017-09-20 10:01:42 -07:00
Kubernetes Submit Queue a3d92d0f82 Merge pull request #52675 from mtanino/issue/52674
Automatic merge from submit-queue (batch tested with PRs 52675, 52691). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Fix FC WaitForAttach not mounting a volume

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

WaitForAttach failed consistently with this error:

Heuristic determination of mount point failed:stat
/var/lib/kubelet/plugins/kubernetes.io/fc/wwn-lun-0:
no such file or directory

We should create dir at first to avoid the error.

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

**Special notes for your reviewer**:

@rootfs @jsafrane 

**Release note**:

```
NONE
```
2017-09-20 10:01:39 -07:00
Kubernetes Submit Queue 3fa6761bd1 Merge pull request #51869 from cofyc/fix_persistent_rbd
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

RBD Plugin: Omit volume.MetricsProvider field and add some testcases.

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

Embedded struct `volume.MetricProvider` is capitalized and should be omitted in JSON marshalling.   It's also a unmarshalable struct, will cause error in `RBDUtil.loadRBD`. 

**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**:

It's a bug I introduced in https://github.com/kubernetes/kubernetes/pull/48486. It's my bad, sorry about that.

**Release note**:

```release-note
```
2017-09-20 07:50:41 -07:00
Vicken Simonian d0892dfb5d TestIoHandler should not run on unsupported platforms
Fix for failing test on darwin/osx. Skip the test on unsupported
(non-windows and non-linux) platforms.
2017-09-20 00:35:58 -07:00
andyzhangx faffe82df7 add feature: azurefile mount on windows node
fix according to review comments

add comments for SMB mount support on Windows
2017-09-20 07:15:25 +00:00
NickrenREN 21861559bb Minor fix: make sure that gluster implement interface ExpandableVolumePlugin 2017-09-20 12:22:29 +08:00
mtanino a95a1ff6f1 FC plugin: Return target wwn + lun at GetVolumeName()
At volume attach/detach controller, GetVolumeName() is
expected to return unique volume identifier, but FC
plugin didn't return unique identifier if user specified
FC volume using target wwn and lun.

In order to return unique identifier, GetVolumeName()
should use combination of target wwn and lun.

Fixes #52690
2017-09-19 16:39:36 -04:00
foxyriver 0f01a3552d stop the Timer 2017-09-19 19:48:22 +08:00
mtanino 9e83cc78e6 Fix FC WaitForAttach not mounting a volume
WaitForAttach failed consistently with this error:

Heuristic determination of mount point failed:stat
/var/lib/kubelet/plugins/kubernetes.io/fc/<wwn>-lun-0:
no such file or directory

We should create dir first to avoid the error.

Fixes: #52674
2017-09-18 22:42:02 -04:00
mtanino 629718ef0b Refactoring and improvements for iSCSI and FC
This PR makes following changes.

- Simplify volume tearDown path for iSCSI and FC using
  util.UnmountPath().
- Log lastErr during iscsi connection
  If iscsid fails to connect second portal, currently
  the error is ignored silently. The lastErr should be
  logged to find the root cause of problem.
- Remove iscsi plugin directory after iscsi connection
  is successfully closed.
2017-09-18 21:33:11 -04:00
Balu Dontu 2ea619902d Bulk Verify Volumes Implementation for vSphere 2017-09-18 12:01:48 -07:00
xiangpengzhao 39a996ea98 Use const instead of hard code for volume plugin 2017-09-18 20:09:07 +08:00
Kubernetes Submit Queue b7953a787e Merge pull request #52260 from andyzhangx/azuremounter-issue
Automatic merge from submit-queue (batch tested with PRs 52452, 52115, 52260, 52290)

fix azure disk mounter issue

**What this PR does / why we need it**:
fix azure disk mounter issue, it's a P1 bug, it exists in 1.7, 1.8 release, should cherry pick to 1.7, 1.8

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

consider following issue: 
1) A pod mounting an azure disk in a k8s agent
2) The kubelet is restarted in that k8s agent
3) The pod could not start up, it always reports error as following:

  4d            1m              3065    kubelet, 14777acs9000                   Warning         FailedMount     MountVolume.SetUp failed for volume "pvc-7a0cdeb9-92c7-11e7-b86b-000d3a36d70c" : azureDisk - No
t a mounting point for disk andykubewin175-dynamic-pvc-7a0cdeb9-92c7-11e7-b86b-000d3a36d70c on \var\lib\kubelet\pods\d146c023-92c7-11e7-b86b-000d3a36d70c\volumes\kubernetes.io~azure-disk\pvc-7a0cdeb9-92c7-11
e7-b86b-000d3a36d70c
  4d            1m              3157    kubelet, 14777acs9000                   Warning         FailedMount     Error syncing pod

**Special notes for your reviewer**:
If you take a look at following implementation of vsphere or gce, it will return nil instead of error:
https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/vsphere_volume/vsphere_volume.go#L217-L220
https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/gce_pd/gce_pd.go#L273-L275

The logic of return info parsing here, it's wrong to return error
https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/util/operationexecutor/operation_generator.go#L469-L475

**Release note**:

```release-note
```
2017-09-15 02:00:03 -07:00
Kubernetes Submit Queue 1c55faf0bb Merge pull request #51387 from alrs/fix-storageos-swallowed-err
Automatic merge from submit-queue

Fix swallowed errors in various volume packages

**What this PR does / why we need it**: Fixes swallowed errors in various volume packages.

**Release note**:
```release-note NONE
```
2017-09-13 11:10:24 -07:00
Kubernetes Submit Queue 39659ac1dd Merge pull request #51252 from andyzhangx/azuredisk-windows
Automatic merge from submit-queue

Azuredisk mount on windows node

**What this PR does / why we need it**:
This PR will enable azure disk on windows node, customer could create a pod mounted with azure disk on windows node. 
There are a few pending items still left:
1) Current fstype would be forced as NTFS, will change if there is such requirement
2) GetDeviceNameFromMount function is not implemented(empty) because in Linux, we could use "cat /proc/mounts" to read all mounting points in OS easily, but in Windows, there is no such place, I am still figuring out. The empty function would cause a few warning logging, but it will not affect the main logic now.

**Special notes for your reviewer**:
1. This PR depends on https://github.com/kubernetes/kubernetes/pull/51240, which allow windows mount path in config validation
2. There is a bug in docker on windows(https://github.com/moby/moby/issues/34729), the ContainerPath could only be a drive letter now(e.g. D:), dir path would fail in the end.

The example pod with mount path is like below:

```
kind: Pod
apiVersion: v1
metadata:
  name: pod-uses-shared-hdd-5g
  labels:
    name: storage
spec:
  containers:
  - image: microsoft/iis
    name: az-c-01
    volumeMounts:
    - name: blobdisk01
      mountPath: 'F:'
  nodeSelector:
    beta.kubernetes.io/os: windows
  volumes:
  - name: blobdisk01
    persistentVolumeClaim:
      claimName: pv-dd-shared-hdd-5
```

**Release note**:

```release-note
2017-09-12 17:43:13 -07:00
Kubernetes Submit Queue b05d8ad1ec Merge pull request #52338 from PiotrProkop/fix-hugepages
Automatic merge from submit-queue (batch tested with PRs 51041, 52297, 52296, 52335, 52338)

Fix pagesize mount option name

**What this PR does / why we need it**:
Fixes #52337  .
2017-09-12 11:10:18 -07:00
PiotrProkop 8465f96d8d Fix pagesize mount option name 2017-09-12 14:34:39 +02:00