From ed3c3615c32df87b654969a23708da703bf3ceb3 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Tue, 5 Feb 2013 23:31:37 -0800 Subject: [PATCH] nuke: don't try unmount if we're rebooting everything anyway This can cause issues when unmount hangs. Our automatic runs reboot everything unconditionally, so this caused a bunch of unecessary hangs when an fs was accidentally rendered un-unmountable. --- teuthology/nuke.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/teuthology/nuke.py b/teuthology/nuke.py index b94c7b9c69928..fbe6882b48f0b 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -395,19 +395,21 @@ def nuke_helper(ctx, log): shutdown_daemons(ctx, log) log.info('All daemons killed.') - log.info('Unmount any osd data directories...') - remove_osd_mounts(ctx, log) + need_reboot = find_kernel_mounts(ctx, log) - log.info('Unmount any osd tmpfs dirs...') - remove_osd_tmpfs(ctx, log) - - log.info('Dealing with any kernel mounts...') - kernel_mounts = find_kernel_mounts(ctx, log) - #remove_kernel_mounts(ctx, kernel_mounts, log) - need_reboot = kernel_mounts + # no need to unmount anything if we're rebooting if ctx.reboot_all: need_reboot = ctx.cluster.remotes.keys() - reboot(ctx, need_reboot, log) + else: + log.info('Unmount any osd data directories...') + remove_osd_mounts(ctx, log) + log.info('Unmount any osd tmpfs dirs...') + remove_osd_tmpfs(ctx, log) + #log.info('Dealing with any kernel mounts...') + #remove_kernel_mounts(ctx, need_reboot, log) + + if need_reboot: + reboot(ctx, need_reboot, log) log.info('All kernel mounts gone.') log.info('Synchronizing clocks...') -- 2.39.5