| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
There are scenarios where multiple files are to be renamed
to hash to a particular subvol. The existing method returns
the same name as the loop always starts from 1.
Fix:
Adding an optional argument, existing_names which contains
names already hashed to the subvol. An additional check is
added to ensure the name found is not already used
Change-Id: I453ee290c8462322194cebb42c40e8fbc7c373ed
Signed-off-by: Pranav <prprakas@redhat.com>
|
|
|
|
|
|
|
|
| |
This method helps in cases of rename scenarios where the new filename
has to be hashed to a specific subvol
Change-Id: Ia36ea8e3d279ddf130f3a8a940dbe1fcb1910974
Signed-off-by: Pranav <prprakas@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`g.rpyc_get_connection()` has a limitaion where it can't
convert python2 calls to python3 calls. Due to this a large
number of testcases fail when executed from a python2 machine
on a python3 only setup or visa versa with the below stack trace:
```
E ========= Remote Traceback (1) =========
E Traceback (most recent call last):
E File "/root/tmp.tL8Eqx7d8l/rpyc/core/protocol.py", line 323, in _dispatch_request
E res = self._HANDLERS[handler](self, *args)
E File "/root/tmp.tL8Eqx7d8l/rpyc/core/protocol.py", line 591, in _handle_inspect
E if hasattr(self._local_objects[id_pack], '____conn__'):
E File "/root/tmp.tL8Eqx7d8l/rpyc/lib/colls.py", line 110, in __getitem__
E return self._dict[key][0]
E KeyError: (b'rpyc.core.service.SlaveService', 94282642994712, 140067150858560)
```
Solution:
The solution here is to modify the code to not use
`g.rpyc_get_connection()`. The following changes are done
to accomplish it:
1)Remove code which uses g.rpyc_get_connection() and use generic
logic in functions:
a. do_bricks_exist_in_shd_volfile()
b. get_disk_usage()
c. mount_volume()
d. list_files()
f. append_string_to_file()
2)Create files which can be uploaded and executed on
clients/servers to avoid rpc calls in functions:
a. calculate_hash()
b. validate_files_in_dir()
3)Modify setup.py to push the below files to
`/usr/share/glustolibs/scripts/`:
a.compute_hash.py
b.walk_dir.py
Change-Id: I00a81a88382bf3f8b366753eebdb2999260788ca
Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testcase steps: (file access)
- rename the file so that the hashed and cached are different
- make sure file can be accessed as long as cached is up
Fixes a library issue as well in find_new_hashed()
Change-Id: Id81264848d6470b9fe477b50290f5ecf917ceda3
Co-authored-by: Susant Palai <spalai@redhat.com>
Signed-off-by: Susant Palai <spalai@redhat.com>
Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new function volume_type() will check if the volume under test
is of pure Replicated/Disperse/Arbiter type and return the result
in string.
The functions,run_layout_tests() & validate_files_in_dir() have
been modified to check the Gluster version and volume type in order
to fix the DHT pass-through caused issues.
Change-Id: Ie7ad259883907c1fdc0b54e6743636fdab793272
Signed-off-by: sayaleeraut <saraut@redhat.com>
|
|
|
|
| |
Change-Id: I46fc2feffe6443af6913785d67bf310838532421
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
def is_layout_complete(mnode, volname):
"""This function reads the subvols in the given volume and checks
whether layout is complete or not.
Layout starts at zero,
ends at 32-bits high,
and has no holes or overlaps
Args:
volname (str): volume name
mnode (str): Node on which cmd has to be executed.
Returns (bool): True if layout is complete
False if layout has any holes or overlaps
Example:
is_layout_complete("abc.xyz.com", "testvol")
"""
Change-Id: I46b20bf71c0dd3ac7d2dd393fa209744c4eebb3c
Signed-off-by: Prasad Desala <tdesala@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Added functions to search for a hashed/nonhashed subvol for a file/dir.
Adding function find_new_hashed. This is written for rename case so
that the new name will hash to a different subvol than that of the
the old name.
Change-Id: I8dc0b40ab517071096b704966e680c61d8bcc516
Signed-off-by: Susant Palai <spalai@redhat.com>
|
|
* 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>
|