diff options
author | Bala Konda Reddy M <bmekala@redhat.com> | 2019-03-28 12:28:11 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bmekala@redhat.com> | 2019-03-28 15:09:10 +0530 |
commit | 13227d34d0f9a9b996c7aaf07f486beffcbda391 (patch) | |
tree | 0169155ce5d1d491f1a9fab30f7cbc80bb2d2b88 /tests | |
parent | ad4931feb6602838432288553d17b5377457d540 (diff) |
Validating peer is in connected or not
In jenkins right after peer probe, add brick function is
failing with peer not in cluster. So having check for the
peer to be connected or not then proceed to next step.
Change-Id: I73bf92819ad44f7a6a14795ab07c45d260cd04eb
Signed-off-by: Bala Konda Reddy M <bmekala@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/glusterd/test_peer_status.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functional/glusterd/test_peer_status.py b/tests/functional/glusterd/test_peer_status.py index dfe0668cd..cc282de57 100644 --- a/tests/functional/glusterd/test_peer_status.py +++ b/tests/functional/glusterd/test_peer_status.py @@ -15,6 +15,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import socket +from time import sleep from glusto.core import Glusto as g from glustolibs.gluster.gluster_base_class import runs_on, GlusterBaseClass from glustolibs.gluster.exceptions import ExecutionError @@ -25,6 +26,7 @@ from glustolibs.gluster.lib_utils import form_bricks_list from glustolibs.gluster.peer_ops import (peer_probe, peer_status, peer_detach, peer_probe_servers, peer_detach_servers, + is_peer_connected, nodes_from_pool_list) @@ -129,6 +131,19 @@ class TestPeerStatus(GlusterBaseClass): g.log.info("Peer probe from %s to %s is success", self.mnode, self.servers[2]) + # Validate firts three peers are in connected state + # In jenkins The next step which is add-brick from thried node + # is failing with peer is not in cluster + count = 0 + while count < 30: + ret = is_peer_connected(self.mnode, self.servers[0:3]) + if ret: + g.log.info("Peers are in connected state") + break + sleep(3) + count = count + 1 + self.assertTrue(ret, "Some peers are not in connected state") + # add a brick from N3 to the volume num_bricks_to_add = 1 server_info = {} |