]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
nuke: don't try unmount if we're rebooting everything anyway
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 6 Feb 2013 07:31:37 +0000 (23:31 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Wed, 6 Feb 2013 07:31:39 +0000 (23:31 -0800)
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

index b94c7b9c6992805097ae6cc3a58b8bb975dd3bc5..fbe6882b48f0b7c4d2eab38c3d3fbb4bfd1099de 100644 (file)
@@ -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...')