]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix review comments
authorVasu Kulkarni <vasu@redhat.com>
Sat, 12 Mar 2016 07:15:39 +0000 (02:15 -0500)
committerVasu Kulkarni <vasu@redhat.com>
Sat, 12 Mar 2016 07:15:39 +0000 (02:15 -0500)
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
clusters/fixed-1.yaml
tasks/ceph_deploy.py

index 4259c313dac2f199f2c3acb66c975ae91536af41..3768607330822f68ec1134f3caf87a984f6d4879 100644 (file)
@@ -2,7 +2,9 @@ overrides:
   ceph-deploy:
     conf:
       global:
-        mon pg warn min per osd: 1
-        osd pool default size: 1
+        osd pool default size: 2
+        osd crush chooseleaf type: 0
+        osd pool default pg num:  128
+        osd pool default pgp num:  128
 roles:
 - [mon.a, osd.0, osd.1, osd.2, client.0]
index b82ed841113812a5fc927945183cff31ae0e516d..8b8badc77cee25c5e518242334e51430e07a9a9f 100644 (file)
@@ -557,19 +557,12 @@ def cli_test(ctx, config):
     out = r.stdout.getvalue()
     log.info('Ceph health: %s', out.rstrip('\n'))
     log.info("Waiting for cluster to become healthy")
-    retry = 1
-    while (out.split(None, 1)[0] != 'HEALTH_OK') and (retry <= 6):
-        r = remote.run(args=['sudo', 'ceph', 'health'], stdout=StringIO())
-        log.info('Retry: %d Ceph health: %s', retry, out.rstrip('\n'))
-        time.sleep(10)
-        retry += 1
-    if (retry > 6):
-        raise RuntimeError(
-            "Failed to reach HEALTH_OK state after {r} retries".format(
-                r=retry))
-    else:
-        log.info('All ceph-deploy cli tests passed')
-    # test rgw cli
+    with contextutil.safe_while(sleep=10, tries=6,
+                                action='check health') as proceed:
+       while proceed():
+           r = remote.run(args=['sudo', 'ceph', 'health'], stdout=StringIO())
+           if (out.split(None,1)[0] == 'HEALTH_OK'):
+               break
     rgw_install = 'install {branch} --rgw {node}'.format(
         branch=test_branch,
         node=nodename,
@@ -577,6 +570,7 @@ def cli_test(ctx, config):
     rgw_create = 'rgw create ' + nodename
     execute_cdeploy(admin, rgw_install, path)
     execute_cdeploy(admin, rgw_create, path)
+    log.info('All ceph-deploy cli tests passed')
     try:
         yield
     finally: