Skip to content

Commit

Permalink
1-Creating /etc/ceph/ directory, before distributing conf file on cli…
Browse files Browse the repository at this point in the history
…ents. 2-Introduced conf file directory for mkimage function.
  • Loading branch information
VishwanathMaram authored and Mark Nelson committed Feb 9, 2016
1 parent 1203c2b commit 7d1ffa2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cluster/ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def distribute_conf(self):
nodes = settings.getnodes('head', 'clients', 'osds', 'mons', 'rgws')
conf_file = self.config.get("conf_file")
logger.info("Distributing %s.", conf_file)
common.pdsh(nodes, 'mkdir -p -m0755 /etc/ceph').communicate()
common.pdcp(nodes, '', conf_file, self.tmp_conf).communicate()
common.pdsh(nodes, 'sudo mv /etc/ceph/ceph.conf /etc/ceph/ceph.conf.cbt.bak').communicate()
common.pdsh(nodes, 'sudo ln -s %s /etc/ceph/ceph.conf' % self.tmp_conf).communicate()
Expand Down Expand Up @@ -551,7 +552,7 @@ def rbd_unmount(self):
common.pdsh(settings.getnodes('clients'), 'sudo service rbdmap stop').communicate()

def mkimage(self, name, size, pool, order):
common.pdsh(settings.getnodes('head'), '%s create %s --size %s --pool %s --order %s' % (self.rbd_cmd, name, size, pool, order)).communicate()
common.pdsh(settings.getnodes('head'), '%s -c %s create %s --size %s --pool %s --order %s' % (self.rbd_cmd, self.tmp_conf, name, size, poo l, order)).communicate()

class RecoveryTestThread(threading.Thread):
def __init__(self, config, cluster, callback, stoprequest, haltrequest):
Expand Down

0 comments on commit 7d1ffa2

Please sign in to comment.