summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/gluster_init.py
Commit message (Collapse)AuthorAgeFilesLines
* [Libfix] Add retry logic to restart_glusterd()kshithijiyer2020-06-171-5/+11
| | | | | | | | | | | | | | | | | | | | | | Problem: Patch [1] and [2] sent to glusterfs where changes are made to glusterd.service.in to not allow glusterd restart for more than 6 times within an hour, due this glusterd restarts present in testcases may fail as there is no way to figure out when we reach the 6 restart limit. Fix: Add code to check if glusterd restart has failed if true then call reset_failed_glusterd(), and redo the restart. Links: [1] https://review.gluster.org/#/c/glusterfs/+/23751/ [2] https://review.gluster.org/#/c/glusterfs/+/23970/ Change-Id: I041a019f9a8757d8fead00302e6bbcd6563dc74e Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
* [Lib] Add library for reset-failedkshithijiyer2020-06-161-1/+25
| | | | | | | | | | | | | | | | | Adding library function reset_failed_glusterd() and modifying scratch_cleanup() to use reset_failed_glusterd(). This is needed because of patch [1] and [2] sent to glusterfs where changes are made to glusterd.service.in to not allow glusterd restart for more than 6 times within an hour. Links: [1] https://review.gluster.org/#/c/glusterfs/+/23751/ [2] https://review.gluster.org/#/c/glusterfs/+/23970/ Change-Id: I25f982517420f20f11a610e8a68afc71f3b7f2a9 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
* [Lib] Adding function to check the Gluster versionsayaleeraut2020-01-241-0/+16
| | | | | | | | The function will return the gluster version in float for the host it is called on. It accepts the host IP as a parameter. Change-Id: Icf48cf41031f0fa06cf3864e9215c5a960bb7c64 Signed-off-by: sayaleeraut <saraut@redhat.com>
* [libfix][testfix] Add waiter function for glusterd and peer connected ↵Sri Vignesh2020-01-211-0/+29
| | | | | | | | | library files Moving waiters from testcase and adding it as function in library in gluster_init and peer_ops. Change-Id: I5ab1e42a5a0366fadb399789da1c156d8d96ec18 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
* [py2to3] Fix file gluster_init.pySri Vignesh2020-01-071-8/+8
| | | | | | | | | | - Use 'list' object type in comparisons instead of 'str'. Because it is differently treated in py2 and py3. Example: # In py2 isinstance(u'foo', str) is False # In py3 isinstance(u'foo', str) is True Change-Id: Ic0a5c1469e9951ee9b2472714004b05e2c5fdc94 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
* [py2to3] Replace usage of ".iteitems()" attr with ".items()"Valerii Ponomarov2019-11-211-4/+4
| | | | | | | | Dict attribute called "iteritems()" is not supported in the py3. So, replace it's usage with another similar attr called "items()". Change-Id: I130b7f67f0a2d5da5ed6c3d792f5ff024ba148f4 Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
* Fix a mistake in gluster_init libNigel Babu2018-05-031-24/+24
| | | | | | Also fix pylint errors while I'm fixing things in there Change-Id: I62904384a7b7a441b426003b18743f3d3a7f2dde
* Adding AFR self heal daemon test casesVijay Avuthu2018-01-231-0/+55
| | | | | | | | | | | Gave meaningful names to functions Returning -1 if there is no process running Replace numbers with words Rewording the msg "More than 1 or 0 self heal daemon" Review Comments incorporated Change-Id: If424a6f78536279c178ee45d62099fd8f63421dd Signed-off-by: Vijay Avuthu <vavuthu@redhat.com>
* Check if servers/nodes which is expected to be passed as listShwethaHP2018-01-161-10/+25
| | | | | | | | is str. i.e passing a single node to the function. If it is str, then convert it to list Change-Id: I1abacf62fdbe1ec56fe85c86d8e2a323a2c3971b Signed-off-by: ShwethaHP <spandura@redhat.com>
* Clean up pyflakes and pep8 errorsNigel Babu2016-12-121-3/+7
| | | | | Change-Id: Ibdd092118d3bb912716c46fd278ef3c680a6e742 Signed-off-by: Nigel Babu <nigelb@redhat.com>
* Adding libs for brick ops, volume helpers, mount helpers, gluster baseShwetha Panduranga2016-10-171-0/+150
class, heal related helpers, samba helpers, and windows ops helpers Change-Id: I0ad8fc7548c88e89d2ba6441166b9a38af76cea0 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>