path: root/glustolibs-gluster/scripts
Commit message (Collapse)AuthorAgeFilesLines
* [Libfix] Fix python3 break in c_unit32()kshithijiyer2020-09-081-2/+8
| | | | | | | | | | | | | | | | | Problem: In python3, c_unit32() needs explict declaration of encoding due to which the hash calculated by was wrong causeing 8 failures in latest CI runs on the newer platforms like CentOS 8. Solution: Add logic to specifiy encoding based on the version of python. Change-Id: I8907d8d266ac20d29d730a5ed948cf4da30f01b8 Signed-off-by: kshithijiyer <>
* [Libfix] Remove rpyc_get_connection() dependency from codekshithijiyer2020-04-012-0/+52
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/", line 323, in _dispatch_request E res = self._HANDLERS[handler](self, *args) E File "/root/tmp.tL8Eqx7d8l/rpyc/core/", line 591, in _handle_inspect E if hasattr(self._local_objects[id_pack], '____conn__'): E File "/root/tmp.tL8Eqx7d8l/rpyc/lib/", 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 to push the below files to `/usr/share/glustolibs/scripts/`: Change-Id: I00a81a88382bf3f8b366753eebdb2999260788ca Signed-off-by: kshithijiyer <>