Whamcloud - gitweb
LU-6601 tests: test case validate OSP status op 37/19637/4
authorYang Sheng <yang.sheng@intel.com>
Mon, 18 Apr 2016 18:43:51 +0000 (02:43 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Apr 2016 15:48:45 +0000 (15:48 +0000)
Add a test case to verify status change is effective for OSP.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I11a6968756f66989ba87063424f6618475814901
Reviewed-on: http://review.whamcloud.com/19637
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity.sh

index 81a3532..07ae4fc 100644 (file)
@@ -14661,6 +14661,32 @@ test_403() {
 }
 run_test 403 "i_nlink should not drop to zero due to aliasing"
 
+test_404() { # LU-6601
+       local mosps=$(do_facet $SINGLEMDS $LCTL dl |
+               awk '/osp .*-osc-MDT/ { print $4}')
+
+       local osp
+       for osp in $mosps; do
+               echo "Deactivate: " $osp
+               do_facet $SINGLEMDS $LCTL --device %$osp deactivate
+               local stat=$(do_facet $SINGLEMDS $LCTL dl |
+                       awk -vp=$osp '$4 == p { print $2 }')
+               [ $stat = IN ] || {
+                       do_facet $SINGLEMDS $LCTL dl | grep -w $osp
+                       error "deactivate error"
+               }
+               echo "Activate: " $osp
+               do_facet $SINGLEMDS $LCTL --device %$osp activate
+               local stat=$(do_facet $SINGLEMDS $LCTL dl |
+                       awk -vp=$osp '$4 == p { print $2 }')
+               [ $stat = UP ] || {
+                       do_facet $SINGLEMDS $LCTL dl | grep -w $osp
+                       error "activate error"
+               }
+       done
+}
+run_test 404 "validate manual {de}activated works properly for OSPs"
+
 #
 # tests that do cleanup/setup should be run at the end
 #