[LU-8585] All Lustre test suites should pass with subdirectory mount Created: 06/Sep/16  Updated: 22/Jan/24

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.9.0
Fix Version/s: Upstream

Type: Improvement Priority: Minor
Reporter: James Nunez (Inactive) Assignee: James A Simmons
Resolution: Unresolved Votes: 0
Labels: tests
Environment:

autotest


Issue Links:
Duplicate
is duplicated by LU-10457 open_by_handle_at() in write mode tri... Resolved
Related
is related to LU-11501 use the dcache properly with .lustre/fid In Progress
is related to LU-15835 sanityn test_102: [20108.951589] WARN... Reopened
is related to LU-11686 sanity test 807 fails with mounted su... Open
is related to LU-12633 sanity test_185a: FAIL: can't get FID... Open
is related to LU-12661 sanity test_817: FAIL: failed to exec... Open
is related to LU-12203 sanity-lfsck test_36[b,c] defect: tes... Resolved
is related to LU-16463 llapi_open_by_fid open should not be ... Resolved
is related to LU-16494 Check fileset for operations by fid Resolved
is related to LU-10948 client cache open lock after N opens Open
is related to LU-12806 llapi: have llapi_fd2fid rely on name... Resolved
Rank (Obsolete): 9223372036854775807

 Description   

All Lustre test suites that run as part of the review-* test groups should complete and pass when run under a mounted subdirectory. To run all Lustre tests with a subdirectory mounted, you can use “Test-Parameters: envdefinitions=FILESET=/subdir”.

From the following test results, we can see that not all Lustre test suites can be run successfully with Lustre mounted from a subdirectory:
https://testing.hpdd.intel.com/test_sessions/0e2c6222-5f8b-11e6-b5b1-5254006e85c2
https://testing.hpdd.intel.com/test_sessions/f30cb438-5f9e-11e6-906c-5254006e85c2
https://testing.hpdd.intel.com/test_sessions/2f30c6d8-5faf-11e6-b5b1-5254006e85c2
https://testing.hpdd.intel.com/test_sessions/9f47f55a-5ff4-11e6-b5b1-5254006e85c2

Andreas Dilger reviewed the results and stated “ … the sanity-lfsck and sanity-scrub tests should be skipped if .lustre does not exist on the mountpoint.” Thus, we need to review the failures of the above test session and submit a patch to skip certain tests/test suites when a subdirectory is used as the mount point.



 Comments   
Comment by James Nunez (Inactive) [ 07/Sep/16 ]

I've reviewed a few of the test suite failures and here is a partial list of tests that fail when mounting a subdirectory:
sanity test_405 fails - test 16 of swap_lock_test.c calls llapi_path2fid on $DIR.

sanity-lfsck tests 18b, 18c, 18e, 20, 24, 27a, 27b, 30 - all need to be skipped due to looking for .lustre

sanityn tests 1a, 1b, 1c, 1d, 2a, 2b, 2c, 2e, 2g, 3, 4, 5, 6, 7, 8, 9, 10a, 10b, 13, 16, 17, 21, 24a, 25a, 26a, 26b, 31a, 32a, 32b, 36, 37, 41b, 41c, 41d, 41e, 41f, 41g, 41h, 42a, 42b, 42c, 42d, 42e, 42f, 42g, 42h, 43a, 43b, 43c, 43d, 43e, 43f, 43g, 43h, 44a, 44b, 44c, 44d, 44e, 44f, 44g, 44h, 45a, 45b, 45c, 45d, 45e, 45f, 45g, 45h, 46a, 46b, 46c, 46d, 46e, 46f, 46g, 46h, 50, 51a, 51b, 51c, 51d, 54, 55a, 55b, 55c, 55d, 60, 70a, 71, 72, 73, 74, 76, 77a, 77b, 77c, 77d, 77e, 77f, 82

Comment by Andreas Dilger [ 07/Sep/16 ]

The sanityn failures are likely all caused by $MOUNT2 not properly mounting the $FILESET subdirectory during setup.

Comment by Andreas Dilger [ 07/Sep/16 ]

The sanity test_406 failure is because swap_lock_test.c::test16() is:

/* Lease on file opened by FID */
static void test16(void)
{
        :
        :
        filename = create_file_name("foo1");
        fd = create_file("foo1", 1000, 'x');
        rc = llapi_path2fid(filename, &fid);
        close(fd);

        fd = llapi_open_by_fid(fsmountdir, &fid,
                               O_RDWR | O_NOATIME | O_NONBLOCK | O_NOFOLLOW);
        ASSERTF(fd >= 0, "open failed for '%s': %s", filename, strerror(errno));

It isn't llapi_path2fid() that is failing (which only operates directly on the file itself), but rather llapi_open_by_fid() which is failing because the .lustre directory is missing. This subtest could be excluded if the .lustre directory is missing. In fixing this failure, the above ASSERTF() message should be changed to print "open-by-FID failed for "DFID" ('%s'): %s" so that the cause of the failure is more clear.

Comment by James Nunez (Inactive) [ 07/Sep/16 ]

Update: sanityn tests pass if the file system is not mounted before the tests are run. I'll investigate this more, but for now, I think the sanityn test list above should be ignored until I can determine that there is a real issue here.

Comment by James Nunez (Inactive) [ 14/Sep/16 ]

Recent testing shows there are still some test or test suite failures when running the review-* test groups with the FILESET parameter set:
https://testing.hpdd.intel.com/test_sessions/6ed229f2-798c-11e6-8afd-5254006e85c2
sanityn test suite fails with

06:40:49:CMD: trevis-16vm1.trevis.hpdd.intel.com,trevis-16vm2 mount -t lustre -o user_xattr,flock trevis-16vm4@tcp:/lustre /mnt/lustre2
06:40:49:trevis-16vm1: warning: /mnt/lustre2: cannot resolve: No such file or directory
06:40:49:trevis-16vm2: warning: /mnt/lustre2: cannot resolve: No such file or directory
06:40:49:sanityn returned 0

Similarly, sanity-hsm test suite fails with

08:28:34:CMD: trevis-16vm1.trevis.hpdd.intel.com,trevis-16vm2 mount -t lustre -o user_xattr,flock trevis-16vm4@tcp:/lustre /mnt/lustre2
08:28:34:trevis-16vm1: warning: /mnt/lustre2: cannot resolve: No such file or directory
08:28:34:trevis-16vm2: warning: /mnt/lustre2: cannot resolve: No such file or directory
08:28:34:sanity-hsm returned 0

https://testing.hpdd.intel.com/test_sessions/a9dbe098-79d6-11e6-b058-5254006e85c2
conf-sanity failures: tests 20, 70e (I’m ignoring the 21*, 22, and 23a failures; tests fail because of the test 20 failure. These tests need to be more resilient)
lustre-rsync-test failures: tests 1, 2b

Comment by Andreas Dilger [ 14/Sep/16 ]

James, can you investigate what needs to be done for the sanityn setup to make that work with FILESET? I suspect it is just a matter of setting $MOUNT2 or similar to include $FILESET.

Comment by Gerrit Updater [ 15/Nov/18 ]

James Nunez (jnunez@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33666
Subject: LU-8585 tests: skip sanity test for subdir mount
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7158acc9cb25bc31942a7737a094740fabc96308

Comment by Gerrit Updater [ 25/May/19 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/34954
Subject: LU-8585 utils: don't use .lustre/fid in tools
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: db936e18cc41288fe8a73f308f9f80cb9f3dda4d

Comment by Gerrit Updater [ 29/Oct/19 ]

Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: https://review.whamcloud.com/36603
Subject: LU-8585 llapi: use open_by_handle_at in llapi_open_by_fid
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: fa1cde303d6bada6dd410081cd14ae429fc25e15

Comment by Gerrit Updater [ 30/Oct/19 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36612
Subject: LU-8585 tests: re-enable fid2path sanity test for subdir mount
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7ebbdad78db5abf32538fa6751c977d501b03e49

Comment by Gerrit Updater [ 01/Nov/19 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36641
Subject: LU-8585 llite: ignore special lustre volatile files for NFS export
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 64214e09720d567e25d9bf2a4a6958a33a1c3ef8

Comment by Gerrit Updater [ 04/Nov/19 ]

Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: https://review.whamcloud.com/36657
Subject: LU-8585 llite: ignore special lustre volatile files for NFS export
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b938a4199b4d259f26198d76902f851e88d190f1

Comment by Quentin Bouget [ 12/Dec/19 ]

I just noticed liblustreapi_hsm.c has its own implementation of llapi_open_by_fid(): ct_open_by_fid(). I think it will have to be patched as well before this LU can be closed.

Comment by Gerrit Updater [ 16/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36641/
Subject: LU-8585 llite: don't cache MDS_OPEN_LOCK for volatile files
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6a3a842add0e941d901869db195ec0068e69cde3

Comment by John Hammond [ 06/Apr/22 ]

No more changes should be pushed with LU-8585 as the issue. This should be an epic or something and each change pushed for it should have its own issue.

Comment by Gerrit Updater [ 29/Nov/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/36603/
Subject: LU-8585 llapi: use open_by_handle_at in llapi_open_by_fid
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: bdf7788d19985bb7abf2385add15f1d67f3d01e4

Comment by Gerrit Updater [ 22/Dec/22 ]

"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49496
Subject: LU-8585 llapi: use open_by_handle_at in llapi_open_by_fid
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 8975df0a4f2a21a9818d670ad504356ae059b363

Comment by Gerrit Updater [ 26/Dec/22 ]

"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49515
Subject: LU-8585 llite: don't cache MDS_OPEN_LOCK for volatile files
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 21976e3ab970079c35450919c2b75aa449200640

Comment by Gerrit Updater [ 19/Jun/23 ]

"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51366
Subject: LU-8585 llapi: use open_by_handle_at in llapi_open_by_fid
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: a0db1b5817f376eaaea5165b89f232b14aa3b75f

Comment by Gerrit Updater [ 18/Jul/23 ]

"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51707
Subject: LU-8585 llite: add special fid handling for fhandle API
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c78ccbb0b1ba957718392bfbb5a83dbbbf739bce

Comment by Gerrit Updater [ 18/Jul/23 ]

"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51708
Subject: LU-8585 llite: return parent fid as well for ll_encode_fh()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3c5156b7ecdb997e432594db339158a89f8c189a

Comment by Gerrit Updater [ 13/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51707/
Subject: LU-8585 llite: add special fid handling for fhandle API
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 52a97b44904951f24efb602883cfc280d825aba0

Generated at Sat Feb 10 02:18:50 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.