]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: ceph-disk: add wait_for_osd_down() in ceph-disk-test.py of qa
authorVicente Cheng <freeze.bilsted@gmail.com>
Fri, 13 Nov 2015 01:28:10 +0000 (09:28 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Tue, 17 Nov 2015 01:24:43 +0000 (09:24 +0800)
  - add wait_for_osd_down() to avoid the side effect of deactivate

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
qa/workunits/ceph-disk/ceph-disk-test.py

index a87225b6bb0487b7a7c50492eaa930d2286e2749..68847b16f27a487f50fdace158954dc4115d591b 100644 (file)
@@ -191,6 +191,7 @@ class TestCephDisk(object):
         c.check_osd_status(osd_uuid, have_journal)
         data_partition = c.get_osd_partition(osd_uuid)
         c.sh("ceph-disk deactivate " + data_partition['path'])
+        c.wait_for_osd_down(osd_uuid)
         c.sh("ceph-disk activate " + data_partition['path'] + " --reactivate")
         # check again
         c.wait_for_osd_up(osd_uuid)
@@ -219,6 +220,7 @@ class TestCephDisk(object):
         assert partition['type'] == 'data'
         assert partition['state'] == 'active'
         c.sh("ceph-disk deactivate " + partition['path'])
+        c.wait_for_osd_down(osd_uuid)
         c.sh("ceph-disk destroy " + partition['path'] + " --zap")
 
     def test_deactivate_reactivate_dmcrypt_plain(self):
@@ -248,6 +250,7 @@ class TestCephDisk(object):
         c.check_osd_status(osd_uuid, have_journal)
         data_partition = c.get_osd_partition(osd_uuid)
         c.sh("ceph-disk deactivate " + data_partition['path'])
+        c.wait_for_osd_down(osd_uuid)
         c.sh("ceph-disk activate " + data_partition['path'] +
              " --reactivate" + " --dmcrypt")
         # check again