Commit Graph

963 Commits (d02f40a5e725d70f59e9f9e96b22ddad5c0426f7)

Author SHA1 Message Date
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
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
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
Kubernetes Submit Queue b017a7a392 Merge pull request #45518 from portworx/px-remote
Automatic merge from submit-queue (batch tested with PRs 45518, 46127, 46146, 45932, 45003)

Remove requirement to run the Portworx volume driver on master node

**What this PR does / why we need it**:
This change removes requirement to run the Portworx volume driver on Kubernetes master node.

**Special notes for your reviewer**:
Before this pull request, in order to use a Portworx volume, users had to run the Portworx container on the master node. Since it isn't ideal (and impossible on GKE) to schedule any pods on the master node, this PR removes that requirement.
2017-05-25 11:45:59 -07:00
Kubernetes Submit Queue 079020f559 Merge pull request #46160 from NickrenREN/fix-UX
Automatic merge from submit-queue

fix regression in UX experience for double attach volume

send event when volume is not allowed to multi-attach

Fixes #46012

**Release note**:
```release-note
NONE
```
2017-05-25 08:50:12 -07:00
Cheng Xing f9dc2d5ca3 Node status updater now deletes the node entry in attach updates when node is missing in NodeInformer cache. Fixes #42438.
- Added RemoveNodeFromAttachUpdates as part of node status updater operations.
2017-05-24 18:31:47 -07:00
NickrenREN add091b1fb fix regression in UX experience for double attach volume
send event when volume is not allowed to multi-attach
2017-05-25 09:27:24 +08:00
Rohit Agarwal 0f5cc4027f Implement FakeVolumePlugin's ConstructVolumeSpec method according to interface expectation.
This fixes #45803 and #46204.
2017-05-24 17:26:34 -07:00
Harsh Desai ad4f21f26c Dedup common code for fetching portworx driver 2017-05-24 14:52:04 -07:00
Harsh Desai bbfda9cdfe Remove call to common unmount routine as Portworx takes care of all umount workflow 2017-05-24 14:52:03 -07:00
Harsh Desai 779455aa32 fix bazel build 2017-05-24 14:52:03 -07:00
Harsh Desai e860da4bd2 Use Portworx service as api endpoint for volume operations 2017-05-24 14:52:03 -07:00
Harsh Desai 244a0b7b7e Add support for Portworx plugin to query remote API servers 2017-05-24 14:52:03 -07:00
Humble Chirammal 55808add37 Dont exit if 'mount.glusterfs -V' resulted in an error.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-24 21:07:58 +05:30
Kubernetes Submit Queue 70dd10cc50 Merge pull request #41785 from jamiehannaford/cinder-performance
Automatic merge from submit-queue (batch tested with PRs 38505, 41785, 46315)

Only retrieve relevant volumes

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

Improves performance for Cinder volume attach/detach calls. 

Currently when Cinder volumes are attached or detached, functions try to retrieve details about the volume from the Nova API. Because some only have the volume name not its UUID, they use the list function in gophercloud to iterate over all volumes to find a match. This incurs severe performance problems on OpenStack projects with lots of volumes (sometimes thousands) since it needs to send a new request when the current page does not contain a match. A better way of doing this is use the `?name=XXX` query parameter to refine the results.

**Which issue this PR fixes**:

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

**Special notes for your reviewer**:

There were 2 ways of addressing this problem:

1. Use the `name` query parameter
2. Instead of using the list function, switch to using volume UUIDs and use the GET function instead. You'd need to change the signature of a few functions though, such as [`DeleteVolume`](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/cinder/cinder.go#L49), so I'm not sure how backwards compatible that is.

Since #1 does effectively the same as #2, I went with it because it ensures BC.

One assumption that is made is that the `volumeName` being retrieved matches exactly the name of the volume in Cinder. I'm not sure how accurate that is, but I see no reason why cloud providers would want to append/prefix things arbitrarily. 

**Release note**:
```release-note
Improves performance of Cinder volume attach/detach operations
```
2017-05-24 06:46:59 -07:00
Jamie Hannaford 4bd71a3b77 Refactor to use Volume IDs and remove ambiguity 2017-05-24 12:59:16 +02:00
pospispa 9eb912e62f Admin Can Specify in Which AWS Availability Zone(s) a PV Shall Be Created
An admin wants to specify in which AWS availability zone(s) users may create persistent volumes using dynamic provisioning.

That's why the admin can now configure in StorageClass object a comma separated list of zones. Dynamically created PVs for PVCs that use the StorageClass are created in one of the configured zones.
2017-05-24 10:48:11 +02:00
pospispa d73c0d649d Admin Can Specify in Which GCE Availability Zone(s) a PV Shall Be Created
An admin wants to specify in which GCE availability zone(s) users may create persistent volumes using dynamic provisioning.

That's why the admin can now configure in StorageClass object a comma separated list of zones. Dynamically created PVs for PVCs that use the StorageClass are created in one of the configured zones.
2017-05-24 10:48:10 +02:00
pospispa dd17d620d7 Added func ValidateZone
The zone parameter provided in a Storage Class may erroneously be an empty string or contain only spaces and tab characters. Such situation shall be detected and reported as an error.

That's why the func ValidateZone was added.
2017-05-24 10:48:10 +02:00
pospispa 0f3a9cfc5f Added func ZonesToSet
An admin shall be able to configure a comma separated list of zones for a StorageClass.

That's why the func ZonesToSet (string) (set.String, error) is added. The func ZonesToSet converts a string containing a comma separated list of zones to a set. In case the list contains an empty zone an error is returned.
2017-05-24 10:48:10 +02:00
Kubernetes Submit Queue 286bcc6f5c Merge pull request #45995 from humblec/glusterfs-mount-3
Automatic merge from submit-queue

Add `auto_unmount` mount option for glusterfs fuse mount.

libfuse has an auto_unmount option which, if enabled, ensures that
the file system is unmounted at FUSE server termination by running a
separate monitor process that performs the unmount when that occurs.
(This feature would probably better be called "robust auto-unmount",
as FUSE servers usually do try to unmount their file systems upon
termination, it's just this mechanism is not crash resilient.)
This change implements that option and behavior for glusterfs.

This option will be only supported for clients with version >3.11.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-23 00:29:41 -07:00
Balu Dontu eb3cf509e5 SPBM policy ID support in vsphere cloud provider 2017-05-22 19:45:17 -07:00
Michelle Au dd46c7f88e Local volume plugin 2017-05-22 14:44:51 -07:00
Michelle Au 06f25b03eb Check volume node affinity before mount 2017-05-22 14:44:06 -07:00
Michelle Au 6ade5461ad Add GetNodeLabels to VolumeHost interface 2017-05-22 14:44:06 -07:00
Humble Chirammal 04bf95a5d1 Add `auto_unmount` mount option for glusterfs fuse mount.
libfuse has an auto_unmount option which, if enabled, ensures that
the file system is unmounted at FUSE server termination by running a
separate monitor process that performs the unmount when that occurs.
(This feature would probably better be called "robust auto-unmount",
as FUSE servers usually do try to unmount their file systems upon
termination, it's just this mechanism is not crash resilient.)
This change implements that option and behavior for glusterfs.

This option will be only supported for clients with version >3.11.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-22 23:50:54 +05:30
FengyunPan ae7bf3e649 Fix missing close file 2017-05-22 22:02:55 +08:00
Jordan Liggitt b22ff25638
Pass pod metadata to flex plugin 2017-05-18 00:49:18 -04:00
Kubernetes Submit Queue 2cf0169092 Merge pull request #45895 from humblec/glusterfs-defacto
Automatic merge from submit-queue

Make interface references consistent across the gluster plugin code.
2017-05-17 09:42:40 -07:00
Humble Chirammal 19ecd5bd62 Make interface references consistent across the plugin code.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-17 10:19:56 +05:30
Kubernetes Submit Queue f171683242 Merge pull request #44537 from FengyunPan/fix-volume-bug
Automatic merge from submit-queue (batch tested with PRs 45374, 44537, 45739, 44474, 45888)

Fix attach volume to instance repeatedly

1.When volume's status is 'attaching', controllermanager will attach
    it again and return err. So it is necessary to check volume's
    status before attach/detach volume.

   2. When volume's status is 'attaching', its attachments will be None,
    controllermanager can't get device path and make some failed event.
    But it is normal, so don't return err when attachments is None

Fix bug: #44536
2017-05-16 18:10:55 -07:00
Kubernetes Submit Queue 11a6f190be Merge pull request #45528 from humblec/glusterfs-code-refactor
Automatic merge from submit-queue (batch tested with PRs 45408, 45355, 45528)

Make createEndpointService() and deleteEndpointService() plugin interface methods.

Why this change?

In some setups, after creation of dynamic PVs and before mounting/using these  PVs in a pod, the endpoint/service got mistakenly deleted by the user/developer. By making these methods 'plugin' specific, we can call it from mounter if there are scenarios where the endpoint and service got wiped in between accidentally.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-16 09:12:00 -07:00
Humble Chirammal 936c81ddfb Recreate endpoint/service if it lost in between.
In some setups, after creation of dynamic PVs and before mounting/using
these PVs in a pod, the endpoint/service got mistakenly deleted by the
user/developer. By making these methods 'plugin' specific, we can call
it from mounter if there are scenarios where the endpoint and service
got wiped in between accidentally.

Signed-off-by: Humble Chirammal hchiramm@redhat.com
2017-05-16 19:51:21 +05:30
FengyunPan d86bf8a0b8 Fix reconciler test of attaching volume
The Attach() of FakeVolume should return device path
2017-05-13 15:19:34 +08:00
FengyunPan 4a6e1f2a1d Don't return err when volume's status is 'attaching'
When volume's status is 'attaching', its attachments will be None,
controllermanager can't get device path and make some failed event.
But it is normal, let's fix it.
2017-05-12 19:53:50 +08:00