Bug 1415170

Summary: [RFE] Allow admin to configure desired volume type in Gluster Dynamic Provisioner.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Humble Chirammal <hchiramm>
Component: kubernetesAssignee: Humble Chirammal <hchiramm>
Status: CLOSED ERRATA QA Contact: krishnaram Karthick <kramdoss>
Severity: medium Docs Contact:
Priority: unspecified    
Version: cns-3.4CC: akhakhar, annair, asriram, hchiramm, jarrpa, kramdoss, madam, mliyazud, mzywusko, pprakash, rcyriac, rreddy, rtalur
Target Milestone: ---   
Target Release: CNS 3.5   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
With this update, the specified type of volume can be created by specifying the volumeType option in storage class. Previously, Replica 3 volume was supported but Heketi supports a variety of gluster volume types.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-20 18:49:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1415595    

Description Humble Chirammal 2017-01-20 12:56:24 UTC
Description of problem:

At present the dynamic provisioner does not have the capability of taking input from the admin and define a specific volume type for a storage class. Dynamic provisioner should expose this feature to the storage admin. 

Version-Release number of selected component (if applicable):

CNS 3.5

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Humble Chirammal 2017-01-20 12:58:31 UTC
This functionality has been added to Kube via https://github.com/kubernetes/kubernetes/pull/38579 .


-snip-- from patch to show the usage.

+* `volumetype` : The volume type and it's parameters can be configured with this optional value. If the volume type is not mentioned, it's up to the provisioner to decide the volume type.
+For example:
+  'Replica volume':
+    `volumetype: replicate:3` where '3' is replica count.
+  'Disperse/EC volume':
+    `volumetype: disperse:4:2` where '4' is data and '2' is the redundancy count.
+  'Distribute volume':
+    `volumetype: none`
+

--/snip--

Comment 2 Humble Chirammal 2017-01-20 13:00:01 UTC
This is backported to Origin by PR # https://github.com/openshift/origin/pull/12556

Comment 5 Humble Chirammal 2017-02-09 11:01:48 UTC
This functionality is available atleast from OCP version openshift v3.5.0.14+20b49d0.

Comment 6 krishnaram Karthick 2017-03-03 07:11:56 UTC
Humble,
can you also provide detail on how to create a distribute-replicate volume? 
When volumetype is set as 'none', volume is created out of a single brick. How should we define volume type for distribute and distribute replicate?

Comment 7 Humble Chirammal 2017-03-03 07:31:10 UTC
(In reply to krishnaram Karthick from comment #6)
> Humble,
> can you also provide detail on how to create a distribute-replicate volume? 
> When volumetype is set as 'none', volume is created out of a single brick.
> How should we define volume type for distribute and distribute replicate?

afaict, the decision is to support replicate 3 volumes in cluster. If that is the case, you can specify `replicate:3` in SC parameter list and make sure the backend volume is always have 3 replicas. In documentation we will mention, eventhough its possible to enable different volume types, the supported volume is of 'replica 3' .

Comment 8 krishnaram Karthick 2017-04-10 08:12:00 UTC
Validation of this feature is completed. Moving this bug to verified.

Comment 9 Anjana Suparna Sriram 2017-04-18 10:35:08 UTC
Hi Ashiq, Humble:

Updated the doc text. Kindly review and sign-off to be included in the errata.

Comment 10 Michael Adam 2017-04-18 16:07:18 UTC
I am not quite sure that we want this documented at all, because afaict, only replica-3 remains supported for CNS 3.5.

So at least, in the doc text "Previously, Replica 3 volume was supported..." does not seem sufficient. In fact, replica-3 is still supported, and nothing else. So we have a new switch in the storage class, that we can only use to specify the default explicitly, in order to stay supported... what's the point?

Apologies, I don't want to sound dismissive but I don't see the point.

Comment 11 Michael Adam 2017-04-18 16:11:00 UTC
(In reply to krishnaram Karthick from comment #6)
> Humble,
> can you also provide detail on how to create a distribute-replicate volume? 
> When volumetype is set as 'none', volume is created out of a single brick.
> How should we define volume type for distribute and distribute replicate?

The "volumeType" that can be set in kubernetes (storageClass), is NOT the same as the volume type of a gluster. It is the durability type that you can specify for heketi. E.g., you can only specify the replica aspect of a distribute-replicate volume. Heketi will figure out the number of replica sets for you. I.e if you go with the default of replica-3, you don't know in advance, and you can't control whether you get a 1x3, a 2x3, 3x3 or .... nx3 volume.

This has not changed. The only change is that we can specify the durability type in the storage-class (under the name of volumeType).

Comment 13 errata-xmlrpc 2017-04-20 18:49:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1116