From 8377930787e0f4c99f754076df41e9a34b5e5d02 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 27 Sep 2016 17:14:36 -0600 Subject: [PATCH] nuke: Add unlock_firmware_repo() Signed-off-by: Zack Cerza --- teuthology/nuke/__init__.py | 10 ++++------ teuthology/nuke/actions.py | 6 ++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/teuthology/nuke/__init__.py b/teuthology/nuke/__init__.py index b3297bbd6..e05413236 100644 --- a/teuthology/nuke/__init__.py +++ b/teuthology/nuke/__init__.py @@ -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) diff --git a/teuthology/nuke/actions.py b/teuthology/nuke/actions.py index f4376acd0..54251838c 100644 --- a/teuthology/nuke/actions.py +++ b/teuthology/nuke/actions.py @@ -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 -- 2.47.3