Commit Graph

223 Commits (58560ab4223f960189b5aa1a7fefc75e3d3a06b5)

Author SHA1 Message Date
Jordan Liggitt 1dd73c59f3
Require PV provisioner secrets to match type 2016-10-27 02:45:05 -04:00
Humble Chirammal 12b7782240 Make a consistent name ( GlusterFS instead of Gluster) in variables and error messages.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-10-27 09:28:08 +05:30
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Humble Chirammal 90263476d5 Remove stale volumes if endpoint/svc creation fails.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-10-21 16:43:07 +05:30
Humble Chirammal 0d080f986d Use PVC namespace when provisioning GlusterFS volumes.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-10-20 00:31:21 +05:30
Jan Safranek 2b2508ba15 Remove PV annotations for Gluster provisioner.
Don't store Gluster SotrageClass parameters in annotations, it's insecure.
Instead, expect that there is the StorageClass available at the time
when it's needed by Gluster deleter.
2016-10-18 09:54:35 +02:00
Jan Safranek 101602ab11 Pass whole PVC to provisioner plugin
Gluster provisioner is interested in pvc.Namespace and I don't want to add
at as a new field in VolumeOptions - it would contain almost whole PVC.

Let's pass direct reference to PVC instead and let the provisioner to pick
information it is interested in.
2016-10-12 12:22:01 +02:00
Jedrzej Nowak f0988b95e7 Typos and englishify pkg/volume 2016-10-03 22:39:33 +02:00
Jan Safranek 1adf856735 Use secrets for glusterfs provisioning passwords
- no plain password in StorageClass!
- fix the style along the way
- use PV annotations to pass the configuration from provisioners to deleters
2016-09-20 16:24:30 +02:00
Humble Chirammal b4fd7e5591 Change the default volume type of GlusterFS provisioner.
At present, provisioner creates Distribute Volume and this patch
change the default volume type to Distribute-Replica(3) volume.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-09-15 19:00:21 +05:30
Tim Hockin d0a840798e Make rootfs the assignee for various volumes
This, combined with the '/lgtm' capability of reviewers means he can approve
PRs.
2016-08-23 14:40:05 -07:00
Humble Chirammal 836ac6e403 GlusterFS dynamic provisioner and deleter interface based on StorageClass claims
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-08-19 23:03:32 +05:30
Kubernetes Submit Queue 79ed7064ca Merge pull request #27970 from jingxu97/restartKubelet-6-22
Automatic merge from submit-queue

Add volume reconstruct/cleanup logic in kubelet volume manager

Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.

Fixes https://github.com/kubernetes/kubernetes/issues/27653
2016-08-15 13:48:43 -07:00
Jing Xu f19a1148db This change supports robust kubelet volume cleanup
Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.
2016-08-15 11:29:15 -07:00
Jess Frazelle 7e9d82129e
fix go vet errors
Signed-off-by: Jess Frazelle <jessfraz@google.com>

fix composites

Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:45:41 -07:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Oleg Shaldybin 3b15d5be19 Use correct namespace in unit tests that use fake clientset
Fake clientset no longer needs to be prepopulated with records: keeping
them in leads to the name conflict on creates. Also, since fake
clientset now respects namespaces, we need to correctly populate them.
2016-06-28 11:26:34 -07:00
saadali 542f2dc708 Introduce new kubelet volume manager
This commit adds a new volume manager in kubelet that synchronizes
volume mount/unmount (and attach/detach, if attach/detach controller
is not enabled).

This eliminates the race conditions between the pod creation loop
and the orphaned volumes loops. It also removes the unmount/detach
from the `syncPod()` path so volume clean up never blocks the
`syncPod` loop.
2016-06-15 09:34:08 -07:00
saadali 9b6a505f8a Rename UniqueDeviceName to UniqueVolumeName
Rename UniqueDeviceName to UniqueVolumeName and move helper functions
from attacherdetacher to volumehelper package.
Introduce UniquePodName alias
2016-06-15 09:32:12 -07:00
Scott Creeley a36cd3d55b read gluster log to surface glusterfs plugin errors properly 2016-06-02 09:09:14 -04:00
saadali 79012f6d53 Rename volume.Builder to Mounter and volume.Cleaner to Unmounter 2016-03-25 11:29:58 -07:00
Tim Hockin 23fe2a3584 add maintainers for each volume driver 2016-03-22 22:19:53 -07:00
Tim St. Clair 246b389275 Move test-only volume files to test-only volume package 2016-02-29 14:44:28 -08:00
childsb 8d4aa5d387 Run through gofmt -s 2016-02-25 13:00:12 -06:00
childsb 61f6c3bc13 Remove the check for a gluster specific binary in 'canSupport'. Causes problems in containerized kube. 2016-02-23 09:40:35 -06:00
Chao Xu ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
Chao Xu 1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
Chao Xu c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
Fabio Yeon 7205a160ac Remove all instances of "/tmp" from unit tests and replace with a common
tmp directory creator. Exception is documented.
2016-01-27 16:11:22 -08:00
k8s-merge-robot 3f5e417999 Merge pull request #19502 from swagiaal/internalize-ownership
Auto commit by PR queue bot
2016-01-26 23:06:39 -08:00
Clayton Coleman 33085c0cf2 Update tests to handle codec changes 2016-01-22 13:27:26 -05:00
harry 7405c7899b Add strings pkg to hold strings utils
Replace funtions with strings pkg

Fix all references and rename the pkg
2016-01-15 12:37:50 +08:00
Sami Wagiaalla 7767698459 Remove SupportsOwnershipManagement volume attribute 2016-01-13 10:37:10 -05:00
Sami Wagiaalla f650648aae Add fsGroup to SetUp and SetUpAt 2016-01-13 10:37:10 -05:00
Chakravarthy Nelluri fa76de79e5 Add support for flex volume. Flex volume adds support for thirdparty(vendor)
volumes and custom mounts.
2015-12-23 14:11:38 -08:00
Phillip Wittrock c67ce887f2 Volume Metrics Interface and base implementation.
- Add volume.MetricsProvider function to Volume interface.
- Add volume.MetricsDu for providing metrics via executing "du".
- Add volulme.MetricsNil for unsupported Volumes.
2015-12-09 16:06:24 -08:00
Paul Morie 911757486d Refactor volume.Builder.IsReadOnly() to volume.Builder.GetAttributes() 2015-11-13 23:34:48 -05:00
Sami Wagiaalla 1d352a16b8 Support volume relabling for pods which specify an SELinux label 2015-10-28 09:26:58 -04:00
k8s-merge-robot e1559e9fb5 Merge pull request #15352 from pmorie/fsgroup
Auto commit by PR queue bot
2015-10-24 01:55:45 -07:00
Paul Morie 3cd12f5e05 FSGroup implementation 2015-10-22 16:40:59 -04:00
Huamin Chen 1665ba4d33 glusterfs: check if mount helper is present
Reported-By: Deepak C Shetty <deepakcs@redhat.com>
Signed-off-by: Huamin Chen <hchen@redhat.com>

glusterfs: return more verbose error message to help diagnose
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-10-20 14:27:37 -04:00
Filip Grzadkowski 7fe34f2050 Introduce nsenter writer for volume plugins 2015-09-17 16:40:29 +02:00
Jeff Lowdermilk e25ae7fdb2 Merge pull request #13833 from caesarxuchao/central-latest
[WIP] Making a generic latest package
2015-09-14 09:26:58 -07:00
Chao Xu 64bf839e9f refactor tests to use testapi rather than latest directly 2015-09-11 17:32:23 -07:00
Chao Xu dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Matt Dainty 8bbc86d83c Override the GlusterFS log file location
GlusterFS by default uses a log file based on the mountpoint path munged into a
file, i.e. `/mnt/foo/bar` becomes `/var/log/glusterfs/mnt-foo-bar.log`.

On certain Kubernetes environments this can result in a log file that exceeds
the 255 character length most filesystems impose on filenames causing the mount
to fail. Instead, use the `log-file` mount option to place the log file under
the kubelet plugin directory with a filename of our choosing keeping it fairly
persistent in the case of troubleshooting.
2015-09-11 18:29:00 +01:00
markturansky 0e7f73ad67 expand volume.Spec to include full Volume and PV 2015-09-03 08:57:32 -04:00
deads2k 7e180c258d update testclient for delegating reaction chain 2015-09-01 12:58:35 -04:00
Saad Ali b05cab0bc5 Merge pull request #6945 from eparis/IsMountPoint
Rename IsMountPoint to IsLikelyNotMountPoint
2015-08-19 12:47:51 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Eric Paris f125ad88ce Rename IsMountPoint to IsLikelyNotMountPoint
IsLikelyNotMountPoint determines if a directory is not a mountpoint.
It is fast but not necessarily ALWAYS correct. If the path is in fact
a bind mount from one part of a mount to another it will not be detected.
mkdir /tmp/a /tmp/b; mount --bin /tmp/a /tmp/b; IsLikelyNotMountPoint("/tmp/b")
will return true. When in fact /tmp/b is a mount point. So this patch
renames the function and switches it from a positive to a negative (I
could think of a good positive name). This should make future users of
this function aware that it isn't quite perfect, but probably good
enough.
2015-08-14 18:45:43 -04:00
Kris Rousey 565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
markturansky 920cb34b1e rebased and updated to latest 2015-07-29 14:38:40 -04:00
markturansky 63ccfa2beb Added unit tests for each PV using IsReadOnly 2015-07-29 14:38:40 -04:00
markturansky fae6759490 IsReadOnly bool on builder 2015-07-29 14:35:37 -04:00
markturansky 124bb22f92 Honor ReadOnly flag from persistent-volume plugin 2015-07-29 14:34:15 -04:00
jiangyaoguo 8bb0ae9f89 refector glusterfs volume to seperate builder and cleaner 2015-07-23 15:07:40 +08:00
Jan Safranek d2b4ae4df4 Fix persistent volumes.
Check Spec.PersistentVolumeSource in NFS, RBD, Gluster and iSCSI volume
plugins.
2015-06-02 09:19:28 -04:00
Tim Hockin 0bbba1c3d1 Merge pull request #8732 from markturansky/missing_pv_support
Fixed CanSupport func across all volumes (for PV)
2015-05-27 08:45:47 -07:00
Paul Morie 38c96725c0 Add doc.go files for all volume plugins 2015-05-23 16:59:12 -04:00
markturansky 3ad583cf2d Fixed spotty CanSupport for PV and added more unit tests for same 2015-05-23 09:59:05 -04:00
Tim Hockin f66ca25d9f Rename AccessMode to PersistentVolumeAccessMode 2015-05-18 17:21:30 -07:00
Paul Morie cd359ffa73 Refactor volume interfaces to receive pod instead of ObjectReference 2015-05-10 20:12:57 -04:00
Paul Morie b538642464 Inject mounter into volume plugins 2015-05-04 11:28:57 -04:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Deyuan Deng 6897095e56 Change mount.Interface.Mount to exec('mount'), instead of syscall 2015-04-29 10:46:32 -04:00
Jan Safranek 0293c6b7f0 Use pod namespace when looking for its GlusterFS endpoints.
I have a pod, which exports a Gluster filesystem in non-default namespace.
When I try to use this FS as a GlusterfsVolumeSource in a 'client' pod
definition, Kubernetes looks for the appropriate endpoint in 'default'
namespace instead of the namespace where the client pod is being defined.
2015-04-21 12:33:59 +02:00
markturansky e1481fb9c2 Refactored Volume plugins to use InternalVolume instead of API types 2015-04-14 14:25:01 -04:00
Paul Morie c98e89fca0 Set rootcontext of emptyDir tmpfs mounts correctly 2015-04-13 12:50:36 -04:00
Huamin Chen a278ceeb0a implement glusterfs volume plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-04-07 09:14:39 -04:00