Skip to content

Commit

Permalink
set pool replication size before checking health
Browse files Browse the repository at this point in the history
Closes #77
  • Loading branch information
bengland2 authored and Mark Nelson committed Feb 15, 2016
1 parent 8933286 commit a1ffe15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cluster/ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,12 @@ def mkpool(self, name, profile_name, base_name=None):
common.pdsh(settings.getnodes('head'), 'sudo %s -c %s osd pool create %s %d %d' % (self.ceph_cmd, self.tmp_conf, name, pg_size, pgp_size)).communicate()

if replication and replication.isdigit():
pool_repl_size = int(replication)
common.pdsh(settings.getnodes('head'), 'sudo %s -c %s osd pool set %s size %s' % (self.ceph_cmd, self.tmp_conf, name, replication)).communicate()
logger.info('Checking Health after setting pool replication level.')
self.check_health()
common.pdsh(settings.getnodes('head'), 'sudo %s -c %s osd pool set %s min_size %d' % (self.ceph_cmd, self.tmp_conf, name, pool_repl_size-1)).communicate()

logger.info('Checking Healh after pool creation.')
self.check_health()

if prefill_objects > 0 or prefill_time > 0:
logger.info('prefilling %s %sbyte objects into pool %s' % (prefill_objects, prefill_object_size, name))
Expand Down

0 comments on commit a1ffe15

Please sign in to comment.