summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/dht_test_utils.py
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2020-07-23 16:48:06 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-07-27 05:28:16 +0000
commit2c1c3111fd2eb39175a3f36122527ec154e85dd8 (patch)
tree0e0e988094951e3e724f15f26e89a449d64e8eab /glustolibs-gluster/glustolibs/gluster/dht_test_utils.py
parent5727e6a8e11e894fce2bf7814a84077a4f95c5b0 (diff)
[Libfix] Remove get_gluster_version() checks
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>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/dht_test_utils.py')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/dht_test_utils.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/dht_test_utils.py b/glustolibs-gluster/glustolibs/gluster/dht_test_utils.py
index b01f7c52c..d205211bb 100644
--- a/glustolibs-gluster/glustolibs/gluster/dht_test_utils.py
+++ b/glustolibs-gluster/glustolibs/gluster/dht_test_utils.py
@@ -29,7 +29,6 @@ import glustolibs.gluster.constants as k
import glustolibs.gluster.exceptions as gex
from glustolibs.gluster.brickdir import BrickDir
from glustolibs.gluster.volume_libs import get_subvols, get_volume_type
-from glustolibs.gluster.gluster_init import get_gluster_version
from glustolibs.misc.misc_libs import upload_scripts
@@ -39,9 +38,8 @@ def run_layout_tests(mnode, fqpath, layout, test_type):
brick_path_list = ret.get('brickdir_paths')
for brickdir_path in brick_path_list:
(server_ip, _) = brickdir_path.split(':')
- if (get_gluster_version(server_ip) >= 6.0 and
- get_volume_type(brickdir_path) in ('Replicate', 'Disperse',
- 'Arbiter')):
+ if get_volume_type(brickdir_path) in ('Replicate', 'Disperse',
+ 'Arbiter'):
g.log.info("Cannot check for layout completeness as"
" volume under test is Replicate/Disperse/Arbiter")
else: