Commit Graph

274 Commits (bad9f6341a093c371f71e26aa27c0f695be1ba86)

Author SHA1 Message Date
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
deads2k 94e9993900 remove deads2k from volume reviewer 2017-07-25 08:52:25 -04: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 9b393a83d4 update godep 2017-07-20 11:03:49 -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
Mike Danese c201553f27 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol
2017-07-13 10:02:21 -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
saadali eacc48373b Remove rkouj from owners files. 2017-04-28 17:14:38 -07:00
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 55042b0ba9 Merge pull request #43673 from harryge00/refactor_test
Automatic merge from submit-queue (batch tested with PRs 40777, 43673)

remove an unnecassary variable assignment in glusterfs_test

**What this PR does / why we need it**:
`path` is exactly the same variable as `volumePath`, which is defined in line 122 . So no needs to assign 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
```
2017-04-14 13:34:01 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -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
haoyuan cb7cb3486f remove an unnecassary variable assignment in glusterfs_test 2017-03-26 22:44:16 +08: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 9487552e41 Regenerate everything 2017-03-02 10:23:58 +01: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
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
Humble Chirammal 5b1aa04ccc Updating reviewer list.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-15 13:19:51 +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 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
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Clayton Coleman 245b592fac
Convert core code to metav1.ListOptions 2017-01-23 17:52:45 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05: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
Saad Ali 7c67211734 Update OWNERS 2017-01-17 16:33:13 -08: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
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Tim Hockin f75bed8682 Add a ForEach() to bitmap allocator 2016-12-26 21:59:27 -08:00
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
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
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
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
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
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 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
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
Rajat Ramesh Koujalagi d81e216fc6 Better messaging for missing volume components on host to perform mount 2016-11-09 15:16:11 -08:00
Antoine Pelisse fd510b1207 Update OWNERS approvers and reviewers: pkg/volume 2016-11-09 10:17:36 -08:00
Kubernetes Submit Queue d87dfa2723 Merge pull request #35669 from humblec/glusterfs-instead-gluster
Automatic merge from submit-queue

Make a consistent name ( GlusterFS instead of Gluster) in variables a…

Signed-off-by: Humble Chirammal hchiramm@redhat.com
2016-11-08 04:29:19 -08:00
Paul Morie 4722cb299b Remove GetRootContext from VolumeHost 2016-11-03 12:21:19 -04:00
Kubernetes Submit Queue 106492708a Merge pull request #35285 from humblec/glusterfs-stale-volumes
Automatic merge from submit-queue

Remove stale volumes if endpoint/svc creation fails.

Remove stale volumes if endpoint/svc creation fails.

Signed-off-by: Humble Chirammal hchiramm@redhat.com
2016-10-31 04:06:43 -07:00
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