From: Josh Durgin Date: Tue, 20 Dec 2022 18:53:20 +0000 (+0000) Subject: fog: make timeouts configurable X-Git-Tag: 1.2.0~103^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1803%2Fhead;p=teuthology.git 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 --- 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()