Commit Graph

963 Commits (d02f40a5e725d70f59e9f9e96b22ddad5c0426f7)

Author SHA1 Message Date
Fabian Deutsch 2367d7de2f volume: Document multipath configuration
Add some lines about how to enable multipath for block storage.
A new README was added, because multipath is relevant for at least
FC and iSCSI.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2017-02-24 09:59:11 +01:00
Fabian Deutsch 68c3502954 fc: Drop multipath.conf snippet
A minimalistic multipath.conf got written, but it was useless, as
it is unclear if multipathd is running and there was also no
config reload triggered.

This patch drops this snippet. In general it's probably a better idea
to leave the multipath.conf to the component managing the host.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2017-02-24 09:59:11 +01:00
Humble Chirammal 43c0a6869d This feature ensures the `backup servers` in the trusted pool
is contacted if there is a failure in the connected server.
Mount option becomes:
mount -t glusterfs -o log-level=ERROR,log-file=/var/lib/kubelet/plugins/kubernetes.io/glusterfs/glustermount/glusterpod-glusterfs.log,backup-volfile-servers=192.168.100.0:192.168.200.0:192.168.43.149 ..

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-24 13:00:34 +05:30
Kubernetes Submit Queue 3adc12c5f5 Merge pull request #41113 from vmware/AddDatastoreParamForDynamicProvisioning
Automatic merge from submit-queue

Fix for Support selection of datastore for dynamic provisioning in vS…

Fixes #40558

Current vSphere Cloud provider doesn't allow a user to select a datastore for dynamic provisioning. All the volumes are created in default datastore provided by the user in the global vsphere configuration file.

With this fix, the user will be able to provide the datastore in the storage class definition. This will allow the volumes to be created in the datastore specified by the user in the storage class definition. This field is optional. If no datastore is specified, the volume will be created in the default datastore specified in the global config file.

For example:

User creates a storage class with the datastore

kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: slow
provisioner: kubernetes.io/vsphere-volume
parameters:
diskformat: thin
datastore: VMFSDatastore
Now the volume will be created in the datastore - "VMFSDatastore" specified by the user.

If the user creates a storage class without any datastore

kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: slow
provisioner: kubernetes.io/vsphere-volume
parameters:
diskformat: thin
Now the volume will be created in the datastore which in the global configuration file (vsphere.conf)

@pdhamdhere @kerneltime
2017-02-23 22:10:42 -08:00
Kubernetes Submit Queue b5d010d6a3 Merge pull request #40910 from justinsb/fix_35695
Automatic merge from submit-queue (batch tested with PRs 41667, 41820, 40910, 41645, 41361)

Allow multiple mounts in StatefulSet volume zone placement

We have some heuristics that ensure that volumes (and hence stateful set
pods) are spread out across zones.  Sadly they forgot to account for
multiple mounts.  This PR updates the heuristic to ignore the mount name
when we see something that looks like a statefulset volume, thus
ensuring that multiple mounts end up in the same AZ.

Fix #35695

```release-note
Fix zone placement heuristics so that multiple mounts in a StatefulSet pod are created in the same zone
```
2017-02-23 20:57:29 -08:00
Kubernetes Submit Queue e373b5981a Merge pull request #41778 from NickrenREN/volume-typo
Automatic merge from submit-queue (batch tested with PRs 38702, 41810, 41778, 41858, 41872)

fix some typos and var style

**Release note**:

```NONE
```
2017-02-23 07:54:37 -08:00
Justin Santa Barbara 62b8010aa2 Curate owners for pkg/volume/aws_ebs
The previous list was algorithmically generated; applying some curation.
2017-02-22 22:51:08 -05:00
Kubernetes Submit Queue ae8f537c87 Merge pull request #41688 from humblec/iscsi-reviewer
Automatic merge from submit-queue

Update reviewer list for iscsi volume plugin.

Contributed nodiskconflict, multipath feature .etc to iscsi volume plugin. 
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-22 18:18:22 -08:00
Humble Chirammal 3ade29ff73 Factor new GetClusterNodes() out of CreateVolume()".
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-22 22:44:55 +05:30
Balu Dontu 12f75f0b86 Fix for Support selection of datastore for dynamic provisioning in vSphere 2017-02-21 19:04:45 +00:00
Kubernetes Submit Queue a67e78e4fa Merge pull request #40317 from kpgriffith/recycle-vol-plug-cleanup
Automatic merge from submit-queue (batch tested with PRs 41364, 40317, 41326, 41783, 41782)

changes to cleanup the volume plugin for recycle

**What this PR does / why we need it**:
Code cleanup. Changing from creating a new interface from the plugin, that then calls a function to recycle a volume, to adding the function to the plugin itself.

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

**Special notes for your reviewer**:
Took same approach from closed PR #28432.

Do you want the approach to be the same for NewDeleter(), NewMounter(), NewUnMounter() and should they be in this same PR or submit different PR's for those?

**Release note**:

```NONE
```
2017-02-21 07:45:40 -08:00
Ivan Shvedunov e80ae63028 Make Downward API test table-driven 2017-02-21 16:43:30 +03:00
Johannes Scheuermann 96e43e406e Remove unnecessary constants and add type to secret 2017-02-21 14:02:46 +01:00
NickrenREN 6899dd85d4 fix some typos and var style 2017-02-21 17:08:14 +08:00
Jeff Peeler ec701a65e8 Generated files for projected volume driver 2017-02-20 13:09:41 -05:00
Jeff Peeler 8fb1b71c66 Implements projected volume driver
Proposal: kubernetes/kubernetes#35313
2017-02-20 12:56:04 -05:00
Kubernetes Submit Queue 7236af6162 Merge pull request #39373 from apprenda/fix_configmap
Automatic merge from submit-queue (batch tested with PRs 39373, 41585, 41617, 41707, 39958)

Fix ConfigMaps for Windows

**What this PR does / why we need it**: ConfigMaps were broken for Windows as the existing code used linux specific file paths. Updated the code in `kubelet_getters.go` to use `path/filepath` to get the directories. Also reverted back the code in `secret.go` as updating `kubelet_getters.go` to use `path/filepath` also fixes `secrets`

**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/39372

```release-note
Fix ConfigMap for Windows Containers.
```

cc: @pires
2017-02-19 13:50:37 -08:00
Justin Santa Barbara bba343d066 Allow multiple mounts in StatefulSet volume zone placement
We have some heuristics that ensure that volumes (and hence stateful set
pods) are spread out across zones.  Sadly they forgot to account for
multiple mounts.  This PR updates the heuristic to ignore the mount name
when we see something that looks like a statefulset volume, thus
ensuring that multiple mounts end up in the same AZ.

Fix #35695
2017-02-19 02:20:04 -05:00
Humble Chirammal 1fd341ee72 Update reviewer list for iscsi volume plugin.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-18 13:12:03 +05:30
Kubernetes Submit Queue 34ffba6cd2 Merge pull request #40726 from humblec/gluster-provclean
Automatic merge from submit-queue (batch tested with PRs 40505, 34664, 37036, 40726, 41595)

Rename provisioner config struct
2017-02-16 17:05:15 -08:00
Huamin Chen 71406aa4a6 force rbd image unlock if the image is not used
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-02-16 15:55:55 -05:00
Kubernetes Submit Queue f07112f78a Merge pull request #41461 from humblec/humble-reviewer
Automatic merge from submit-queue

Updating reviewer list.
2017-02-16 08:33:12 -08:00
Kubernetes Submit Queue ddf4a0cad5 Merge pull request #40417 from jsravn/fix-reconciler-external-updates-race
Automatic merge from submit-queue (batch tested with PRs 41531, 40417, 41434)

Always detach volumes in operator executor

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

Instead of marking a volume as detached immediately in Kubelet's
reconciler, delegate the marking asynchronously to the operator
executor. This is necessary to prevent race conditions with other
operations mutating the same volume state.

An example of one such problem:

1. pod is created, volume is added to desired state of the world
2. reconciler process starts
3. reconciler starts MountVolume, which is kicked off asynchronously via
   operation_executor.go
4. MountVolume mounts the volume, but hasn't yet marked it as mounted
5. pod is deleted, volume is removed from desired state of the world
6. reconciler reaches detach volume section, detects volume is no longer in desired state of world,
   removes it from volumes in use
7. MountVolume tries to mark mount, throws an error because
   volume is no longer in actual state of world list. After this, kubelet isn't aware of the mount
   so doesn't try to unmount again.
8. controller-manager tries to detach the volume, this fails because it
   is still mounted to the OS.
9. EBS gets stuck indefinitely in busy state trying to detach.



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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-02-15 23:01:07 -08:00
Humble Chirammal 5b1aa04ccc Updating reviewer list.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-15 13:19:51 +05:30
Cristian Pop b23b475498 Implemented suggestions for #39202 fix to facilitate kubelet upgrade. The detachDisk behavior is now preserved for pods that were created before the kubelet upgrade. 2017-02-14 22:50:26 +02:00
Cristian Pop 2aaeefeeb8 Updated TestExtractDeviceAndPrefix and added TestExtractIface to reflect the changes brought by the #39202 fix. 2017-02-14 11:34:03 +02:00
Cristian Pop b0d285c706 Fix for Premature iSCSI logout #39202. 2017-02-14 11:34:03 +02:00
Kubernetes Submit Queue a75b61d7a3 Merge pull request #39928 from humblec/iscsi-multipath-backuptp
Automatic merge from submit-queue

Add mulitpath support to iscsi plugin

#issue https://github.com/kubernetes/kubernetes/issues/39345
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-13 12:18:55 -08:00
James Ravn 9992bd23c2 Mark detached only if no pending operations
To safely mark a volume detached when the volume controller manager is used.

An example of one such problem:

1. pod is created, volume is added to desired state of the world
2. reconciler process starts
3. reconciler starts MountVolume, which is kicked off asynchronously via
   operation_executor.go
4. MountVolume mounts the volume, but hasn't yet marked it as mounted
5. pod is deleted, volume is removed from desired state of the world
6. reconciler detects volume is no longer in desired state of world,
   removes it from volumes in use
7. MountVolume tries to mark volume in use, throws an error because
   volume is no longer in actual state of world list.
8. controller-manager tries to detach the volume, this fails because it
   is still mounted to the OS.
9. EBS gets stuck indefinitely in busy state trying to detach.
2017-02-13 11:51:44 +00:00
Ferdinand Hübner 8fd0624bc4 resolve udevadm from PATH 2017-02-10 22:22:32 +01:00
Kubernetes Submit Queue 6ea92b47eb Merge pull request #39998 from DukeXar/cinder_instance_id
Automatic merge from submit-queue (batch tested with PRs 41246, 39998)

Cinder volume attacher: use instanceID instead of NodeID when verifying attachment

**What this PR does / why we need it**: Cinder volume attacher incorrectly uses NodeID instead of openstack instance id, so that reconciliation fails.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-02-10 07:53:58 -08:00
Kubernetes Submit Queue 3ed7394cb1 Merge pull request #41042 from gnufied/add-gnufied-reviewer-gce-aws-volume
Automatic merge from submit-queue

Add gnufied as reviewer for aws and gce volumes

Adding myself as reviewer for aws and gce volume plugins. I understand the code well enough and have helped with review in those areas already.

cc @childsb @justinsb @saad-ali
2017-02-07 22:12:23 -08:00
Kubernetes Submit Queue 5034d96bfb Merge pull request #40861 from lucab/to-k8s/bump-test-images
Automatic merge from submit-queue (batch tested with PRs 40345, 38183, 40236, 40861, 40900)

test: bump mounttest and mounttest-users images

This PR bumps two test images to latest versions:
 * mounttest to 0.8
 * mounttest-user to 0.5

It is a followup to https://github.com/kubernetes/kubernetes/pull/40613 and https://github.com/kubernetes/kubernetes/pull/40821.
2017-02-07 11:33:44 -08:00
Hemant Kumar 8fad1a6aec Add gnufied as reviewer for aws and gce volumes 2017-02-06 16:38:13 -05:00
Kevin Griffith 9448aa66ff cleanup the volume plugin for recycle
update commit to reflect changes
2017-02-06 10:38:49 -06:00
Humble Chirammal 332e26dc8c Add portals field to iscsi volume source to achieve multipathing.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-06 17:06:33 +05:30
Luca Bruno 85b1def175
test: update to use mounttest:0.8 and mounttest-user:0.5 2017-02-02 20:41:18 +00:00
Vladimir Vivien 8ebed57767 Prevent pv controller from forcefully overwrite provisioned volume name
This fix prevents the PV controller from forcefully overwriting the provisioned volume's name with the generated PV name.  Instead, it allows dynamic provisioner implementers to set the name of the volume to a value that they choose.
2017-02-01 12:19:20 -05:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
Kubernetes Submit Queue 1cd06fbcf0 Merge pull request #38797 from aaron12134/spell-obsession
Automatic merge from submit-queue (batch tested with PRs 38772, 38797, 40732, 40740)

Synchronous spellcheck for pkg/volume/*

**What this PR does / why we need it**: Increase code readability

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

**Release note**:

```release-note
```
2017-01-31 11:00:47 -08:00
Humble Chirammal 9c7c2dcd20 Renames provisioner config struct
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-01-31 23:04:32 +05:30
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
deads2k 9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
Dr. Stefan Schimanski a0137e9b28 Update generated files 2017-01-25 19:49:45 +01:00
Dr. Stefan Schimanski d7eb3b6870 pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
Jitendra Bhurat 0cbf75c400
kubelet: Fix ConfigMap on Windows. 2017-01-24 18:40:49 +00:00
Kubernetes Submit Queue f18a921a03 Merge pull request #40311 from deads2k/client-13-move-util
Automatic merge from submit-queue (batch tested with PRs 40299, 40311)

move authoritative client-go util out of pkg

Move `client-go/pkg/util` which are authoritative to `client-go/util` to make it easier to reason about what comes from where.
2017-01-24 08:59:59 -08:00
Kubernetes Submit Queue 68f123dfa0 Merge pull request #37275 from xiangfeiz/cinder-rescan-scsi
Automatic merge from submit-queue

Adding rescan scsi controller for cinder

For lsilogic scsi controller, attached cinder volume does not
appear under /dev/ automatically unless do a rescan.
This approach was used in vSphere volume provider before PR #27496
dropped support for lsilogic scsi controller.
2017-01-24 06:24:59 -08:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Kubernetes Submit Queue 43286a82c6 Merge pull request #39981 from fraenkel/optional_configmaps_secrets
Automatic merge from submit-queue

Optional configmaps and secrets

Allow configmaps and secrets for environment variables and volume sources to be optional

Implements approved proposal c9f881b7bb

Release note:
```release-note
Volumes and environment variables populated from ConfigMap and Secret objects can now tolerate the named source object or specific keys being missing, by adding `optional: true` to the volume or environment variable source specifications.
```
2017-01-23 23:06:35 -08:00
Michael Fraenkel ca207be4a3 Generated code 2017-01-23 20:12:24 -07:00
Michael Fraenkel 4e466040d9 Allow Optional ConfigMap and Secrets
- ConfigMaps and Secrets for Env or Volumes are allowed to be optional
2017-01-23 18:59:49 -07:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Clayton Coleman 245b592fac
Convert core code to metav1.ListOptions 2017-01-23 17:52:45 -05:00
Wojciech Tyczynski bf7138652f SecretVolume using secret manager 2017-01-23 16:10:01 +01:00
Kubernetes Submit Queue b5929bfb2b Merge pull request #38789 from jessfraz/cleanup-temp-dirs
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

Cleanup temp dirs

So funny story my /tmp ran out of space running the unit tests so I am cleaning up all the temp dirs we create.
2017-01-20 12:34:58 -08:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
Kubernetes Submit Queue 8f99b74466 Merge pull request #40030 from colemickens/colemickens-dyn-disk-name-length
Automatic merge from submit-queue (batch tested with PRs 39826, 40030)

azure disk: restrict length of name

**What this PR does / why we need it**:
Fixes dynamic disk provisioning on Azure by properly truncating the disk name to conform to the Azure API spec.

**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
azure disk: restrict name length for Azure specifications
```

cc: @rootfs
2017-01-17 21:37:02 -08:00
Kubernetes Submit Queue f56b606985 Merge pull request #36520 from apelisse/owners-pkg-volume
Automatic merge from submit-queue

Curating Owners: pkg/volume

cc @jsafrane @spothanis @agonzalezro @justinsb @johscheuer @simonswine @nelcy @pmorie @quofelix @sdminonne @thockin @saad-ali @rootfs

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-17 19:56:39 -08:00
Anton Klautsan 084d801e0a Add unit-tests for DisksAreAttached 2017-01-18 01:55:39 +00:00
Anton Klautsan 2267588d95 Cinder volume attacher: use instanceID not NodeID 2017-01-18 01:52:46 +00:00
Saad Ali 9d08c9a3d9 Update OWNERS 2017-01-17 17:37:51 -08:00
Saad Ali 526578679b Update OWNERS 2017-01-17 17:36:34 -08:00
Saad Ali 6500f08e2f Update OWNERS 2017-01-17 17:32:49 -08:00
Saad Ali 5783a0ec4c Update OWNERS 2017-01-17 17:24:35 -08:00
Saad Ali a420973187 Update OWNERS 2017-01-17 16:36:50 -08:00
Saad Ali d25c20bc3f Update OWNERS 2017-01-17 16:35:21 -08:00
Saad Ali d6ba2fc37a Update OWNERS 2017-01-17 16:34:34 -08:00
Saad Ali 7c67211734 Update OWNERS 2017-01-17 16:33:13 -08:00
Saad Ali b0e588eec2 Update OWNERS 2017-01-17 16:31:46 -08:00
Saad Ali cb1bbf14af Update OWNERS 2017-01-17 16:31:03 -08:00
Saad Ali 7918a8e8c2 Update OWNERS 2017-01-17 16:28:05 -08:00
Saad Ali 8e371e6dbf Update OWNERS 2017-01-17 16:26:16 -08:00
Saad Ali c8fbfd93df Update OWNERS 2017-01-17 16:24:46 -08:00
Saad Ali 04f20a06a6 Update OWNERS 2017-01-17 16:24:25 -08:00
Saad Ali 9f1181dc55 Update OWNERS 2017-01-17 16:24:01 -08:00
Saad Ali dc9eea2f3c Update OWNERS 2017-01-17 16:22:36 -08:00
Saad Ali 16cbb574e4 Update OWNERS 2017-01-17 16:20:24 -08:00
Saad Ali 70ed66cdf8 Update OWNERS 2017-01-17 16:14:14 -08:00
Saad Ali 8159e620a1 Update OWNERS 2017-01-17 16:13:17 -08:00
Saad Ali 602b682a2a Update OWNERS 2017-01-17 16:12:45 -08:00
Saad Ali 7ed31e4761 Update OWNERS 2017-01-17 16:08:57 -08:00
Saad Ali b4ac15ae05 Update OWNERS 2017-01-17 16:05:40 -08:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Clayton Coleman 36acd90aba
Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
Cole Mickens 8adcf077f3 azure disk: restrict length of name 2017-01-17 09:38:53 -08:00
deads2k 8686d67c80 move pkg/util/rand 2017-01-16 16:04:03 -05:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Kubernetes Submit Queue 823d760ab5 Merge pull request #39844 from screeley44/replica_bug
Automatic merge from submit-queue (batch tested with PRs 39807, 37505, 39844, 39525, 39109)

fix bug not using volumetype config in create volume

fixes #39843 

@humblec 

we are building the volumetype config but I don't see where we are using it in the CreateVolume for dyn provisioning, this is why volumetype parameter from the Storage Class was being overlooked because we are hard coding constants like replicaCount which is always 3.

unless I'm missing something?
2017-01-13 13:40:43 -08:00
Scott Creeley 164809c86e fix bug not using volumetype config in create volume 2017-01-12 22:14:04 -05:00
Kubernetes Submit Queue ee49906c45 Merge pull request #39661 from NickrenREN/clientset-redundant-modify
Automatic merge from submit-queue

fix redundant alias clientset

remove redundant alias clientset
2017-01-12 13:29:16 -08:00
NickrenREN a12dea14e0 fix redundant alias clientset 2017-01-12 10:21:05 +08:00
rkouj 32766e3b6d Check if path exists before performing unmount 2017-01-11 14:33:05 -08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue c03ec462fd Merge pull request #39477 from dashpole/zombie_wc
Automatic merge from submit-queue (batch tested with PRs 39486, 37288, 39477, 39455, 39542)

Fix wc zombie goroutine issue in volume util

See [Cadvisor #1558](https://github.com/google/cadvisor/pull/1558).  This should solve problems for those using images that do not support "wc".
cc: @timstclair
2017-01-10 14:33:15 -08:00
Humble Chirammal 90266eb7ce Let admin configure the volume type and parameters for gluster DP volumes
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-01-06 12:33:25 +05:30
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
David Ashpole 094cfd7244 Fixed wc zombie goroutine issue 2017-01-05 10:58:16 -08:00
Kubernetes Submit Queue 5503e5e6be Merge pull request #39413 from zdj6373/cinder
Automatic merge from submit-queue (batch tested with PRs 39433, 39413)

"Attach" function records information collation

In the "attach" function, the log information, for the variable "instanceid", has been described as "node", as well as recorded as "instance", recorded as "instance" should be better.
2017-01-05 10:35:18 -08:00
Huamin Chen 7dae0547ec azure disk: add logging on disk attach
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-01-05 18:29:06 +00:00
Kubernetes Submit Queue fd7408d076 Merge pull request #39288 from rkouj/unit-test-operation-executor
Automatic merge from submit-queue

Add unit tests for operation_executor

Add unit test for `Unmount operations should start in parallel for all volume plugins`

cc: @saad-ali
2017-01-04 18:52:22 -08:00
Kubernetes Submit Queue eb8739d3c1 Merge pull request #39311 from rkouj/refactor-tear-down-at
Automatic merge from submit-queue

Check if pathExists before performing Unmount

Unmount operation should not fail if path does not exist

Part two of: https://github.com/kubernetes/kubernetes/pull/38547
Plugins status captured here: https://github.com/kubernetes/kubernetes/issues/39251

cc: @saad-ali
2017-01-04 18:10:30 -08:00
Jess Frazelle 6f3212f831
cleanup flocker in /tmp
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:27:04 -08:00
Jess Frazelle ce11f74961
cleanup flockerVolumeTest in /tmp
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:27:02 -08:00
Jess Frazelle ba617fdd1b
cleanup metrics_du_test in /tmp
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:27:00 -08:00
Jess Frazelle 9183940293
cleanup atomic-write temp directories
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-01-04 10:26:22 -08:00
zdj6373 84316ad559 "Attach" function records information collation 2017-01-04 16:42:24 +08:00
Kubernetes Submit Queue 49fe0bea97 Merge pull request #37380 from jsafrane/rbd-errors
Automatic merge from submit-queue (batch tested with PRs 39092, 39126, 37380, 37093, 39237)

Improve error reporting in Ceph RBD provisioner.

- We should report an error when user references a secret that cannot be found
- We should report output of rbd create/delete commands, logging "exit code 1"
  is not enough.


Before:
```
Events:
  FirstSeen     LastSeen        Count   From                            SubobjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                            -------------   --------        ------                  -------
  33m           33m             1       {persistentvolume-controller }                  Warning         ProvisioningFailed      Failed to provision volume with StorageClass "cephrbdprovisioner": rbd: create volume failed, err: exit status 1
```

After:

```
Events:
  FirstSeen     LastSeen        Count   From                            SubobjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                            -------------   --------        ------                  -------
  33m           33m             1       {persistentvolume-controller }                  Warning         ProvisioningFailed      Failed to provision volume with StorageClass "cephrbdprovisioner": failed to create rbd image: exit status 1, command output: rbd: couldn't connect to the cluster
```


@rootfs, PTAL
2017-01-03 09:45:22 -08:00
Kubernetes Submit Queue 85bf256709 Merge pull request #39075 from ChenLingPeng/github-waitfor
Automatic merge from submit-queue

no need to sleep for last retry

break for needless sleep
2017-01-03 07:26:00 -08:00
Kubernetes Submit Queue 3fe288d74e Merge pull request #36221 from pospispa/86-5-add-checks-and-documentation-about-template-pods-for-recycling
Automatic merge from submit-queue (batch tested with PRs 37959, 36221)

Recycle Pod Template Check

The kube-controller-manager has two command line arguments (--pv-recycler-pod-template-filepath-hostpath and --pv-recycler-pod-template-filepath-nfs) that specify a recycle pod template. The recycle pod template may not contain the volume that shall be recycled.

A check is added to make sure that the recycle pod template contains at least a volume.

cc: @jsafrane
2017-01-02 05:08:30 -08:00
rkouj 7ebcab8c19 Add unit tests for operation_executor 2016-12-29 18:37:22 -08:00
rkouj 8cec46e8ca Check if pathExists before performing Unmount 2016-12-29 18:06:43 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Kubernetes Submit Queue c3771cbaf9 Merge pull request #36922 from rkouj/refactor-operation-executor
Automatic merge from submit-queue

Refactor operation_executor to make it testable

**What this PR does / why we need it**:
To refactor operation_executor to make it unit testable

**Release note**:
`NONE`
2016-12-27 19:01:56 -08:00
Kubernetes Submit Queue d4bf500e73 Merge pull request #39055 from anguslees/detach
Automatic merge from submit-queue (batch tested with PRs 39152, 39142, 39055)

openstack: Forcibly detach an attached cinder volume before attaching elsewhere

Fixes #33288



**What this PR does / why we need it**:
Without this fix, we can't preemptively reschedule pods with persistent volumes to other hosts (for rebalancing or hardware failure recovery).

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

**Special notes for your reviewer**:
(This is a resurrection/cleanup of PR #33734, originally authored by @Rotwang)

**Release note**:
2016-12-27 17:10:14 -08:00
rkouj e7e3c55ad7 Add unit tests for MountVolume() of operation executor 2016-12-27 16:07:06 -08:00
rkouj d5f7610b82 Refactor operation_executor to make it unit testable 2016-12-27 15:12:16 -08:00
Tim Hockin f75bed8682 Add a ForEach() to bitmap allocator 2016-12-26 21:59:27 -08:00
Harry Zhang 5a7661b483 Raise markVolMountedErr instead of mount err 2016-12-26 07:52:51 +00:00
Kubernetes Submit Queue 1c2a23e48c Merge pull request #39014 from resouer/fix-nil-glusterfs
Automatic merge from submit-queue (batch tested with PRs 39029, 39014)

[Glusterfs Vol Plugin]: Check kube client is invalid and return error

Fixes: #38939

In volume plugins, we need to create a kube client to make api call. And this kube client can be nil when, for example, wrong api-server configuration, but kubelet should not crash in this case.

I have also checked other plugins and found only glusterfs need this fix.
2016-12-23 06:39:29 -08:00
Kubernetes Submit Queue f1aa025837 Merge pull request #38655 from abrarshivani/fsGroupforvSphere
Automatic merge from submit-queue (batch tested with PRs 39059, 39175, 35676, 38655)

Fix fsGroup to vSphere

**What this PR does / why we need it**:
Fixes #34039 by adding support for fsGroup to vSphere Volume. 

**Special notes for your reviewer**:
Tested with example from http://stackoverflow.com/questions/35213589/docker-container-with-non-root-user-deployed-in-google-container-engine-can-not
Before this fix got error ```Permission Denied```.

**Release note**:

`NONE`

cc @pdhamdhere @kerneltime @BaluDontu
2016-12-22 18:50:34 -08:00
pospispa ef43f82de8 Recycle Pod Template Check
The kube-controller-manager has two command line arguments (--pv-recycler-pod-template-filepath-hostpath and --pv-recycler-pod-template-filepath-nfs) that specify a recycle pod template. The recycle pod template may not contain the volume that shall be recycled.

A check is added to make sure that the recycle pod template contains at least a volume.
2016-12-22 17:44:32 +01:00
forrestchen 1d9f754565 no need to sleep for last retry
Signed-off-by: forrestchen <forrestchen@tencent.com>
2016-12-21 17:52:01 +08:00
Kubernetes Submit Queue 1abb8498aa Merge pull request #36888 from linki/patch-1
Automatic merge from submit-queue (batch tested with PRs 36888, 38180, 38855, 38590)

wrong pod reference in error message for volume attach timeout

**What this PR does / why we need it**:
when a disk mount times out you get the following error:

```
Warning		FailedSync	Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "nginx"/"default". list of unattached/unmounted volumes=[data]
```

where the pod is referenced by "podname"/"namespace", but should be "namespace"/"podname".

**Which issue this PR fixes**
no issue number

**Special notes for your reviewer**:
untested :(
2016-12-20 20:33:52 -08:00
Kubernetes Submit Queue abe2b3ce1c Merge pull request #38374 from NickrenREN/cinder-getDeviceMountPath-test
Automatic merge from submit-queue

cinder attacher GetDeviceMountPath
2016-12-20 19:16:26 -08:00
Harry Zhang 443ae87b7e Check kube client is valid 2016-12-21 10:38:50 +08:00
Angus Lees fa1d6f3838 Forcibly detach an attached volume before attaching elsewhere
Fixes #33288

Co-Authored-By: @Rotwang
2016-12-21 11:57:10 +11:00
NickrenREN 430abfbdfe cinder attacher GetDeviceMountPath
add function to test GetDeviceMountPath func return value
2016-12-20 10:15:34 +08:00
rkouj c14d47dffe Use common unmount util func for TearDownAt() 2016-12-19 16:40:55 -08:00
Kenjiro Nakayama 13660ef701 Catch error when failed to make directory in NFS volume plugin 2016-12-15 17:04:35 +09:00
aaronxu 37f5d4d719 Synchronous spellcheck for pkg/volume/* 2016-12-14 20:07:10 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Abrar Shivani 5cb7faac5e Fix fsGroup to vSphere 2016-12-12 14:35:13 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Kubernetes Submit Queue aa51a165c1 Merge pull request #38378 from obnoxxx/glusterfs-gid-checks
Automatic merge from submit-queue (batch tested with PRs 38284, 38403, 38265, 38378)

glusterfs: properly check gidMin and gidMax values from SC individually

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

This fixes a misleading debug message, and also prevents the glusterfs provisioner from adapting a misconfiguration of the gid-range in the storage class. Instead it will fail with proper error messages.

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

https://bugzilla.redhat.com/show_bug.cgi?id=1402286

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```

Don't override explict out-of max-range configuration, but
fail with an error message instead.

Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-09 09:31:09 -08:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Kubernetes Submit Queue b0b6f3c256 Merge pull request #38401 from liggitt/addressable-deep-copy
Automatic merge from submit-queue (batch tested with PRs 36071, 32752, 37998, 38350, 38401)

Pass addressable values to DeepCopy

Extracted from https://github.com/kubernetes/kubernetes/pull/35728

These are the places we are currently calling DeepCopy incorrectly, and we need to fix, even if we don't pick up the changes to DeepCopy in #35728:
* creating a new cloner means we have no generated functions registered
* passing non-addressable values doesn't pick up generated deep copy functions, and forces us into reflective mode
2016-12-08 16:26:00 -08:00
Kubernetes Submit Queue f1995ad8f5 Merge pull request #38411 from jingxu97/Dec/fixgluster
Automatic merge from submit-queue

Fix unmountDevice issue caused by shared mount in GCI

This is a fix on top #38124. In this fix, we move the logic to filter
out shared mount references into operation_executor's UnmountDevice
function to avoid this part is being used by other types volumes such as
rdb, azure etc. This filter function should be only needed during
unmount device for GCI image.
2016-12-08 15:37:00 -08:00
Michael Adam bead60db0d glusterfs: unit-test the gidMin:gidMax parsing from the storage class
Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-08 23:41:31 +01:00
Kubernetes Submit Queue 809d259d68 Merge pull request #38338 from vmware/FixSpaceInVolumePathMaster
Automatic merge from submit-queue (batch tested with PRs 36310, 37349, 38319, 38402, 38338)

Fix space issue in volumePath with vSphere Cloud Provider

I tried to create a kubernetes deployment with vSphere volume with volume path
"[datastore] kubevols/redis-master".
In this case the cloud provider queries the getDeviceNameFromMount() to return the path of the volume mounted. Since getDeviceNameFromMount() queries the filesystem to get the mount references, it returns a volume path "[datastore]\\040kubevols/redis-master". Later the kubelet searches for this volume path in both the actual and desired states. Th actual and desired states contains volume with path "[datastore] kubevols/redis-master". So, it couldn't find such volume path and therefore kubernetes stalls unable to make any progress further similar to one described in #37022.

This PR will fix the space issue in volume path by replacing \\040 to empty space. This fixes #37712.
Also fixes #38148
@kerneltime @pdhamdhere
2016-12-08 13:44:59 -08:00
Jing Xu bb8b54af18 Fix unmountDevice issue caused by shared mount in GCI
This is a fix on top #38124. In this fix, we move the logic to filter
out shared mount references into operation_executor's UnmountDevice
function to avoid this part is being used by other types volumes such as
rdb, azure etc. This filter function should be only needed during
unmount device for GCI image.
2016-12-08 13:34:45 -08:00
Jordan Liggitt 6819706adf
Pass addressable values to DeepCopy 2016-12-08 14:16:01 -05:00
Michael Adam c84cba0440 glusterfs: properly check gidMin and gidMax values from SC individually
Don't override explict out-of max-range configuration, but
fail with an error message instead.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1402286

Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-08 12:02:19 +01:00
Balu Dontu 4d57ad6fca Fix space in volumePath in vSphere 2016-12-07 16:15:51 -08:00
Kubernetes Submit Queue 0f2c6fc7fc Merge pull request #37009 from sjenning/fix-perms-with-fsgroup
Automatic merge from submit-queue (batch tested with PRs 38294, 37009, 36778, 38130, 37835)

fix permissions when using fsGroup

Currently, when an fsGroup is specified, the permissions of the defaultMode are not respected and all files created by the atomic writer have mode 777.  This is because in `SetVolumeOwnership()` the `filepath.Walk` includes the symlinks created by the atomic writer.  The symlinks have mode 777 when read from `info.Mode()`.  However, when the are chmod'ed later, the chmod applies to the file the symlink points to, not the symlink itself, resulting in the wrong mode for the underlying file.

This PR skips chmod/chown for symlinks in the walk since those operations are carried out on the underlying file which will be included elsewhere in the walk.

xref https://bugzilla.redhat.com/show_bug.cgi?id=1384458

@derekwaynecarr @pmorie
2016-12-07 10:45:16 -08:00
Kubernetes Submit Queue 65ed735d4f Merge pull request #38124 from kubernetes/Dec/gluster
Automatic merge from submit-queue

Fix GCI mounter issue
2016-12-06 16:21:06 -08:00
Jing Xu 896e0b867e Fix unmount issue cuased by GCI mounter
this is a workaround for the unmount device issue caused by gci mounter. In GCI cluster, if gci mounter is used for mounting, the container started by mounter script will cause additional mounts created in the container. Since these mounts are irrelavant to the original mounts, they should be not considered when checking the mount references. By comparing the mount path prefix, those additional mounts can be filtered out.

Plan to work on better approach to solve this issue.
2016-12-06 12:24:07 -08:00
Seth Jennings 51ae5a34b9 fix permissions when using fsGroup 2016-12-06 14:04:16 -06:00
Kubernetes Submit Queue 0a7aadc282 Merge pull request #38146 from jessfraz/fix-lint-master
Automatic merge from submit-queue (batch tested with PRs 37328, 38102, 37261, 31321, 38146)

fix golint errors on master for 1.6

Needs to be merged before https://github.com/kubernetes/test-infra/pull/1299 is merged

updates https://github.com/kubernetes/kubernetes/issues/37254
2016-12-05 20:16:55 -08:00
Kubernetes Submit Queue c5c1706f22 Merge pull request #38137 from obnoxxx/gluster-dp-gid-fix
Automatic merge from submit-queue (batch tested with PRs 38076, 38137, 36882, 37634, 37558)

glusterfs: Fix all gid types to int to prevent failures on 32bit systems

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

The glusterfs dynamic provisioner with GID security has an issue on 32 bit systems.
This fixes that issue by forcing all gid types to int internally.
<!--
**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**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Fix the glusterfs dynamic provisioner for 32bit systems by limiting the gids to type int internally, and allowing 2147483647 as the highest GID.
```

This makes all types int until we hand the GID to heketi/gluster,
at which point it's converted to int64.

It also limits the maximum usable GID ti math.MaxInt32 = 2147483647.

Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-05 19:25:51 -08:00
Jess Frazelle 4d27212149
fix golint errors on master for 1.6
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-12-05 15:01:33 -08:00
Michael Adam 8a1752f2bb glusterfs: Fix all gid types to int to prevent failures on 32bit systems
This makes all types int until we hand the GID to heketi/gluster,
at which point it's converted to int64.

It also limits the maximum usable GID ti math.MaxInt32 = 2147483647.

Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-05 22:46:12 +01:00
Kubernetes Submit Queue 2ac9c08781 Merge pull request #37064 from NickrenREN/vpmtest
Automatic merge from submit-queue

VolumePluginMgrFunc test

Add test func to test VolumePluginMgr funcs in pkg/volume/plugins_test.go
2016-12-05 09:19:06 -08:00
Humble Chirammal e6a300d735 Allow glusterfs dp volume creation for empty clusterid parameter in sc.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-05 13:36:10 +05:30
Kubernetes Submit Queue bc342006bf Merge pull request #37886 from obnoxxx/gluster-dp-gid
Automatic merge from submit-queue

Implement GID security for the GlusterFS dynamic provisioner.

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

This PR implements GID security for the glusterfs dynamic provisioner.
It is a reworked version of PR #37549 .

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

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
The glusterfs dynamic volume provisioner will now choose a unique GID for new persistent volumes from a range that can be configured in the storage class with the "gidMin" and "gidMax" parameters. The default range is 2000 - 4294967295 (max uint32).
```
2016-12-04 14:34:01 -08:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
NickrenREN 6a4b671a64 volume pluginsmgr functions test
add function to test vpm functions in pkg/volume/plugins_test.go
2016-12-03 23:02:21 +08:00
Kubernetes Submit Queue 5698b50258 Merge pull request #37607 from NickrenREN/metricStatfs
Automatic merge from submit-queue (batch tested with PRs 37608, 37103, 37320, 37607, 37678)

MetricsStatfs GetMetrics() function test
2016-12-02 23:32:49 -08:00
Kubernetes Submit Queue aaed3437fb Merge pull request #37209 from NickrenREN/cephfs-test
Automatic merge from submit-queue (batch tested with PRs 37945, 37498, 37391, 37209, 37169)

test cephfs spec construct function
2016-12-02 20:32:48 -08:00
Michael Adam 06ad835e48 glusterfs: implement GID security in the dynamic provisioner
Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-03 05:27:10 +01:00
Humble Chirammal 92167b5be8 glusterfs: teach provisioner to extract gid-range from storage class 2016-12-03 05:27:10 +01:00
Michael Adam 11a5e84aca glusterfs: add MinMaxAllocator
An allocator of integers that allows for changing the range.
Previously allocated numbers are not lost, and can  be
released later even if they have fallen outside of the range.

Signed-off-by: Michael Adam <obnox@redhat.com>
2016-12-03 05:27:10 +01:00
Kubernetes Submit Queue 8f07fc3d41 Merge pull request #36437 from humblec/glusterfs-clusterid-prov
Automatic merge from submit-queue

Add `clusterid`, an optional parameter to storageclass.

At present, admin doesn't have the privilege to chose the
trusted storage pool from which persistent gluster volume
has to be provided.

This patch introduce a new storage class parameter which allows
the admin to specify storage pool/cluster if required.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-01 06:31:25 -08:00
Martin Linkhorst 001e75ba8c
fix(kubelet): reference pod by namespace/name 2016-12-01 11:22:55 +01:00
Kubernetes Submit Queue 5658addb9b Merge pull request #37413 from vmware/FixUnmountVolume
Automatic merge from submit-queue

kubernetes attempts to unmount a wrong vSphere volume and stops making any progress after that

This is in reference to the bug #37332 which was accidentally closed. So created this new PR.

The code is already reviewed as part of PR #37332 

Fixes issue #37022 

@saad-ali @jingxu97 @abrarshivani @kerneltime
2016-11-30 23:26:06 -08:00
NickrenREN e08f263d72 test cephfs spec construct function
test ConstructVolumeSpec function in pkg/volume/cephfs/cephfs_test.go
2016-12-01 13:50:15 +08:00
Kubernetes Submit Queue 4c0781e962 Merge pull request #37167 from luomiao/fix-photon-plugin-ConstructVolumeSpec
Automatic merge from submit-queue

Fix photon controller plugin to construct with correct PdID

**What this PR does / why we need it**:
This PR is to fix a mismatching of unmount path in photon volume plugin, which is resulted from the assigning volume spec name to persistent disk ID. Without this path, unmounting process is stalling in reconciler when a pod is deleted. Restart the same pod will see a mount failure because the previous unmounting is still going on.

The input variable of function ConstructVolumeSpec is the volume spec name instead of persistent disk ID. Previously the function directly construct new volume spec by assigning volume spec name to persistent disk ID, which will result in mismatching of mount path. The fix will find the pdID according to mount path and construct volume spec with the correct pdID.

I have tested the patch with back-to-back pod creation/deletion and mounting/unmounting of photon persistent disk volume source performs normal now.

This need to be cherry-picked to 1.5 release branch.
2016-11-30 21:11:11 -08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
NickrenREN 43be2d87e9 MetricsStatfs GetMetrics() function test
add test function to test GetMetrics() function in pkg/volume/metrics_statfs_test.go
2016-11-30 09:46:20 +08:00
Balu Dontu fbd1390839 Fix for unmount volume to take in volumePath instead of volumeName 2016-11-28 18:21:12 -08:00
Kubernetes Submit Queue 68cd97a529 Merge pull request #35615 from jsafrane/fix-gluster-errors
Automatic merge from submit-queue

Improve error logging in glusterfs provisioner

- log `err` if it is known
- unify log message style
2016-11-28 12:30:38 -08:00
Kubernetes Submit Queue e94118411c Merge pull request #36900 from vwfs/volume_reconciler_verbosity
Automatic merge from submit-queue

Reduce verbosity of volume reconciler

**What this PR does / why we need it**:
It reduces the log verbosity for attaching of volumes

**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
Reduce verbosity of volume reconciler when attaching volumes
```

Set logging level for information about attaching of volumes to from 1 to 4
Otherwise the log is spammed with one line per 100ms while attaching is
in progress and afterwards as long as the volume is attached.
2016-11-28 11:42:10 -08:00
Jan Safranek 9484de5d09 Improve error reporting in Ceph RBD provisioner.
- We should report an error when user references a secret that cannot be found
- We should report output of rbd create/delete commands, logging "exit code 1"
  is not enough.


Before:
```
Events:
  FirstSeen     LastSeen        Count   From                            SubobjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                            -------------   --------        ------                  -------
  33m           33m             1       {persistentvolume-controller }                  Warning         ProvisioningFailed      Failed to provision volume with StorageClass "cephrbdprovisioner": rbd: create volume failed, err: exit status 1
```

After:

```
Events:
  FirstSeen     LastSeen        Count   From                            SubobjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                            -------------   --------        ------                  -------
  33m           33m             1       {persistentvolume-controller }                  Warning         ProvisioningFailed      Failed to provision volume with StorageClass "cephrbdprovisioner": failed to create rbd image: exit status 1, command output: rbd: couldn't connect to the cluster
```
2016-11-28 12:08:09 +01:00
Miao Luo c240042231 Fix photon controller plugin to construct with correct PdID
The input variable of function ConstructVolumeSpec is the volume spec
name instead of persistent disk ID. Previously the function directly
construct new volume spec by assigning volume spec name to persistent
disk ID, which will result in mismatching of mount path. The fix will
find the pdID according to mount path and construct volume spec with the
correct pdID.
2016-11-23 18:12:03 -08:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu bb675d395f dependencies: pkg/volume 2016-11-23 15:53:09 -08:00
Humble Chirammal 4aeb2a5771 At present, admin doesn't have the privilege to choose the
trusted storage pool from which persistent gluster volume
has to be provided.

This patch introduce a new storage class parameter which allows
the admin to specify storage pool/cluster if required.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-11-23 12:57:35 +05:30
Kubernetes Submit Queue 1f82f2491a Merge pull request #37206 from gmarek/nodecontroller
Automatic merge from submit-queue

Add more logging around Pod deletion

After this PR we'll have at least V(2) level log near all Pod deletions.

@saad-ali - this is required by GKE to help with diagnosing possible problem.

cc @dchen1107 @wojtek-t
2016-11-22 01:42:14 -08:00
Xiangfei Zhu 89c0aa735a Adding rescan scsi controller for cinder
For lsilogic scsi controller, attached cinder volume does not
appear under /dev/ automatically unless do a rescan.
This approach was used in vSphere volume provider before PR #27496
dropped support for lsilogic scsi controller.
2016-11-21 22:49:18 -08:00
Kubernetes Submit Queue a47614dd15 Merge pull request #37122 from childsb/revert_gid
Automatic merge from submit-queue

Revert "Use Gid when provisioning Gluster Volumes."

On further inspection the design in #35460 was not secure enough.  This PR reverts the change. 

This reverts commit 7a0d219d12.
2016-11-21 12:11:31 -08:00
gmarek 795961f7e7 Add more logging around Pod deletion 2016-11-21 11:20:48 +01:00
Alexander Block 1c35e3c275 Add missing nodeName parameter to log call 2016-11-19 13:56:38 +01:00
Kubernetes Submit Queue 95ab8065c6 Merge pull request #36840 from jingxu97/Nov/aws-volumeid
Automatic merge from submit-queue

fix issue in converting aws volume id from mount paths

This PR is to fix the issue in converting aws volume id from mount
paths. Currently there are three aws volume id formats supported. The
following lists example of those three formats and their corresponding
global mount paths:
1. aws:///vol-123456
(/var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/vol-123456)
2. aws://us-east-1/vol-123456
(/var/lib/kubelet/plugins/kubernetes.io/mounts/aws/us-est-1/vol-123455)
3. vol-123456
(/var/lib/kubelet/plugins/kubernetes.io/mounts/aws/us-est-1/vol-123455)

For the first two cases, we need to check the mount path and convert
them back to the original format.

This PR fixes #36269
2016-11-18 15:17:20 -08:00
childsb f4ff79af7b Revert "Use Gid when provisioning Gluster Volumes."
This reverts commit 7a0d219d12.
2016-11-18 15:32:24 -06:00
Kubernetes Submit Queue f90d879204 Merge pull request #36827 from jsafrane/fix-recycler-pod-name
Automatic merge from submit-queue

Fix recycler pod deletion race.

We should use clone of recycler pod template instead of reusing the same
one for two or more recyclers running in parallel.

Also add some logs to relevant places to spot the error easily next time.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1392338
2016-11-18 09:05:11 -08:00
Jing Xu 1b89c79e55 Update aws_ebs.go
fix typo in glog
2016-11-17 11:14:55 -08:00
Jing Xu 3d3e44e77e fix issue in converting aws volume id from mount paths
This PR is to fix the issue in converting aws volume id from mount
paths. Currently there are three aws volume id formats supported. The
following lists example of those three formats and their corresponding
global mount paths:
1. aws:///vol-123456
(/var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/vol-123456)
2. aws://us-east-1/vol-123456
(/var/lib/kubelet/plugins/kubernetes.io/mounts/aws/us-est-1/vol-123455)
3. vol-123456
(/var/lib/kubelet/plugins/kubernetes.io/mounts/aws/us-est-1/vol-123455)

For the first two cases, we need to check the mount path and convert
them back to the original format.
2016-11-16 22:35:48 -08:00
Humble Chirammal 7a0d219d12 Use Gid when provisioning Gluster Volumes.
BUG # https://github.com/openshift/origin/issues/11556

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-11-16 19:43:51 +05:30
Jan Safranek 76755034a1 Fix recycler pod deletion race.
We should use clone of recycler pod template instead of reusing the same
one for two or more recyclers running in parallel.

Also add some logs to relevant places to spot the error easily next time.
2016-11-15 17:22:32 +01:00
Tim Hockin 69f6f8f680 tweak 2016-11-15 08:56:17 +01:00
rkouj b85ac95143 Implement CanMount() for gfsMounter for linux 2016-11-14 12:18:06 -08:00
Jan Safranek b3050bbdfa Improve error logging in glusterfs provisioner 2016-11-14 15:16:09 +01:00
Saad Ali 346c1e80e7 Update pkg/volume/OWNERS 2016-11-13 18:07:41 -08:00
Saad Ali 4259853f4a Update OWNERS for pkg/volume/gce_pd/ 2016-11-13 18:05:12 -08:00
Saad Ali 62d3ac2e73 Update OWNERS for pkg/volume/util/ 2016-11-13 18:02:15 -08:00
Saad Ali df325cc5ca Remove reviwers from volume/vsphere_volume 2016-11-13 18:00:58 -08:00