Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-12244

lfs check subcommand no longer works as non-root user

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • Lustre 2.10.6
    • Client/Server: lustre-2.10.6_2.chaos-1.ch6.x86_64
      kernel: 3.10.0-957.5.1.3chaos.ch6.x86_64
    • 3
    • 9223372036854775807

    Description

      With the Lustre 2.10 client, non-root users appear to no longer be able to run "lfs check <servers|osts|mds>". Strace of the command shows a "Permission denied" error accessing /sys/kernel/debug/lustre/devices, resulting in the following error at runtime: error: check: mds status failed

      Our Operations staff w/o root access needs "lfs check ..." functionality to monitor and fix file system issues, so fixing this issue would helpful for us.

      statfs("/sys/kernel/debug/", {f_type=DEBUGFS_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
      stat("/sys/fs/lnet/devices", 0x7fffffff8760) = -1 ENOENT (No such file or directory)
      stat("/sys/fs/lustre/devices", 0x7fffffff8760) = -1 ENOENT (No such file or directory)
      stat("/sys/kernel/debug/lnet/devices", 0x7fffffff8740) = -1 EACCES (Permission denied)
      stat("/sys/kernel/debug/lustre/devices", 0x7fffffff8740) = -1 EACCES (Permission denied)
      stat("/proc/fs/lnet/devices", 0x7fffffff8760) = -1 ENOENT (No such file or directory)
      stat("/proc/fs/lustre/devices", 0x7fffffff8760) = -1 ENOENT (No such file or directory)
      stat("/proc/sys/lnet/devices", 0x7fffffff8760) = -1 ENOENT (No such file or directory)
      stat("/proc/sys/lustre/devices", 0x7fffffff8760) = -1 ENOENT (No such file or directory)
      write(2, "error: check: mds status failed\n", 32error: check: mds status failed
      ) = 32
      exit_group(2)                           = ?
      +++ exited with 2 +++
      

      Attachments

        Issue Links

          Activity

            [LU-12244] lfs check subcommand no longer works as non-root user
            pjones Peter Jones added a comment -

            Ok - now this is fixed on b2_12

            pjones Peter Jones added a comment - Ok - now this is fixed on b2_12
            pjones Peter Jones added a comment -

            I think that once the current b2_12-next branch lands that this really will be complete.

            pjones Peter Jones added a comment - I think that once the current b2_12-next branch lands that this really will be complete.
            pjones Peter Jones added a comment -

            You are correct - sorry.

            pjones Peter Jones added a comment - You are correct - sorry.
            ofaaland Olaf Faaland added a comment -

            Peter,
            I do not see that this patch landed to 2.12.2 even though it was backported to 2.10.

            [faaland1@hefe branch:2.10.6-llnl lustre-210] $git lg wcrev/b2_12 | grep LU-8066 | grep iterate
            [faaland1@hefe branch:2.10.6-llnl lustre-210] $git lg wcrev/b2_10 | grep LU-8066 | grep iterate
            * e55cd4f LU-8066 utils: have llapi_target_iterate use sysfs tree
            

            https://review.whamcloud.com/#/c/34781/

            Has a +2 but has not landed due to undiagnosed test failures, last activity May 8.

            ofaaland Olaf Faaland added a comment - Peter, I do not see that this patch landed to 2.12.2 even though it was backported to 2.10. [faaland1@hefe branch:2.10.6-llnl lustre-210] $git lg wcrev/b2_12 | grep LU-8066 | grep iterate [faaland1@hefe branch:2.10.6-llnl lustre-210] $git lg wcrev/b2_10 | grep LU-8066 | grep iterate * e55cd4f LU-8066 utils: have llapi_target_iterate use sysfs tree https://review.whamcloud.com/#/c/34781/ Has a +2 but has not landed due to undiagnosed test failures, last activity May 8.
            pjones Peter Jones added a comment -

            I believe that this issue is fixed in both 2.10.8 and 2.12.2 so the ticket can now be considered RESOLVED

            pjones Peter Jones added a comment - I believe that this issue is fixed in both 2.10.8 and 2.12.2 so the ticket can now be considered RESOLVED
            ofaaland Olaf Faaland added a comment - - edited

            For our own recordkeeping, our local ticket: TOSS-4503

            ofaaland Olaf Faaland added a comment - - edited For our own recordkeeping, our local ticket: TOSS-4503
            ofaaland Olaf Faaland added a comment -

            Yep, that patch worked without any other patches or modification.

            ofaaland Olaf Faaland added a comment - Yep, that patch worked without any other patches or modification.
            ofaaland Olaf Faaland added a comment -

            Andreas, we haven't tried it, but we can do so today and post back.

            ofaaland Olaf Faaland added a comment - Andreas, we haven't tried it, but we can do so today and post back.

            People

              pjones Peter Jones
              charr Cameron Harr
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: