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

capablity check should be aware of root squash

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.15.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      If root squashed enabled, CAP check should use squash_uid/gid,  quota is one of case hitting problem, as root could exceeding root limits.

      Attachments

        Issue Links

          Activity

            [LU-14739] capablity check should be aware of root squash
            pjones Peter Jones added a comment -

            Landed for 2.15

            pjones Peter Jones added a comment - Landed for 2.15

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/44347/
            Subject: LU-14739 quota: fix quota with root squash enabled
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: bbfdc7c1670c92747a8f98d39e1e43dc39e59e30

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/44347/ Subject: LU-14739 quota: fix quota with root squash enabled Project: fs/lustre-release Branch: master Current Patch Set: Commit: bbfdc7c1670c92747a8f98d39e1e43dc39e59e30

            btw, LU-14901 is direct reason why sanity-quota 10 could fail, and patch "LU-14739: quota: nodemap squashed root cannot bypass quota" help expose this bug, i opened new ticket to fix this issue since this is not a regression from this ticket, and there are few regressions problem addressed by https://review.whamcloud.com/#/c/44347/

            wshilong Wang Shilong (Inactive) added a comment - btw, LU-14901 is direct reason why sanity-quota 10 could fail, and patch " LU-14739 : quota: nodemap squashed root cannot bypass quota" help expose this bug, i opened new ticket to fix this issue since this is not a regression from this ticket, and there are few regressions problem addressed by https://review.whamcloud.com/#/c/44347/

            I was able to reproduce problem with OSTSIZE=400000 and i confirmed latest patch help fix issue locally.

            wshilong Wang Shilong (Inactive) added a comment - I was able to reproduce problem with OSTSIZE=400000 and i confirmed latest patch help fix issue locally.

            Alex Zhuravlev would you give this patch a try? reverting that part will break original problem we want to fix.

            no, test 10 still fail

            bzzz Alex Zhuravlev added a comment - Alex Zhuravlev would you give this patch a try? reverting that part will break original problem we want to fix. no, test 10 still fail

            the strange thing is that OSTSIZE=800000 (it's 400000 by default here) fixes the issue as well.

            bzzz Alex Zhuravlev added a comment - the strange thing is that OSTSIZE=800000 (it's 400000 by default here) fixes the issue as well.

            bzzz would you give this patch a try? reverting that part will break original problem we want to fix.

            wshilong Wang Shilong (Inactive) added a comment - bzzz would you give this patch a try? reverting that part will break original problem we want to fix.

            Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/44347
            Subject: LU-14739 quota: don't return quota flags for root
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 7d78fbba52b95fff9efc4cfe7913a213bfb8f691

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/44347 Subject: LU-14739 quota: don't return quota flags for root Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 7d78fbba52b95fff9efc4cfe7913a213bfb8f691

            reverting this part fixes sanity-quota/10 on my setup:

            @@ -2309,7 +2309,7 @@ int osc_queue_async_io(const struct lu_env *env, struct cl_io *io,
                    }
             
                    /* check if the file's owner/group is over quota */
            -       if (!io->ci_noquota) {
            +       if (!(cmd & OBD_BRW_NOQUOTA)) {
            
            bzzz Alex Zhuravlev added a comment - reverting this part fixes sanity-quota/10 on my setup: @@ -2309,7 +2309,7 @@ int osc_queue_async_io( const struct lu_env *env, struct cl_io *io, } /* check if the file's owner/group is over quota */ - if (!io->ci_noquota) { + if (!(cmd & OBD_BRW_NOQUOTA)) {

            Alex, did you have any more information about the failure you hit with this patch?

            adilger Andreas Dilger added a comment - Alex, did you have any more information about the failure you hit with this patch?

            People

              wshilong Wang Shilong (Inactive)
              wshilong Wang Shilong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: