mnt,
],
)
- except CommandFailedError as e:
+ except run.CommandFailedError:
log.info('Failed to unmount ceph-fuse on {name}, aborting...'.format(name=remote.name))
# abort the fuse mount, killing all hung processes
remote.run(
import json
import threading
from teuthology import misc as teuthology
-from ..orchestra import run
class Thrasher:
def __init__(self, manager, config, logger=None):
-import contextlib
import logging
-import os
from teuthology import misc as teuthology
import contextlib
import logging
import os
-import re
from teuthology import misc as teuthology
from teuthology import contextutil
@contextlib.contextmanager
def binaries(ctx, config):
path = config.get('path')
- tmpdir = None
if path is None:
# fetch from gitbuilder gitbuilder
import contextlib
import logging
-import os
from teuthology import misc as teuthology
skip = random.randrange(0.0, 1.0)
if self.weight < 1.0 and skip > self.weight:
- self.log('skipping thrash iteration with skip ({skip}) > weight ({weight})'.format(skip=skip, weight=weight))
+ self.log('skipping thrash iteration with skip ({skip}) > weight ({weight})'.format(skip=skip, weight=self.weight))
continue
# find the active mds in the failure group
random.seed(seed)
max_thrashers = config.get('max_thrash', 1)
- managers = {}
thrashers = {}
(first,) = ctx.cluster.only('mds.{_id}'.format(_id=mdslist[0])).remotes.iterkeys()
-import contextlib
import logging
-import os
-from datetime import datetime
from teuthology import misc as teuthology
# write out the mpi hosts file
log.info('mpi nodes: [%s]' % (', '.join(hosts)))
- hostfiledata = '\n'.join(hosts) + '\n'
teuthology.write_file(remote=master_remote, path='/tmp/cephtest/mpi-hosts', data='\n'.join(hosts))
log.info('mpiexec on {name}: {cmd}'.format(name=master_remote.name, cmd=mpiexec))
args=['mpiexec', '-f', '/tmp/cephtest/mpi-hosts']
import contextlib
import logging
import os
-import re
from teuthology import misc as teuthology
-import contextlib
import logging
-import os
-from datetime import datetime
from teuthology import misc as teuthology
from teuthology.parallel import parallel
sample = json.loads(line)
samples = lat.setdefault(sample['type'], [])
samples.append(float(sample['latency']))
- except Exception, e:
+ except Exception:
pass
for type in lat:
from cStringIO import StringIO
from configobj import ConfigObj
-import base64
import contextlib
import logging
-import os
-import random
-import string
import s3tests
-import socket
from teuthology import misc as teuthology
from teuthology import contextutil
-from ..orchestra import run
-from ..orchestra.connection import split_user
log = logging.getLogger(__name__)
netcat_out = StringIO()
for client, client_config in config.iteritems():
- proc = ctx.cluster.only(client).run(
+ ctx.cluster.only(client).run(
args = [
'netcat',
'-w', '5',
#!/usr/bin/python
import contextlib
-import errno
import logging
-import os
import paramiko
import re
# fails 1/2 way through (don't want to break ssh on the vm)
old_auth_keys_file = mySftp.open(auth_keys_file)
new_auth_keys_file = mySftp.open(auth_keys_file + '.new', 'w')
- out_keys = []
for line in old_auth_keys_file.readlines():
match = re.search(re.escape(public_key), line)
# if neither kclient nor ceph-fuse are required for a workunit,
# mnt may not exist. Stat and create the directory if it doesn't.
try:
- proc = remote.run(
+ remote.run(
args=[
'stat',
'--',
)
log.info('Did not need to create dir {dir}'.format(dir=mnt))
except:
- proc = remote.run(
+ remote.run(
args=[
'mkdir',
'--',