summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/gluster_base_class.py')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/gluster_base_class.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
index d27b9ad..93e906f 100644
--- a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
+++ b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
@@ -45,7 +45,8 @@ from glustolibs.gluster.peer_ops import (
peer_probe_servers, peer_status
)
from glustolibs.gluster.gluster_init import (
- restart_glusterd, stop_glusterd, wait_for_glusterd_to_start)
+ restart_glusterd, stop_glusterd, wait_for_glusterd_to_start,
+ reset_failed_glusterd)
from glustolibs.gluster.samba_libs import share_volume_over_smb
from glustolibs.gluster.volume_libs import (
cleanup_volume,
@@ -290,8 +291,18 @@ class GlusterBaseClass(TestCase):
return False
ret = restart_glusterd(cls.servers)
if not ret:
- g.log.error("Failed to start glusterd")
- return False
+ # Due to recent changes in glusterd.service.in
+ # we can only restart glusterd 6 times in an hour
+ # if not then we would need reset-failed glusterd
+ # and restart glusterd
+ ret = reset_failed_glusterd(cls.servers)
+ if not ret:
+ g.log.error("Failed to reset glusterd")
+ return False
+ ret = restart_glusterd(cls.servers)
+ if not ret:
+ g.log.error("Failed to start glusterd")
+ return False
sleep(2)
ret = wait_for_glusterd_to_start(cls.servers)
if not ret: