]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Remove yum timedhosts files
authorZack Cerza <zack@redhat.com>
Mon, 29 Jun 2015 20:38:10 +0000 (14:38 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 29 Jun 2015 20:47:47 +0000 (14:47 -0600)
Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1233329

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/nuke.py

index 7fe64e4b8d47dfb7248f46ec1c81ddff406dc705..1dfa9774c9414e95ecad0bf69d88bdafb0606b8f 100644 (file)
@@ -261,6 +261,18 @@ def dpkg_configure(ctx):
         proc.wait()
 
 
+def remove_yum_timedhosts(ctx):
+    # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1233329
+    log.info("Removing yum timedhosts files...")
+    for remote in ctx.cluster.remotes.iterkeys():
+        if remote.os.package_type != 'rpm':
+            continue
+        remote.run(
+            args="find /var/cache/yum -name 'timedhosts' -exec rm {} \;",
+            check_status=False,
+        )
+
+
 def remove_installed_packages(ctx):
     dpkg_configure(ctx)
     conf = {'project': 'ceph'}
@@ -548,5 +560,6 @@ def nuke_helper(ctx, should_unlock):
     log.info('Clearing filesystem of test data...')
     remove_testing_tree(ctx)
     log.info('Filesystem Cleared.')
+    remove_yum_timedhosts(ctx)
     remove_installed_packages(ctx)
     log.info('Installed packages removed.')