From 5cf638be97af11ca422727441784567d1e44d291 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Tue, 27 Feb 2018 13:29:56 -0500 Subject: [PATCH] fog: Wait 10 minutes for machine to be reachable after deploy A lot's going on in rc.local after a machine is provisioned with FOG. 5 minutes is a little aggressive when taking into account the time it takes for: - The machine to reboot after the FOG task completes - BIOS to load - DHCP/PXE/TFTP to timeout (double this if NIC order isn't correct) - OS to boot and rc.local to do its magic Signed-off-by: David Galloway --- teuthology/provision/fog.py | 2 +- teuthology/provision/test/test_fog.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/teuthology/provision/fog.py b/teuthology/provision/fog.py index 3e08e038e0..fc28ecdfcf 100644 --- a/teuthology/provision/fog.py +++ b/teuthology/provision/fog.py @@ -257,7 +257,7 @@ class FOG(object): def _wait_for_ready(self): """ Attempt to connect to the machine via SSH """ - with safe_while(sleep=6, tries=50) as proceed: + with safe_while(sleep=6, tries=100) as proceed: while proceed(): try: self.remote.connect() diff --git a/teuthology/provision/test/test_fog.py b/teuthology/provision/test/test_fog.py index 61c342c43b..f4a791f1dc 100644 --- a/teuthology/provision/test/test_fog.py +++ b/teuthology/provision/test/test_fog.py @@ -285,13 +285,13 @@ class TestFOG(object): @mark.parametrize( 'tries', - [1, 51], + [1, 101], ) def test_wait_for_ready(self, tries): connect_results = [MaxWhileTries for i in range(tries)] + [True] obj = self.klass('name.fqdn', 'type', '1.0') self.mocks['m_Remote_connect'].side_effect = connect_results - if tries >= 50: + if tries >= 100: with raises(MaxWhileTries): obj._wait_for_ready() return -- 2.39.5