X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fconf-sanity.sh;h=f540da286be2e82eca9f8d6d44b3671da0277248;hp=2e390d1c373eec60dbebf842b4f3091e8a126482;hb=f38f09e02a05c82718344ad86f80a4a0f399af9d;hpb=2a34dc95bd100c181573e231047ff8976e296a36 diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 2e390d1..f540da2 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -9125,6 +9125,43 @@ test_127() { } run_test 127 "direct io overwrite on full ost" +test_128() +{ + combined_mgs_mds && skip "need separate mgs device" + [ "$ost2_FSTYPE" == zfs ] && import_zpool ost2 + + format_ost 2 + # Try to apply nolocallogs to the virgin OST. Should fail. + do_facet ost2 "$TUNEFS --nolocallogs $(ostdevname 2)" && + error "nolocallogs should not be allowed on the virgin target" + + setupall + stopall + + [ "$ost1_FSTYPE" == zfs ] && import_zpool ost1 + # Start OST without MGS (local configs) + do_facet ost1 "$TUNEFS --dryrun $(ostdevname 1)" + start_ost || error "unable to start OST1" + stop_ost || error "Unable to stop OST1" + + [ "$ost1_FSTYPE" == zfs ] && import_zpool ost1 + # Do not allow reading local configs, should fail + do_facet ost1 "$TUNEFS --nolocallogs $(ostdevname 1)" || + error "Can not set nolocallogs" + start_ost && error "OST1 started, but should fail" + + # Connect to MGS successfully, reset nolocallogs flag + [ "$ost1_FSTYPE" == zfs ] && import_zpool ost1 + start_mgs || error "unable to start MGS" + start_ost || error "unable to start OST1" + + do_facet ost1 "$TUNEFS --dryrun $(ostdevname 1)" | grep "nolocallogs" && + error "nolocallogs expected to be reset" + + stop_ost || error "Unable to stop OST1" +} +run_test 128 "Force using remote logs with --nolocallogs" + if ! combined_mgs_mds ; then stop mgs fi