]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
fog: make timeouts configurable 1803/head
authorJosh Durgin <jdurgin@redhat.com>
Tue, 20 Dec 2022 18:53:20 +0000 (18:53 +0000)
committerJosh Durgin <jdurgin@redhat.com>
Wed, 24 May 2023 16:27:43 +0000 (16:27 +0000)
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 <jdurgin@redhat.com>
teuthology/config.py
teuthology/provision/fog.py

index b97d5188c6c997c4761402e260413b08d18f7c27..3983d3d0f939320bb4c62941d0fd92f61b26f1b6 100644 (file)
@@ -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/',
index 09cf2346a5501dd10f3bfe187f80a355b46a6a00..e3775e2fc014b0834ab5025f3ef5a3829cf28421 100644 (file)
@@ -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()