Skip to content

Commit

Permalink
Fix RBD name mismatch in librbdfio
Browse files Browse the repository at this point in the history
Fix the name of each RBD created by the librbdfio benchmark so the names
match the pattern expected by the clients.

Closes ceph#122

(cherry picked from commit b404296)
  • Loading branch information
Alan Bishop committed Dec 16, 2016
1 parent e615963 commit f7a14a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benchmark/librbdfio.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ def mkimages(self):
self.cluster.rmpool(self.poolname, self.pool_profile)
self.cluster.mkpool(self.poolname, self.pool_profile)
for node in settings.getnodes('clients').split(','):
stdout,stderr = common.pdsh(node, 'hostname -s').communicate()
nodename = stdout.split()[1]
for volnum in xrange(0, self.volumes_per_client):
node = node.rpartition("@")[2]
# common.pdsh(settings.getnodes('head'), '/usr/bin/rbd create cbt-librbdfio-%s-%d --size %s --pool %s --order %s' % (node, volnum, self.vol_size, self.poolname, self.vol_order)).communicate()
self.cluster.mkimage('cbt-librbdfio-%s-%d' % (node,volnum), self.vol_size, self.poolname, self.vol_order)
self.cluster.mkimage('cbt-librbdfio-%s-%d' % (nodename,volnum), self.vol_size, self.poolname, self.vol_order)
monitoring.stop()

def recovery_callback(self):
Expand Down

0 comments on commit f7a14a1

Please sign in to comment.