From 7ed3f6e8ae5448fd287c64bff97217beb2cf502c Mon Sep 17 00:00:00 2001 From: Dmitriy Kruglov Date: Thu, 12 May 2016 16:19:24 +0000 Subject: [PATCH] Fix 'reset_on_ready_ubuntu_bootstrap' test Update the approach to waiting nodes to appear online after env reset. Wait not only for 'online' nailgun status of nodes, but also ensure that nodes are accessible. Change-Id: Iae7fde7646d1edf2a3353c664def134589cc41e0 Closes-Bug: #1572470 (cherry picked from commit af1955cffc6081a8221143d4090950910ac99c9e) --- fuelweb_test/tests/test_ubuntu_bootstrap.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fuelweb_test/tests/test_ubuntu_bootstrap.py b/fuelweb_test/tests/test_ubuntu_bootstrap.py index 748c70757..c6d1e1bf2 100644 --- a/fuelweb_test/tests/test_ubuntu_bootstrap.py +++ b/fuelweb_test/tests/test_ubuntu_bootstrap.py @@ -14,6 +14,7 @@ import tempfile import textwrap +from devops.helpers.helpers import tcp_ping from devops.helpers.helpers import wait from proboscis.asserts import assert_equal from proboscis.asserts import assert_not_equal @@ -527,8 +528,13 @@ class UbuntuBootstrap(base_test_case.TestBasic): self.fuel_web.wait_nodes_get_online_state(nodes, timeout=10 * 60) for node in nodes: - _ip = self.fuel_web.get_nailgun_node_by_devops_node(node)['ip'] - checkers.verify_bootstrap_on_node(_ip, os_type="ubuntu") + nailgun_node = self.fuel_web.get_nailgun_node_by_devops_node(node) + wait(lambda: tcp_ping(nailgun_node['ip'], 22), + timeout=300, + timeout_msg=("Node {0} is still unreachable after {1} " + "seconds".format(nailgun_node['name'], 300))) + checkers.verify_bootstrap_on_node( + nailgun_node['ip'], os_type="ubuntu") self.fuel_web.deploy_cluster_wait(cluster_id)