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

Refactor ucred handler code in mdt

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      user credentials in MDT code, managed in struct ucred, has 2 flavors: new and old. On top of that, the way the appropriate data is given to those functions differs depending on reint or not reint code. This makes the whole user credential management very hard to follow. There are lots of possibility to clean that, refactoring the code under a unique place. Let's try to do that.

      • old flavor (old_init_ucred, old_init_ucred_reint, old_init_ucred_common)

      Most of Lustre RPCs use this in the absence of GSS mode being setup

      • new flavor (new_init_ucred)

      Mainly use when GSS is on. This leverage a new struct ptlrpc_user_desc sent by client only when GSS is on.

      This flavor also introduce a 'perm' feature which is not really documented. A /etc/lustre/perm.conf config file exists for that.

      Fun facts, Kit had the same questioning already 7 years ago:

       

      commit 37db778f48f952747575e323cb341ed663852fff
      Author: Kit Westneat <kit.westneat@gmail.com>
      Date:   Fri Apr 14 11:06:02 2017 -0400
          LU-9145 nodemap: new_init_ucred doesn't do nodemapping
          
          The new_init_ucred path was missed in the original nodemap
          implementation. This patch adds the mapping calls to new_init_ucred.
          
          WIP: There are some issues/questions:
           - some of the new_init_ucred code should be merged with
                  old_init_ucred_common.
           - Why does new_init check for setuid/setgid/setgrp, but not old_init?
           - What is ptlrpc_user_desc and should it interact with nodemap?
      

       

      Attachments

        Activity

          People

            adegremont_nvda Aurelien Degremont
            adegremont_nvda Aurelien Degremont
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: