Skip to content

Commit

Permalink
assert when zero password SSH not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan Shribman committed May 14, 2015
1 parent 0550f75 commit f25b2f8
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.4 (2015-05-12)

- extended error handling
- improved installation instructions

## 1.0.3 (2015-04-27)

- can now use different directories on different nodes to issue IO
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Setup
wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py --insecure

- Install Cluster Shell

wget http://sourceforge.net/projects/clustershell/files/clustershell/1.6/clustershell-1.6.tar.gz/download
tar xvfz clustershell-1.6.tar.gz
cd clustershell-1.6
python setup.py install
cp -r conf /etc/clustershell

- Setup no password SSH to all slave nodes (in this example they are named
node01, node02 and node03):

Expand All @@ -38,8 +46,9 @@ Setup
apt-get install libaio libaio-devel # debian, ubuntu

# install latest FIO version
git clone http://git.kernel.dk/fio.git
cd fio
wget -O fio-master.zip https://github.com/axboe/fio/archive/master.zip
unzip fio-master.zip
cd fio-master
./configure
make
make install
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.3
1.0.4
4 changes: 3 additions & 1 deletion pio/drivers/fio.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def to_kbps(s):

def parse_bw(test_out):
""" returns the bw from cmd's output """
return to_kbps(bw_re.search(test_out).group(1))
found = bw_re.search(test_out)
assert found != None
return to_kbps(found.group(1))

def validate_limit(limit):
""" validates the given limit to work with the driver """
Expand Down
20 changes: 15 additions & 5 deletions pio/perf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from ClusterShell.Task import task_self
csh = task_self()
from collections import defaultdict
import argparse

Expand All @@ -11,6 +12,11 @@ def __init__(self, order, direction, blocksize):
self.bs = blocksize
self.d = direction
self.results = []
def __str__(self):
return '<object of ' + str(self.__class__) + ' with ' \
+ 'order=' + self.o + ', ' \
+ 'diretion=' + self.d + ', ' \
+ 'blocksize=' + self.bs + '>'

class TestSuite(object):
def __init__(self, driver, limit, streams, nodes_paths, tests):
Expand All @@ -22,6 +28,11 @@ def __init__(self, driver, limit, streams, nodes_paths, tests):
self.streams = streams
self.nodes_paths = parse_nodes_paths(nodes_paths)
self.tests = tests
def __str__(self):
return '<object of ' + str(self.__class__) + ' with ' \
+ 'limit=' + self.limit + ', ' \
+ 'streams=' + self.streams + ', ' \
+ 'paths=' + self.nodes_paths + '>'

def run_tests(self):
for t in self.tests:
Expand All @@ -35,13 +46,14 @@ def run_test(self, test):
for i in range(self.streams):
cmd = self.driver.gen_cmd(test, i, self.limit, path)
cfg.dprint("Listing: " + cmd)
task.shell(cmd, nodes=node)
csh.shell(cmd, nodes=node)
cfg.dprint("Running above commands.")
task.resume()
csh.resume()

def update_test_results(self, test):
for buf, nodes in task.iter_buffers():
for buf, nodes in csh.iter_buffers():
test_out = str(buf)
assert test_out != 'Permission denied (publickey,keyboard-interactive).'
cfg.dprint(test_out)
bw = self.driver.parse_bw(test_out)
test.results += [(n, bw) for n in nodes]
Expand Down Expand Up @@ -103,5 +115,3 @@ def lim(indicator, driver, limit):
'q': {'fio': 6, 'fstest': '64M'},
'': {'fio': 60, 'fstest': '1G'}}
return lim_dict[indicator][driver]

task = task_self()
1 change: 1 addition & 0 deletions pio/pio.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
import argparse

import perf
Expand Down

0 comments on commit f25b2f8

Please sign in to comment.