From da2a83562b297c019b9325023577196ec992e507 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 2 Oct 2014 12:52:20 +0100 Subject: [PATCH] Orchestration use stack timeout waiting for ping response The test_server_cfn_init scenario test boots a full Fedora image, not the cirros image which is presumably used for compute tests where the default 120s ping timeout may be appropriate. To ensure we don't encounter any spurious failures due to booting the much bigger orchestration image (which is Fedora in the gate), use the stack timeout (default 900s) to override the ping timeout for this test. Change-Id: I4eba18333bdaa0ef41122cda85fd3f4d91b2cf5c Closes-Bug: #1374175 --- tempest/scenario/manager.py | 7 ++++--- tempest/scenario/orchestration/test_server_cfn_init.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py index 79207cd932..699d9a76b5 100644 --- a/tempest/scenario/manager.py +++ b/tempest/scenario/manager.py @@ -443,7 +443,9 @@ class ScenarioTest(tempest.test.BaseTestCase): if wait: self.servers_client.wait_for_server_status(server_id, 'ACTIVE') - def ping_ip_address(self, ip_address, should_succeed=True): + def ping_ip_address(self, ip_address, should_succeed=True, + ping_timeout=None): + timeout = ping_timeout or CONF.compute.ping_timeout cmd = ['ping', '-c1', '-w1', ip_address] def ping(): @@ -453,8 +455,7 @@ class ScenarioTest(tempest.test.BaseTestCase): proc.communicate() return (proc.returncode == 0) == should_succeed - return tempest.test.call_until_true( - ping, CONF.compute.ping_timeout, 1) + return tempest.test.call_until_true(ping, timeout, 1) class NetworkScenarioTest(ScenarioTest): diff --git a/tempest/scenario/orchestration/test_server_cfn_init.py b/tempest/scenario/orchestration/test_server_cfn_init.py index abda1f8287..791c564c22 100644 --- a/tempest/scenario/orchestration/test_server_cfn_init.py +++ b/tempest/scenario/orchestration/test_server_cfn_init.py @@ -24,7 +24,6 @@ LOG = logging.getLogger(__name__) class CfnInitScenarioTest(manager.OrchestrationScenarioTest): - @test.skip_because(bug="1374175") def setUp(self): super(CfnInitScenarioTest, self).setUp() if not CONF.orchestration.image_ref: @@ -84,7 +83,8 @@ class CfnInitScenarioTest(manager.OrchestrationScenarioTest): server_ip =\ server['addresses'][CONF.compute.network_for_ssh][0]['addr'] - if not self.ping_ip_address(server_ip): + if not self.ping_ip_address( + server_ip, ping_timeout=CONF.orchestration.build_timeout): self._log_console_output(servers=[server]) self.fail( "(CfnInitScenarioTest:test_server_cfn_init) Timed out waiting "