From: Yan, Zheng Date: Thu, 29 Jun 2017 09:34:16 +0000 (+0800) Subject: qa: reset journal before cephfs_journal_tool_smoke.sh exits X-Git-Tag: v12.1.1~144^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=47ab651a1f94cb8b13e550f8a1648d8e81705655;p=ceph-ci.git qa: reset journal before cephfs_journal_tool_smoke.sh exits Fixes: http://tracker.ceph.com/issues/20440 Signed-off-by: "Yan, Zheng" --- diff --git a/qa/workunits/suites/cephfs_journal_tool_smoke.sh b/qa/workunits/suites/cephfs_journal_tool_smoke.sh index be19c90f8c8..60e91496511 100755 --- a/qa/workunits/suites/cephfs_journal_tool_smoke.sh +++ b/qa/workunits/suites/cephfs_journal_tool_smoke.sh @@ -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