]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix pyflakes warnings.
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 31 Aug 2011 21:36:01 +0000 (14:36 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Wed, 31 Aug 2011 21:36:01 +0000 (14:36 -0700)
teuthology/nuke.py
teuthology/task/ceph.py
teuthology/task/kernel.py
teuthology/task/lockfile.py

index b6907e32acae37fe0c68873e8bd7bdb067540db5..2db6570ab73523d8820f18edfbe94212e846a55c 100644 (file)
@@ -1,6 +1,8 @@
 import argparse
 import yaml
 
+from orchestra import run
+
 def parse_args():
     from teuthology.run import config_file
     from teuthology.run import MergeConfig
@@ -33,7 +35,6 @@ def parse_args():
     return args
 
 def shutdown_daemons(ctx, log):
-    from orchestra import run
     nodes = {}
     for remote in ctx.cluster.remotes.iterkeys():
         proc = remote.run(
@@ -72,7 +73,6 @@ def shutdown_daemons(ctx, log):
         proc.exitstatus.get()
 
 def find_kernel_mounts(ctx, log):
-    from orchestra import run
     nodes = {}
     log.info('Looking for kernel mounts to handle...')
     for remote in ctx.cluster.remotes.iterkeys():
@@ -99,7 +99,6 @@ def remove_kernel_mounts(ctx, kernel_mounts, log):
     properly we should be able to just do a forced unmount,
     but that doesn't seem to be working, so you should reboot instead 
     """
-    from orchestra import run
     nodes = {}
     for remote in kernel_mounts:
         log.info('clearing kernel mount from %s', remote.name)
@@ -140,7 +139,6 @@ def reboot_kernel_mounts(ctx, kernel_mounts, log):
         reconnect(ctx, 300)     #allow 5 minutes for the reboots
 
 def remove_testing_tree(ctx, log):
-    from orchestra import run
     nodes = {}
     for remote in ctx.cluster.remotes.iterkeys():
         proc = remote.run(
index 67ec9895d0a5be6ac561c60b2d094076b10333be..847aa07f23cb1d7df69a7b5844e86d258567621d 100644 (file)
@@ -544,7 +544,7 @@ def cluster(ctx, config):
             log.info('Grabbing cluster log from %s %s...' % (mon0_remote,
                                                              firstmon))
             dest = os.path.join(ctx.archive, 'ceph.log')
-            proc = mon0_remote.run(
+            mon0_remote.run(
                 args = [
                     'cat',
                     '--',
index 6a2d85e802422fd77e42565e935db13101ada7ff..da79c62dd0fd90ca298bfae67209f55299484ebe 100644 (file)
@@ -1,11 +1,9 @@
 from cStringIO import StringIO
 
 import logging
-import socket
-import time
 
 from teuthology import misc as teuthology
-from orchestra import connection, run
+from orchestra import run
 
 log = logging.getLogger(__name__)
 
index b9c664e1b8ddbf3a5d49036ea3abd6b8e37890a4..c2bf41da67b9d17c86d38159c65dca79308ac3ce 100644 (file)
@@ -1,9 +1,7 @@
 import logging
-import threading
 import os
 
 from orchestra import run
-import teuthology.misc as teuthology
 import time
 import gevent
 
@@ -136,13 +134,11 @@ def task(ctx, config):
         log.debug('created files to lock')
 
         # now actually run the locktests
-        spawnwait = 0
         for op in config:
             if not isinstance(op, dict):
                 assert isinstance(op, int) or isinstance(op, float)
                 log.info("sleeping for {sleep} seconds".format(sleep=op))
                 time.sleep(op)
-                spawnwait = 0
                 continue
             greenlet = gevent.spawn(lock_one, op, ctx)
             lock_procs.append((greenlet, op))