From e1d2a71813c7e1a7de2d99c547718382f15bf8e6 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Tue, 20 Dec 2022 18:53:20 +0000 Subject: [PATCH] fog: make timeouts configurable This will help with the sepia lab, being able to increase these temporarily to handle a new fog server that is sometimes exceeding the hardcoded timeouts. Signed-off-by: Josh Durgin --- teuthology/config.py | 2 ++ teuthology/provision/fog.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/teuthology/config.py b/teuthology/config.py index b97d5188c..3983d3d0f 100644 --- a/teuthology/config.py +++ b/teuthology/config.py @@ -166,6 +166,8 @@ class TeuthologyConfig(YamlConfig): 'src_base_path': os.path.expanduser('~/src'), 'verify_host_keys': True, 'watchdog_interval': 120, + 'fog_reimage_timeout': 1800, + 'fog_wait_for_ssh_timeout': 600, 'kojihub_url': 'http://koji.fedoraproject.org/kojihub', 'kojiroot_url': 'http://kojipkgs.fedoraproject.org/packages', 'koji_task_url': 'https://kojipkgs.fedoraproject.org/work/', diff --git a/teuthology/provision/fog.py b/teuthology/provision/fog.py index 09cf2346a..e3775e2fc 100644 --- a/teuthology/provision/fog.py +++ b/teuthology/provision/fog.py @@ -251,7 +251,7 @@ class FOG(object): completed) """ self.log.info("Waiting for deploy to finish") - with safe_while(sleep=15, tries=120) as proceed: + with safe_while(sleep=15, tries=120, timeout=config.fog_reimage_timeout) as proceed: while proceed(): if not self.deploy_task_active(task_id): break @@ -267,7 +267,7 @@ class FOG(object): def _wait_for_ready(self): """ Attempt to connect to the machine via SSH """ - with safe_while(sleep=6, tries=100) as proceed: + with safe_while(sleep=6, timeout=config.fog_wait_for_ssh_timeout) as proceed: while proceed(): try: self.remote.connect() -- 2.47.3