Commit Graph

277 Commits (06bc7e3e0026ea25065f59f4bd305c0b7dbbc145)

Author SHA1 Message Date
ialidzhikov 98c976ae4f Clean ineffectual assignment
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2019-04-13 16:23:07 +03:00
Humble Chirammal 6eae6bbac5 Use pvc uid in endpoint/service label
If the pvc name is more than 63 chars, the endpoint creation
will fail due to the validation of objectmeta length of fields ie 63 chars at max.
This patch introduce an enhancement where if the pvc name is >=63 the pvc uid
is recorded at label instead of name. To preserve backward compatibility, the pvcname
has been kept in endpoint metadata label if length of pvc name is <63chars.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-04-05 20:30:57 +05:30
Jordan Liggitt d1e865ee34 Update client callers to use explicit versions 2019-02-26 08:36:30 -05:00
Andrew Kim a62ee8b0a9 clean up volume rounding functions and move to k8s.io/cloud-provider/volume 2019-02-09 01:16:55 -05:00
Roy Lenferink b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
danielqsj 657a1a1a34 change import alias of utils/strings 2019-01-30 10:44:09 +08:00
danielqsj 093328e57f migrate to k8s.io/utils/strings 2019-01-30 10:24:00 +08:00
Kubernetes Prow Robot cc1be28943
Merge pull request #72624 from danielqsj/clean_unmount
Cleanup callers of deprecated functions in volume/util
2019-01-28 23:06:20 -08:00
David Zhu d8c9dc5bb5 Add IsMigratableToCSI to volume plugin interface 2019-01-17 14:43:52 -08:00
danielqsj d94cd822b7 Cleanup UnmountPath/UnmountMountPoint callers 2019-01-08 22:13:50 +08:00
k8s-ci-robot d80614d4a7
Merge pull request #70860 from humblec/getVolumeName
GlusterFS: Move GetVolumeName() to unimplemented func.
2018-11-29 07:36:28 -08:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Humble Chirammal e9ed21988d GetVolumeName() is used in a few places, all of which are not applicable to gluster:
AD controller
    kubelet volume manager actual/desired sw for attachable volumes
    volume reconstruction

This is a followup PR based on comment#
https://github.com/kubernetes/kubernetes/pull/60195#discussion_r231675596

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-11-09 16:09:12 +05:30
k8s-ci-robot 3c10143967
Merge pull request #60195 from humblec/glusterfs-pvspec-3
Refactor GlusterFS PV spec.
2018-11-08 00:24:39 -08:00
Humble Chirammal bdb051c72d Refactor GlusterFS PV spec.
This patch introduces glusterfsPersistentVolumeSource addition
to glusterfsVolumeSource. All fields remains same as glusterfsVolumeSource
with an addition of a new field
called `EndpointsNamespace` to define namespace of endpoint in the
spec.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-11-06 15:51:01 +05:30
Humble Chirammal 734da0edb1 glusterfs: Allow admin to provide custom endpoint/service name prefix
This patch introduces a new SC parameter called `customepnameprefix`
in glusterfs plugin. This new storageclass parameter allow admins
to create endpoints and services with mentioned prefix.
If this parameter has not been set or if its empty,
default prefix string ie "glusterfs-dynamic-" will be used for ep/svc
name.

This patch address below issues#

https://github.com/kubernetes/kubernetes/issues/53939
https://github.com/kubernetes/kubernetes/issues/56379

Additional Ref# #
https://github.com/kubernetes/kubernetes/issues/56380

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-10-31 18:06:40 +05:30
Michael Adam 870bf314fe glusterfs: remove a redundant comment
This comment exactly states what the line below it does.
There's no point in keeping it.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-10-29 17:07:08 +01:00
Michael Adam 465bb06533 glusterfs: improve a comment block
moving it to the function it explains and
rewording slightly.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-10-29 17:07:08 +01:00
Humble Chirammal a6759a7b22 Fix a typo in source code comment
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-10-26 20:01:19 +05:30
Humble Chirammal 5bd0b5d841 GlusterFS: Use pvc uid instead of pvc name in glusterfs endpoint name.
At present, endpoints and services are created
for glusterfs pvcs are in form of glusterfs-dynamic-<PVC name>
however this could cause issue if user deletes a PVC and immediately
creates a new one with the same name, PV controller will try to delete
the old PV and its endpoint and at the same the controller will try to create new PV
and the same endpoint. Depending on which event reaches the
controller first, it may create new PV, check that endpoints exists,
then delete the old PVC and delete endpoints already used by the new PV.

This patch changes the endpoint/service name to below format:

`glusterfs-dynamic-<PVC UUID>`.

By the uniqueness of UUID, above mentioned issue will no longer be present.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-10-26 20:00:02 +05:30
Humble Chirammal fdcd58a794 Add `log-level` mount option support for glusterfs plugin
The glusterfs plugin/driver set log-level to ERROR by default while
mounting glusterfs shares. However at times, its required to supply other
log-level options like INFO, TRACE..etc. This patch enables the support
to provide other log-level values from storageclass.

Additional Ref#
    https://docs.gluster.org/en/v3/Administrator%20Guide/Setting%20Up%20Clients/

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-10-03 10:16:41 +05:30
Humble Chirammal 38e8c00119 Glusterfs: Remove unwanted `log-file` mount argument.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-09-12 22:41:25 +05:30
hchiramm 5fff5226cd Remove provisioner config from log message.
Signed-off-by: hchiramm <hchiramm@redhat.com>
2018-08-24 19:40:37 +05:30
Humble Chirammal 9e29ab985b Provide an option to supply log-file mount option for gluster plugin.
At present, `log-file` location of glusterfs client mount is decided
by the plugin, however at times, users/admin want to configure log-file
of gluster fuse client process on their own in some setups. Even though they can pass log-file
mount option through storage class, before this patch glusterfs plugin
always discard it. This patch enable/give preference
to admin supplied log-file mount option if specified in storage class.
If the log-file mount option is incomplete or wrong, plugin fallback to the
location which is carved out by the combination of pvc and pod name.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-08-02 22:09:49 +05:30
Humble Chirammal d4480d4f32 Remove `auto_unmount` mount option from pv spec annotation to setup() func.
At present, `auto_unmount` option is recorded at PV annotation of glusterfs PV.
Due to the preference given in MountOptionFromSpec() for annotation mount options
over sc supplied mount options(Ref PR# https://github.com/kubernetes/kubernetes/pull/66576),
the sc supplied mount options are not honoured in glusterfs plugin
eventhough the driver returns `true` for storage class mountoptions
support at probe.

This patch removes `auto_unmount` option from annotation of the pv spec.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-07-25 22:27:40 +05:30
Matthew Wong 093e231289 Avoid overflowing int64 in RoundUpSize and return error if overflow int 2018-07-23 13:48:45 -04:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
lichuqiang bccc8fe979 Provision interface change 2018-06-05 16:35:16 +08:00
Jan Safranek 08564f203e Add block volume support to internal provisioners. 2018-05-29 12:02:40 +02:00
Humble Chirammal cecc3390ae Add volumenameprefix tests for glusterfs dynamic provisioner.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-04-18 19:10:10 +05:30
Humble Chirammal f7957e848b This patch add a new parameter called `snapfactor` to glusterfs
storageclass. This is an optional parameter and value should
fall into the range of 1-100. When set the thin pool calculation
respect this snapfactor and create a thinpool accordingly.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-04-18 11:16:46 +05:30
Kubernetes Submit Queue a66301b313
Merge pull request #59536 from linyouchong/lyc-20180208
Automatic merge from submit-queue (batch tested with PRs 59536, 61104, 61030, 59013, 61169). 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 incorrect logic in glusterfs.go#canSupport

**What this PR does / why we need it**:
if `spec.PersistentVolume` is nil or `spec.Volume` is nil, func `canSupport` should return false.

**Release note**:
```
NONE
```
/release-note-none
/sig storage
2018-03-21 03:43:11 -07:00
wackxu b3ba80b223 update bazel 2018-02-27 20:23:36 +08:00
wackxu f737ad62ed update import 2018-02-27 20:23:35 +08:00
Humble Chirammal e8f59b0797 Avoid explicit mention of glusterfs in error strings.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-02-22 11:39:19 +05:30
Humble Chirammal 04a83da019 Reformat and update error strings.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-02-20 20:07:03 +05:30
Kubernetes Submit Queue aec91e112b
Merge pull request #60050 from obnoxxx/glusterfs-comment-typo
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: improve a few comments

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

This PR fixes a couple of comments in the glusterfs module:
* fixes a typo in a comment
* removes an outdated comment that is not correct (any more)
* updates one comment to refer to upstream gluster documentation instead of downstream red hat product documentation
2018-02-20 03:55:20 -08:00
Michael Adam 6bf35daca7 glusterfs: refer to upstream gluster documentation
Do not refer to downstream Red Hat documentation
in the upstream kubernetes code, if there is upstream
documentation to refer to.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-02-19 21:30:02 +01:00
Michael Adam 67adc29f8f glusterfs: fix a comment typo
Signed-off-by: Michael Adam <obnox@redhat.com>
2018-02-19 21:30:02 +01:00
Michael Adam 2ec681632b glusterfs: Remove an outdated comment about GB vs GiB
This was originally added due to a misunderstanding
of the documentation of Heketi (using a different
convention). Heketi's documentation has meanwhile
been clarified.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-02-19 21:30:02 +01:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Humble Chirammal 64e8111f75 Correct error strings and variable name.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-02-14 23:19:19 +05:30
Kubernetes Submit Queue 977d03bd8b
Merge pull request #59232 from liubin/fix4
Automatic merge from submit-queue (batch tested with PRs 59607, 59232). 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>.

Make log content more information

And change some `fmt.Errorf` to `fmt.Error`
2018-02-09 08:54:34 -08:00
linyouchong b76a3c0fd6 fix incorrect logic in glusterfs.go#canSupport 2018-02-09 14:25:16 +08:00
Humble Chirammal 922766a7cf Remove provisioner configuration from info message.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-02-07 13:30:42 +05:30
bin liu 053e7c9cfd Change log format: replace () to [] 2018-02-07 11:05:39 +08:00
bin liu e44779d86f Reformat log to show more details 2018-02-03 11:01:54 +08:00
zhangxiaoyu-zidif a7dd7f14c9 delete duplicate function for getting volume source 2018-02-02 18:58:24 +08:00
zhangxiaoyu-zidif e873c7b28b fix mistaken info print 2018-01-30 14:50:19 +08:00
Kubernetes Submit Queue 175df0cba0
Merge pull request #58617 from humblec/expand-idmpt
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>.

Make ExpandVolumeDevice() idempotent if existing volume capacity meets the requested size.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-01-26 09:07:41 -08:00