Bug 1446509

Summary: choosing raid5 as disktype, doesn't set the correct thinpool chunksize
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: SATHEESARAN <sasundar>
Component: gdeployAssignee: Sachidananda Urs <surs>
Status: CLOSED ERRATA QA Contact: SATHEESARAN <sasundar>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: amukherj, rhinduja, rhs-bugs, smohan, storage-qa-internal
Target Milestone: ---   
Target Release: RHGS 3.3.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gdeploy-2.0.2-5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-21 04:49:50 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: 1411323, 1417151, 1485863    

Description SATHEESARAN 2017-04-28 09:06:23 UTC
Description of problem:
-----------------------
While choosing the disktype as 'raid5' doesn't set the proper chunksize for the thinpool

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
gdeploy-2.0.2-4.el7rhgs

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Create PV, VG, thinpool, LV using gdeploy config file with disktype as 'raid5', diskcount & stripesize

Actual results:
---------------
chunksize for the thinpool is not set to correct value

Expected results:
-----------------
chunksize for the thinpool should be set to the correct value

Comment 1 SATHEESARAN 2017-04-28 09:11:43 UTC
Thanks sac for finding out the issue in first place and also root causing the problem that code path computes chunksize only for raid6 disktype and not any other disktype

<code_snip>
 if disktype == 'raid6':
            # If user has ommited chunk size or stripe unit size, we leave
            # it blank and let the system determine proper default value.
            if stripe_unit_size.strip() == '' or diskcount.strip() == '':
                return ''
            try:
                chunksize = str(int(stripe_unit_size) * int(diskcount)) + 'K'
            except ValueError:
                print "Only integer value is supported for stripesize or \
                diskcount!"
                print "Found %s and %s"%(stripe_unit_size, diskcount)
                self.cleanup_and_quit()
        else:
</code_snip>

Comment 2 Sachidananda Urs 2017-04-28 09:42:33 UTC
Commit: https://github.com/gluster/gdeploy/commit/2bd7dc7 should fix the issue for RAID5

Comment 5 SATHEESARAN 2017-06-19 19:11:21 UTC
Tested with gdeploy-2.0.2-10.el7rhgs. With 'disktype' as 'raid5', 'chunksize' for the thinpool is calculated automatically to the correct value which is the product of 'stripesize' and 'diskcount'

Comment 7 errata-xmlrpc 2017-09-21 04:49:50 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/RHBA-2017:2777