summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/brickdir.py
Commit message (Collapse)AuthorAgeFilesLines
* [Libfix] Remove get_gluster_version() checkskshithijiyer2020-07-271-43/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When run for nightly gluster builds dht cases fails with below traceback: ``` def get_gluster_version(host): """Checks the gluster version on the nodes Args: host(str): IP of the host whose gluster version has to be checked. Returns: (float): The gluster version value. """ command = 'gluster --version' _, out, _ = g.run(host, command) g.log.info("The Gluster verion of the cluster under test is %s", out) > return float(out.split(' ')[1]) E ValueError: could not convert string to float: '20200719.9334a8d\nRepository ``` This is due to nightly builds returning the below output: ``` $ gluster --version glusterfs 20200708.cdf01cc Repository revision: git://git.gluster.org/glusterfs.git Copyright (c) 2006-2016 Red Hat, Inc. <https://www.gluster.org/> GlusterFS comes with ABSOLUTELY NO WARRANTY. It is licensed to you under your choice of the GNU Lesser General Public License, version 3 or any later version (LGPLv3 or later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation. ``` Instead of: ``` $ gluster --version glusterfs 6.0 ``` This is caused as while building the we use `VERSION="${GIT_DATE}.${GIT_HASH}` which causes the version API to return new output. Solution: Remove the checks and modify the function to return string instead of float. Fixes: https://github.com/gluster/glusto-tests/issues/22 Change-Id: I2e889bd0354a1aa75de25aedf8b14eb5ff5ecbe6 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
* [LibFix] Fix volume type checksayaleeraut2020-02-141-4/+4
| | | | | | | | | | | Earlier the elements passed in list for volume type check were ('replicate', 'disperse', 'arbiter'), but as the volume type returned by get_volume_type() will be in the format 'Replicate', 'Disperse', 'Arbiter' and lists are case sensitive, these changes will make sure it does not change. Change-Id: Ic73ca946cd9c06bfa5b92605dbeba74d6ffa83d9 Signed-off-by: sayaleeraut <saraut@redhat.com>
* [LibFix] Fix issue caused by DHT pass-throughsayaleeraut2020-02-131-9/+96
| | | | | | | | | | | | | | | | | | | | | | The DHT pass-through functionality was introduced in the Gluster 6, due to which the TCs were failing for Replicate, Disperse and Arbiter volume types whenever the function to get hashrange was called. With this fix, first the Gluster version and later the volume type will be checked before calling the function to get the hashrange. If the Gluster version is greater than or equal to 6, the layout will not be checked for the pure AFR/Arbiter/EC volumes. About DHT pass-through option : The distribute xlator now skips unnecessary checks and operations when the distribute count is one for a volume, resulting in improved performance. Comes into play when there is only 1 brick or it is a pure replicate or pure disperse or pure arbiter volume. Change-Id: I55634f495a54e3c9909b1e1c716990b9ee9834a3 Signed-off-by: sayaleeraut <saraut@redhat.com>
* initial dht libsJonathan Holloway2018-02-261-0/+184
* glusterfile.py - helper for gluster client and backend files. * glusterdir.py - helper for gluster client and backend dirs. * brickdir.py - helper for collection and hashing of brickdirs (from pathinfo data). * layout.py - base class for simple DHT layout validation. * dht_test_util.py - utility module to walk a directory tree and run tests against files. * constants.py - definitions for constants used in DHT libraries. * exceptions.py - definitions for exceptions raised in DHT libraries. Change-Id: I44770a822e0ec79561b3aa048e555320f622116a Signed-off-by: Jonathan Holloway <jholloway@redhat.com>