]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Make logs slightly quieter during scheduling
authorZack Cerza <zack@redhat.com>
Wed, 22 Nov 2023 01:50:01 +0000 (18:50 -0700)
committerZack Cerza <zack@redhat.com>
Tue, 5 Dec 2023 21:01:17 +0000 (14:01 -0700)
Particularly in non-verbose mode.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/repo_utils.py
teuthology/suite/run.py
teuthology/suite/util.py

index 03321fbf13f0a52830004adb497e8f9085282f41..ca0785bfdc9b6d3a4ed20eec11ba39e99a66c684 100644 (file)
@@ -121,8 +121,6 @@ def enforce_repo_state(repo_url, dest_path, branch, commit=None, remove_on_error
             set_remote(dest_path, repo_url)
             fetch_branch(dest_path, branch)
             touch_file(sentinel)
-        else:
-            log.info("%s was just updated or references a specific commit; assuming it is current", dest_path)
 
         if commit and os.path.exists(repo_reset):
             return
@@ -277,7 +275,7 @@ def fetch_branch(repo_path, branch, shallow=True):
                       GitError for other errors
     """
     validate_branch(branch)
-    log.info("Fetching %s from origin", branch)
+    log.info("Fetching %s from origin", repo_path.split("/")[-1])
     args = ['git', 'fetch']
     if shallow:
         args.extend(['--depth', '1'])
@@ -314,7 +312,7 @@ def reset_repo(repo_url, dest_path, branch, commit=None):
     else:
         reset_branch = 'origin/%s' % branch
     reset_ref = commit or reset_branch
-    log.info('Resetting repo at %s to %s', dest_path, reset_ref)
+    log.debug('Resetting repo at %s to %s', dest_path, reset_ref)
     # This try/except block will notice if the requested branch doesn't
     # exist, whether it was cloned or fetched.
     try:
index 509c8061cc2f0dee6f0cbbf40d652224def0f562..d08b750b913853af8c070ec1a137123a203f1ce8 100644 (file)
@@ -487,9 +487,7 @@ class Run(object):
                 flavor = util.get_install_task_flavor(full_job_config)
                 version = util.package_version_for_hash(sha1, flavor, os_type,
                     os_version, self.args.machine_type)
-                if version:
-                    log.debug(f"Found {version} for {os_type} {os_version} {flavor}")
-                else:
+                if not version:
                     jobs_missing_packages.append(job)
                     log.error(f"Packages for os_type '{os_type}', flavor {flavor} and "
                          f"ceph hash '{sha1}' not found")
@@ -668,9 +666,6 @@ Note: If you still want to go ahead, use --job-threshold 0'''
                     dry_run=self.args.dry_run,
                 )
 
-        if self.args.dry_run:
-            log.debug("Base job config:\n%s" % self.base_config)
-
         with open(base_yaml_path, 'w+b') as base_yaml:
             base_yaml.write(str(self.base_config).encode())
 
index 8d0af8e90bb926b6b3a23f4d033af73b4c3e05a1..a4f0efa60624e907f656224b9aab25af276ca418 100644 (file)
@@ -245,11 +245,10 @@ def package_version_for_hash(hash, flavor='default', distro='rhel',
         ),
     )
 
-    if bp.distro == CONTAINER_DISTRO and bp.flavor == CONTAINER_FLAVOR:
-        log.info('container build %s, checking for build_complete' % bp.distro)
-        if not bp.build_complete:
-            log.info('build not complete')
-            return None
+    if (bp.distro == CONTAINER_DISTRO and bp.flavor == CONTAINER_FLAVOR and 
+            not bp.build_complete):
+        log.info("Container build incomplete")
+        return None
 
     try:
         return bp.version
@@ -329,7 +328,7 @@ def teuthology_schedule(args, verbose, dry_run, log_prefix='', stdin=None):
                 printable_args.append("'%s'" % item)
             else:
                 printable_args.append(item)
-        log.info('{0}{1}'.format(
+        log.debug('{0} command: {1}'.format(
             log_prefix,
             ' '.join(printable_args),
         ))