Commit Graph

204 Commits (bad9f6341a093c371f71e26aa27c0f695be1ba86)

Author SHA1 Message Date
zouyee b6e1fecde7 check function return err 2017-12-19 23:24:35 +08:00
Kubernetes Submit Queue a28e708ec6
Merge pull request #57091 from humblec/volume-mode
Automatic merge from submit-queue (batch tested with PRs 57148, 57123, 57091, 57141, 57131). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add VolumeMode in GlusterFS PV spec.

This ensures that GlusterFS pvs are file backed storage.

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

```
2017-12-16 21:00:46 -08:00
Humble Chirammal 95bece666d Record volumeID in GlusterFS PV spec.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-12-16 10:36:14 +05:30
Kubernetes Submit Queue 691436ad64
Merge pull request #56581 from gnufied/fix-gluster-disk-sizes
Automatic merge from submit-queue (batch tested with PRs 56401, 56506, 56551, 56298, 56581). 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>.

Heketi documentats incorrectly about sizes in GBs

Heketi documentation incorrectly says that volume size is created in
GB but in fact is in GiB. Fix both resizing and create volume
functions to relfect that.

Fixes https://github.com/kubernetes/kubernetes/issues/56192

```release-note
Use GiB unit for creating and resizing volumes for Glusterfs
```
2017-12-15 20:29:39 -08:00
Humble Chirammal d380e2972e Add VolumeMode in GlusterFS PV spec.
This ensures that GlusterFS pvs are file backed storage.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-12-12 14:51:56 +05:30
Hemant Kumar fcfca65a54 Heketi documentats incorrectly about sizes in GBs
Heketi documentation incorrectly says that volume size is created in
GB but in fact is in GiB. Fix both resizing and create volume
functions to relfect that.
2017-11-29 10:34:02 -05:00
zhangxiaoyu-zidif cbf0945afc fix binary check for glusterfs.go 2017-11-28 19:02:56 +08:00
Kubernetes Submit Queue 8440a50990
Merge pull request #55796 from humblec/construct
Automatic merge from submit-queue (batch tested with PRs 55938, 56055, 53385, 55796, 55922). 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>.

Avoid wrong filling of  glusterfs Volume Spec at ConstructVolumeSpec()

Issue#https://github.com/kubernetes/kubernetes/issues/37625, https://github.com/kubernetes/kubernetes/issues/49108

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-11-21 07:43:48 -08:00
Humble Chirammal 13a86d8176 Avoid wrong filling of glusterfs volume spec in ConstructVolumeSpec()
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-11-20 10:48:35 +05:30
Serhii Aheienko cf08516cb7 Fix representation of the pv's capacity which provisioned by glusterfs 2017-11-17 19:01:39 +02:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Kevin 4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Guangya Liu 53596dd2d2 glusterfs service endpoint prefix should be `glusterfs-dynamic-`. 2017-10-15 11:03:09 +08:00
Kubernetes Submit Queue 5dcd4d31c5 Merge pull request #52763 from NickrenREN/gluster-minor
Automatic merge from submit-queue (batch tested with PRs 52831, 52764, 52763, 52673, 52558). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Minor fix: make sure that glusterfsPlugin implements interface ExpandableVolumePlugin

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


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

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```

/assign @gnufied
2017-09-23 22:57:52 -07:00
Marcelo Grebois a2aa36210f Checking GlusterFS error output https://github.com/kubernetes/kubernetes/issues/50463 2017-09-22 08:31:18 +02:00
NickrenREN 21861559bb Minor fix: make sure that gluster implement interface ExpandableVolumePlugin 2017-09-20 12:22:29 +08:00
Hemant Kumar 77be9123f7 Fix glusterfs creating volumes in GiB
As per glusterfs documentation it can't create
volumes in GiB and all sizes must be specified in GB.

This code was slightly buggy because we were creating
volumes of sizes lesser than user asked for
2017-09-11 16:25:28 -04:00
Hemant Kumar 7e8b4a2d60 Glusterfs expands in units of GB not GiB 2017-09-11 14:04:04 -04:00
Hemant Kumar cd2a68473a Implement controller for resizing volumes 2017-09-04 09:02:34 +02:00
Matthew Wong 5e772b8e4b Add storageClass.mountOptions and use it in all applicable plugins 2017-08-29 11:37:36 -04:00
Humble Chirammal 19f8bde90b Avoid explicit mention of plugin name in error strings.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-08-23 23:45:10 +05:30
Kubernetes Submit Queue 6a4203eb4b Merge pull request #51107 from jsafrane/exec-gluster
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107)

gluster: Use VolumeHost.GetExec() to execute stuff in volume plugins

**What this PR does / why we need it**:
This PR updates GlusterFS volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

**Special notes for your reviewer**:

There are two commits:
* The first one removes unused `plugin.execCommand` (so we don't need to update it to `VolumeHost.GetExec`)
* The second one does the `VolumeHost.GetExec` trick described above.

@kubernetes/sig-storage-pr-reviews 

**Release note**:
```release-note
NONE
```
2017-08-23 05:51:31 -07:00
Jan Safranek 3636c0a4e2 gluster: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-22 14:58:00 +02:00
Jan Safranek 51b33e8abe gluster: Remove unused exe interface 2017-08-22 14:53:25 +02:00
Humble Chirammal 7755286f48 Correct error strings in glusterfs
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-08-22 14:27:46 +05:30
Jan Safranek bc0e170d9c Add pluginName to VolumeHost.GetMouter
Different plugins can get different mounter, depending where the mount
utilities are.
2017-08-14 12:16:26 +02:00
Kubernetes Submit Queue 68c4fd30f4 Merge pull request #50430 from x1957/glusterfs
Automatic merge from submit-queue

remove the duplicate address of glusterfs

**What this PR does / why we need it**:
remove the duplicate endpoint address of glusterfs.
If there is no duplicate address of user config or the duplicate address is ok, we can remove the unused addr map.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-08-11 05:07:57 -07:00
fangyuhao cade629d25 remove the duplicate address of glusterfs 2017-08-10 23:51:18 +08:00
Kubernetes Submit Queue b21387e77a Merge pull request #49615 from jianglingxia/jlx72615
Automatic merge from submit-queue (batch tested with PRs 49615, 49321, 49982, 49788, 50355)

remove redundant comment

**What this PR does / why we need it**:
there has redundant comment and delete it!
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
   NONE
```
2017-08-09 23:55:58 -07:00
Kubernetes Submit Queue 54c5374778 Merge pull request #49555 from jianglingxia/jlx72517
Automatic merge from submit-queue (batch tested with PRs 49284, 49555, 47639, 49526, 49724)

amend spec.PersistentVolume.Spec 

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-01 01:41:56 -07:00
jianglingxia acc2062db5 amend the message 2017-07-31 16:00:59 +08:00
jianglingxia dee9470152 squash the commits into one 2017-07-28 10:11:31 +08:00
jianglingxia 0710d86291 remove redundant comment 2017-07-26 15:34:11 +08:00
Jan Safranek f6a8436504 Fixed glusterfs mount options
Capacity of a slice is the third argument, not the second one.
We use append() to fill the slice, so it should be empty at the beginning
and with the right capacity.
2017-07-24 10:20:39 +02:00
Kubernetes Submit Queue 010858262f Merge pull request #49127 from humblec/backupvol-count
Automatic merge from submit-queue (batch tested with PRs 49328, 49285, 49307, 49127, 49163)

Make definite mount timeout for glusterfs volume mount.

The `backup-volfile-servers` mount option allows to specify more than 
one server to be contacted in single mount command. With this option in place,
it is not required to iterate over all the servers in the addrlist.
A mount attempt with this option  will fetch all the servers mentioned in
the list, Reference # https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Native_Client.html

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-21 03:00:21 -07:00
ymqytw 3dfc8bf7f3 update import 2017-07-20 11:03:49 -07:00
Humble Chirammal 413380e557 The `backup-volfile-servers` mount option allows to specify more than
one server to be contacted in single mount command. With this option in place,
it is not required to iterate over all the servers in the addrlist.
A mount attempt with this option  will fetch all the servers mentioned in
the list, Reference # https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Native_Client.html

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-20 23:17:32 +05:30
Humble Chirammal b432854f17 This patch add new storage class parameter called
`volumeoptions` which can be used to set various volume options.
for eg# if you want to enable encryption on volumes,
the values like `client.ssl on`, `server.ssl on`..etc can be passed
to `volumeoptions` parameter in storageclass.

Issue # https://github.com/kubernetes/kubernetes/issues/28454

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-07-18 19:45:38 +05:30
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Jan Safranek c20b4f7e4e glusterfs: retry without auto_unmount only when it's not supported
GlusterFS volume plugin should not blindly retry all failed mounts without
auto_unmount, it should retry them only when we are sure that auto_unmount
was the reason the first attempt failed.
2017-07-10 14:33:56 +02:00
Kubernetes Submit Queue 4fd040afc7 Merge pull request #47647 from humblec/glusterfs-unused-var
Automatic merge from submit-queue (batch tested with PRs 48074, 47971, 48044, 47514, 47647)

Use more meaningful and consistent variable names in glusterfs plugin.
2017-06-26 11:41:01 -07:00
Humble Chirammal 5f91b02a61 detach getClusterNodes() func from provisioner method.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-06-23 21:18:07 +05:30
Humble Chirammal a41e1c52ef Add annotation constants to glusterfs plugin.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-06-23 19:03:07 +05:30
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
mbohlool c91a12d205 Remove all references to types.UnixUserID and types.UnixGroupID 2017-06-21 04:09:07 -07:00
Humble Chirammal 8cb70cd0e6 Use more meaningful and consistent variable names in glusterfs plugin.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-06-20 11:12:47 +05:30
Huamin Chen 14c94fad2b manually revert #45528
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-06-19 17:57:37 +00:00
Matthew Wong 5e788a6a67 Don't provision for PVCs with AccessModes unsupported by plugin 2017-06-12 12:56:41 -04: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
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
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
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
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
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
Kubernetes Submit Queue 95d8fbb599 Merge pull request #45409 from humblec/glusterfs-code-cleanup
Automatic merge from submit-queue (batch tested with PRs 44727, 45409, 44968, 45122, 45493)

More go friendly variable names.

clusterId -> clusterID
volumeId  -> volumeID

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-08 14:54:37 -07:00
Jamie Hannaford 9440a68744 Use dedicated Unix User and Group ID types 2017-05-05 14:07:38 +02:00
Humble Chirammal 16badd361f More go friendly variable names.
clusterId -> clusterID
volumeId  -> volumeID

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-05 16:17:20 +05:30
Kubernetes Submit Queue ca520e34a3 Merge pull request #44669 from humblec/gluster-metadata-pv
Automatic merge from submit-queue (batch tested with PRs 45081, 44669)

Add more metadata about dynamically provisioned PVs using PV annotation

This patch add below fields to Gluster dynamic pvs.

"Description: "Gluster: dynamically provisioned PVs"
"Creator": "heketi-dynamic"
"Type": "file"

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-04 10:05:56 -07:00
Humble Chirammal 1d17c0ccef Add more metadata about dynamically provisioned PVs using
PV annotation:

This patch add below fields to Gluster dynamic pvs:

   "Description: "Gluster: dynamically provisioned PV"
   "Creator": "heketi-dynamic"
   "Type": "file"

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-04 20:17:53 +05:30
Humble Chirammal dddd4783a4 Replace variable name to be more go friendly.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-04-21 12:38:13 +05:30
Chao Xu d4850b6c2b move pkg/api/v1/helpers.go to subpackage 2017-04-14 14:25:11 -07:00
Kubernetes Submit Queue 97857e8390 Merge pull request #41687 from aliscott/fix_overwriting_err
Automatic merge from submit-queue

Fix original error being overwritten before returned
2017-04-09 23:16:32 -07:00
Kubernetes Submit Queue 46343f37dd Merge pull request #42038 from humblec/glusterfs-backup-vol1
Automatic merge from submit-queue (batch tested with PRs 42038, 42083)

 Add backup-volfile-servers to mount option. 

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-04-03 04:07:19 -07:00
Alistair Scott fc62687b2c Fix original error being overwritten before returned 2017-03-27 13:29:59 +01:00
Kubernetes Submit Queue e9bbfb81c1 Merge pull request #41306 from gnufied/implement-interface-bulk-volume-poll
Automatic merge from submit-queue (batch tested with PRs 41306, 42187, 41666, 42275, 42266)

Implement bulk polling of volumes

This implements Bulk volume polling using ideas presented by
justin in https://github.com/kubernetes/kubernetes/pull/39564

But it changes the implementation to use an interface
and doesn't affect other implementations.

cc @justinsb
2017-03-03 10:54:38 -08:00
Hemant Kumar 786da1de12 Impement bulk polling of volumes
This implements Bulk volume polling using ideas presented by
justin in https://github.com/kubernetes/kubernetes/pull/39564

But it changes the implementation to use an interface
and doesn't affect other implementations.
2017-03-02 14:59:59 -05:00
Jan Safranek 7ae4152712 Move PV/PVC annotations to PV/PVC types.
They aren't part of storage.k8s.io/v1 or v1beta1 API.
Also move associated *GetClass functions.
2017-03-02 10:23:55 +01:00
Hemant Kumar 2d3008fc56 Implement support for mount options in PVs
Add support for mount options via annotations on PVs
2017-03-01 11:50:40 -05: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
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
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 bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Clayton Coleman 245b592fac
Convert core code to metav1.ListOptions 2017-01-23 17:52:45 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -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
NickrenREN a12dea14e0 fix redundant alias clientset 2017-01-12 10:21:05 +08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05: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
Harry Zhang 443ae87b7e Check kube client is valid 2016-12-21 10:38:50 +08:00
rkouj c14d47dffe Use common unmount util func for TearDownAt() 2016-12-19 16:40:55 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -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 e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01: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
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
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
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
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
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
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
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
childsb f4ff79af7b Revert "Use Gid when provisioning Gluster Volumes."
This reverts commit 7a0d219d12.
2016-11-18 15:32:24 -06: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
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