summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2020-03-04 11:54:49 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-03-17 10:31:07 +0000
commit36418ed2d794ad34dd80d85dbaacac8bcab2cd20 (patch)
treeeeb88c9e3f854598d3604a38b8530237f5877fb3 /glustolibs-gluster/glustolibs/gluster
parent256cebf66b5ce925c40c08b97d4df19c7faf49fc (diff)
[Test+libfix] Testcases for rename with subvol down
Case 1: 1.mkdir srcdir and dstdir(such that srcdir and dstdir hashes to different subvols) 2.Bring down srcdir hashed subvol 3.mv srcdir dstdir (should fail) Case 2: 1.mkdir srcdir dstdir 2.Bring down srcdir hashed 3.Bring down dstdir hashed 4.mv srcdir dstdir (should fail) Case 3: 1.mkdir srcdir dstdir 2.Bring down dstdir hashed subvol 3.mv srcdir dstdir (should fail) Additional library fix details: Also fixing library function to work with distributed-disperse volume by removing `if oldhashed._host != brickdir._host:` as the same node can host multiple bricks of the same volume. Change-Id: Iaa472d1eb304b547bdec7a8e6b62c1df1a0ce591 Co-authored-by: Susant Palai <spalai@redhat.com> Signed-off-by: Susant Palai <spalai@redhat.com> Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/dht_test_utils.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/dht_test_utils.py b/glustolibs-gluster/glustolibs/gluster/dht_test_utils.py
index f08120d..1a62ab2 100644
--- a/glustolibs-gluster/glustolibs/gluster/dht_test_utils.py
+++ b/glustolibs-gluster/glustolibs/gluster/dht_test_utils.py
@@ -309,10 +309,9 @@ def find_new_hashed(subvols, parent_path, oldname):
count += 1
ret = brickdir.hashrange_contains_hash(newhash)
if ret == 1:
- if oldhashed._host != brickdir._host:
- g.log.debug("oldhashed %s new %s count %s",
- oldhashed, brickdir._host, str(count))
- return NewHashed(item, brickdir, count)
+ g.log.debug("oldhashed %s new %s count %s",
+ oldhashed, brickdir._host, str(count))
+ return NewHashed(item, brickdir, count)
count = -1
return None