]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
nuke: Add unlock_firmware_repo()
authorZack Cerza <zack@redhat.com>
Tue, 27 Sep 2016 23:14:36 +0000 (17:14 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 3 Oct 2016 16:17:10 +0000 (10:17 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/nuke/__init__.py
teuthology/nuke/actions.py

index b3297bbd66c8c0ddbdd2d63bacd81bc2ece1b67a..e05413236932e5b36bcd450c08637ce33a12c9ea 100644 (file)
@@ -26,9 +26,9 @@ from .actions import (
     check_console, clear_firewall, shutdown_daemons, remove_installed_packages,
     reboot, remove_osd_mounts, remove_osd_tmpfs, kill_hadoop,
     remove_kernel_mounts, remove_ceph_packages, synch_clocks,
-    remove_configuration_files, undo_multipath, reset_syslog_dir,
-    remove_ceph_data, remove_testing_tree, remove_yum_timedhosts,
-    kill_valgrind,
+    unlock_firmware_repo, remove_configuration_files, undo_multipath,
+    reset_syslog_dir, remove_ceph_data, remove_testing_tree,
+    remove_yum_timedhosts, kill_valgrind,
 )
 
 log = logging.getLogger(__name__)
@@ -332,9 +332,7 @@ def nuke_helper(ctx, should_unlock):
     remove_kernel_mounts(ctx)
     remove_ceph_packages(ctx)
     synch_clocks(remotes)
-    log.info('Making sure firmware.git is not locked...')
-    ctx.cluster.run(args=['sudo', 'rm', '-f',
-                          '/lib/firmware/updates/.git/index.lock', ])
+    unlock_firmware_repo(ctx)
     remove_configuration_files(ctx)
     undo_multipath(ctx)
     reset_syslog_dir(ctx)
index f4376acd04f0f75c74c45c0673dfb2a089c59560..54251838c38c47729916e8a30415776c9b55c4db 100644 (file)
@@ -397,6 +397,12 @@ def synch_clocks(remotes):
         )
 
 
+def unlock_firmware_repo(ctx):
+    log.info('Making sure firmware.git is not locked...')
+    ctx.cluster.run(args=['sudo', 'rm', '-f',
+                          '/lib/firmware/updates/.git/index.lock', ])
+
+
 def check_console(hostname):
     remote = Remote(hostname)
     shortname = remote.shortname