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
This commit is contained in:
Steven Hardy 2014-10-02 12:52:20 +01:00
parent c7430c2ac5
commit da2a83562b
2 changed files with 6 additions and 5 deletions

View File

@ -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):

View File

@ -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 "