Whamcloud - gitweb
LU-2284 tests: enable D_QUOTA after mds/ost restart
authorNiu Yawei <niu@whamcloud.com>
Wed, 28 Nov 2012 10:33:46 +0000 (05:33 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 30 Nov 2012 18:29:23 +0000 (13:29 -0500)
Always enable D_QUOTA after mds/ost restart.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ifc069b1bb6444c41545dd7498c7c17e3a03bbcee
Reviewed-on: http://review.whamcloud.com/4695
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
lustre/tests/sanity-quota.sh

index 2f80fe0..1da366a 100644 (file)
@@ -968,6 +968,7 @@ test_7a() {
 
        echo "Start ost1..."
        start ost1 $(ostdevname 1) $OST_MOUNT_OPTS
 
        echo "Start ost1..."
        start ost1 $(ostdevname 1) $OST_MOUNT_OPTS
+       quota_init
 
        wait_ost_reint "ug" || error "reintegration failed"
 
 
        wait_ost_reint "ug" || error "reintegration failed"
 
@@ -989,6 +990,7 @@ test_7a() {
 
        echo "Start ost1..."
        start ost1 $(ostdevname 1) $OST_MOUNT_OPTS
 
        echo "Start ost1..."
        start ost1 $(ostdevname 1) $OST_MOUNT_OPTS
+       quota_init
 
        wait_ost_reint "ug" || error "reintegration failed"
 
 
        wait_ost_reint "ug" || error "reintegration failed"
 
@@ -1049,6 +1051,7 @@ test_7b() {
        echo "Restart ost to trigger reintegration..."
        stop ost1
        start ost1 $(ostdevname 1) $OST_MOUNT_OPTS
        echo "Restart ost to trigger reintegration..."
        stop ost1
        start ost1 $(ostdevname 1) $OST_MOUNT_OPTS
+       quota_init
 
        wait_ost_reint "ug" || error "reintegration failed"
 
 
        wait_ost_reint "ug" || error "reintegration failed"
 
@@ -1092,6 +1095,7 @@ test_7c() {
 
        echo "Start mds..."
        start mds1 $(mdsdevname 1) $MDS_MOUNT_OPTS
 
        echo "Start mds..."
        start mds1 $(mdsdevname 1) $MDS_MOUNT_OPTS
+       quota_init
 
        wait_ost_reint "ug" || error "reintegration failed"
 
 
        wait_ost_reint "ug" || error "reintegration failed"
 
@@ -1735,6 +1739,7 @@ test_22() {
        stopall
        mount
        setupall
        stopall
        mount
        setupall
+       quota_init
 
        echo "Verify if quota is disabled"
        qtype=$(mdt_quota_type)
 
        echo "Verify if quota is disabled"
        qtype=$(mdt_quota_type)
@@ -1742,7 +1747,7 @@ test_22() {
        qtype=$(ost_quota_type)
        [ $qtype != "none" ] && error "ost quota setting is lost"
 
        qtype=$(ost_quota_type)
        [ $qtype != "none" ] && error "ost quota setting is lost"
 
-       quota_init
+       return 0
 }
 run_test 22 "enable/disable quota by 'lctl conf_param'"
 
 }
 run_test 22 "enable/disable quota by 'lctl conf_param'"