]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: reset journal before cephfs_journal_tool_smoke.sh exits
authorYan, Zheng <zyan@redhat.com>
Thu, 29 Jun 2017 09:34:16 +0000 (17:34 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 29 Jun 2017 09:44:19 +0000 (17:44 +0800)
Fixes: http://tracker.ceph.com/issues/20440
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
qa/workunits/suites/cephfs_journal_tool_smoke.sh

index be19c90f8c850128b8ecf25808740489c116b336..60e91496511f9cbb446e73184f36e9d2cc7f92a9 100755 (executable)
@@ -55,7 +55,16 @@ $BIN journal reset
 $BIN journal inspect
 $BIN header get
 
-# Can we import what we exported?
+echo "Rolling back journal to original state..."
+$BIN journal import $JOURNAL_FILE
+
+echo "Testing 'header' commands..."
+$BIN header get
+$BIN header set write_pos 123
+$BIN header set expire_pos 123
+$BIN header set trimmed_pos 123
+
+echo "Rolling back journal to original state..."
 $BIN journal import $JOURNAL_FILE
 
 echo "Testing 'event' commands..."
@@ -74,16 +83,10 @@ fi
 $BIN event recover_dentries summary
 $BIN event splice summary
 
-echo "Rolling back journal to original state..."
-$BIN journal import $JOURNAL_FILE
-
-echo "Testing 'header' commands..."
-
-$BIN header get
-$BIN header set write_pos 123
-$BIN header set expire_pos 123
-$BIN header set trimmed_pos 123
-
-echo "Rolling back journal to original state..."
-$BIN journal import $JOURNAL_FILE
+# Tests finish.
+# Metadata objects have been modified by the 'event recover_dentries' command.
+# Journal is no long consistent with respect to metadata objects (especially inotable).
+# To ensure mds successfully replays its journal, we need to do journal reset.
+$BIN journal reset
+cephfs-table-tool all reset session