Details
-
Bug
-
Resolution: Fixed
-
Major
-
Lustre 2.5.1, Lustre 2.4.3
-
13263
Description
A user has noticed that 'lfs find' stops as soon as it encounters an error, such as EACCES. The regular find command just notes the failure but continues on, returning a non-zero exit code at the end.
# mkdir -p $LUSTREDIR/{dirb,dirc} # touch $LUSTREDIR/{dirb,dirc}/file1 # sudo chown root:root $LUSTREDIR/dirb # sudo chmod 700 $LUSTREDIR/dirb # find $LUSTREDIR -name file1 find: `/lustre/f1/Matthew.Ezell/testdir/dirb': Permission denied /lustre/f1/Matthew.Ezell/testdir/dirc/file1 # echo $? 1 # lfs find $LUSTREDIR -name file1 llapi_semantic_traverse: Failed to open '/lustre/f1/Matthew.Ezell/testdir/dirb': Permission denied (13) error: find failed for file1. # echo $? 22
I created a patch that changes the behavior to the following:
# /tmp/usr/bin/lfs find $LUSTREDIR -name file1 llapi_semantic_traverse: Failed to open '/lustre/f1/Matthew.Ezell/testdir/dirb': Permission denied (13) /lustre/f1/Matthew.Ezell/testdir/dirc/file1 error: find failed for file1. # echo $? 1
If you would like, I could change my patch to return EINVAL as it previously did.
Attachments
Issue Links
- is related to
-
LU-5170 lfs usability
- Open