summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/mount_ops.py
Commit message (Collapse)AuthorAgeFilesLines
* [Libfix]Fix for Default version change to vers=4.1 for GaneshaManisha Saini2020-08-131-2/+2
| | | | | Change-Id: I19e7e5e4338fce0d77e42dae716cc5eb5f814a17 Signed-off-by: Manisha Saini <msaini@redhat.com>
* [Libfix] Remove rpyc_get_connection() dependency from codekshithijiyer2020-04-011-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Using egrep instead of grepArjun Sharma2019-09-261-1/+1
| | | | | | | | | Since egrep treats a pattern as extended regular expression it is more suited to be used in this case. The current usage of grep fails to identify the expression after the first pipe. Change-Id: Id02f884356048c56066a406937f8d86456ee8bd7 Signed-off-by: Arjun Sharma <arjsharm@redhat.com>
* Using a raw strings for fixing flake warningsVitalii Koriakov2018-10-291-12/+9
| | | | | Change-Id: Ie134790ea05919a4b396657c11cbc3fc7a7fc529 Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
* Fix spelling mistake across the codebaseNigel Babu2018-08-071-3/+3
| | | | Change-Id: I46fc2feffe6443af6913785d67bf310838532421
* Adding a cifs security option while mouting if the client is rhel6ShwethaHP2018-01-301-2/+22
| | | | | Change-Id: Ifc6aa4d106dadf97e1741ec54a3323ea96e33101 Signed-off-by: ShwethaHP <spandura@redhat.com>
* Making mounting of volume optional in the BaseClass.ShwethaHP2017-08-311-3/+9
| | | | | | | | Mounting of a volume will not always be distributed volume. Providing a option to mount a local volume as well. Change-Id: Iadbb596fba7e2a5fa4ba3ba53967961a70d00c8c Signed-off-by: ShwethaHP <spandura@redhat.com>
* Minor changes in gluster base class wrt nfs-ganeshaArthy Loganathan2017-06-121-5/+5
| | | | | Change-Id: Iaceb22cd5b2fe920c9cdc6d110d26939e26e5ffe Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Adding libs for brick ops, volume helpers, mount helpers, gluster baseShwetha Panduranga2016-10-171-0/+509
class, heal related helpers, samba helpers, and windows ops helpers Change-Id: I0ad8fc7548c88e89d2ba6441166b9a38af76cea0 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>