From 5fda01f3002e7e742a206ce149652c6b78356828 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 27 Nov 2015 00:29:04 -0700 Subject: [PATCH] LU-7428 tests: write superblock in conf-sanity test_84 In conf-sanity.sh test_84() a newly-formatted MDS filesystem's block device is set read-only immediately after mount via replay_barrier(), which may result in initial formatting or configs to be discarded, resulting in a wide variety of different failure modes for this test. Ensure that the superblock and other configuration logs are flushed to disk before replay_barrier() is called, so that the MDS can mount properly again later in the test. Test-Parameters: testlist=conf-sanity,conf-sanity,conf-sanity,conf-sanity Test-Parameters: testlist=conf-sanity,conf-sanity,conf-sanity,conf-sanity Signed-off-by: Andreas Dilger Change-Id: I95894b600ed7596c2014cba4f35fef4b443ebbe5 Reviewed-on: http://review.whamcloud.com/17371 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 11 +++++++---- lustre/tests/test-framework.sh | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index b231784..5b00d52 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -5575,13 +5575,16 @@ test_84() { "-o recovery_time_hard=$time_min,recovery_time_soft=$time_min" $@ || error "start MDS failed" - start_ost - start_ost2 + start_ost || error "start OST0000 failed" + start_ost2 || error "start OST0001 failed" echo "recovery_time=$time_min, timeout=$TIMEOUT, wrap_up=$wrap_up" - mount_client $MOUNT1 || error "mount failed" - mount_client $MOUNT2 || error "mount failed" + mount_client $MOUNT1 || error "mount $MOUNT1 failed" + mount_client $MOUNT2 || error "mount $MOUNT2 failed" + # make sure new superblock labels are sync'd before disabling writes + sync_all_data + sleep 5 replay_barrier $SINGLEMDS createmany -o $DIR1/$tfile-%d 1000 diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 2547035..8902440 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -2142,9 +2142,9 @@ wait_update_facet() { sync_all_data() { do_nodes $(comma_list $(mdts_nodes)) \ - "lctl set_param -n osd*.*MDT*.force_sync 1" + "lctl set_param -n osd*.*MDT*.force_sync=1" do_nodes $(comma_list $(osts_nodes)) \ - "lctl set_param -n osd*.*OS*.force_sync 1" 2>&1 | + "lctl set_param -n osd*.*OS*.force_sync=1" 2>&1 | grep -v 'Found no match' } -- 1.8.3.1