Permalink
Commits on May 6, 2011
  1. autoreconf for new version

    garlick committed May 6, 2011
  2. prep for pre27 tag

    garlick committed May 6, 2011
Commits on May 5, 2011
  1. Don't call setgroups () for root

    garlick committed May 5, 2011
    And remember whose groups are loaded so if that user runs next
    in this worker, we don't have to load them then either.
    
    Also, instead of always calling setfsuid and setfsgid in each
    thread's first work item, initialize to geteuid and getegid and
    only call if they're different.
  2. Add a short-lived cache for password/group data

    garlick committed May 5, 2011
    Optimize the case where many clients all mount file systems on behalf
    of the same user by adding a 60s ttl cache for Npuser data.
    
    This minimizes the number of password/group file lookups in that case,
    and causes the cached Npuser data to be shared rather than duplicated.
    
    Although Npuser's are only in the cache for 60s, as before, users
    holding a reference on them won't see updated data after 60s.
    In other words, updates to supplemental group membership won't be
    picked up by existing mounts.
    
    As a side effect, a usercache mutex serializes all password/group
    file lookup functions.  However there should be many many fewer of them.
  3. Protect getgrouplist with a mutex

    garlick committed May 5, 2011
    Put a lock around getgrouplist as I don't think it's thread safe.
    
    Change the prototype of srv->remapuser so it handles the entire
    process of remapping a fid's user.
    
    Pass srv into user routines to facilitate more complete logging.
  4. Don't lookup user in attach if auth already did it

    garlick committed May 5, 2011
    Avoid back to back password file lookups between auth and attach.
    Add np_afid2user () which checks if the attaching user is the same as
    the auth user and then takes another reference on that Npuser and returns it.
    
    Clean up log messages in auth and attach handlers in libnpfs.
    
    Clean up log messages in diod_auth.c and make the code more resilient
    to unexpected argument values.
Commits on May 4, 2011
  1. Reconfig and fix init script

    garlick committed May 4, 2011
  2. Perform a late term abortion on diodctl.

    garlick committed May 4, 2011
    As diodctl is no longer needed for release 1.0, it is removed.
    
    The init script now starts 'diod' and the service is called diod not diodctl.
    
    The config file 'diodctllisten' and 'diodlisten' variables are replaced
    with 'listen'.
    
    misc/t12, the sometimes failing valgrind test on npfile, is now gone.
    
    Diod no longer has a -F option.
    
    Diodmount no longer has a 'jobid' option, and it no longer has to
    talk to diodctl of course.
    
    The libnpfs srv_wait_timeout() and srv_shutdown() calls go away.
    
    Upsides:
    - Diodctl had no test coverage
    - Npfile similarly had no coverage, and diodctl was the only user
    - Kludgey method of testing whether a diod server had started
    - Increased mount latency by requiring more protocol to be spoken
    - Overall simplification of diod deployment.
    
    Downsides:
    - Not possible to start private servers on demand (for jobs or for users).
      Perhaps this can be addressed in the future through creative thread pool
      management within the single diod instance.
    - Automounter integration is slightly less efficient in some error cases
      as described in a previous commit.
  3. Replace diodexp with diodcat

    garlick committed May 4, 2011
    The diodcat utility can cat any arbitrary file on a diod server
    from user space, subject to the same authentication/authorization
    rules as any diod client.
    
    auto.diod is modified to use this utility to cat the diod server's
    /proc/mounts to construct key matches, rather than cat the diodctl
    exports pseudo-file using diodexp.  The upside of this change is
    that a special purpose utility gets replaced with a general one,
    and the only reason LLNL needs diodctl in diod 1.0 goes away.
    The downside is that the server's /proc has to be made readable, and
    requests for unexported file systems will trigger a (failing) mount
    request instead of failing in the automouter key lookup.
  4. Add diodcat utility.

    garlick committed May 4, 2011
    Also we weren't setting 'iounit' return value in diod lopen response,
    so fix that.
Commits on May 3, 2011
  1. Fail attach if diod is running as another user

    garlick committed May 3, 2011
    Fix a regression in diod attach handling which allowed any user to
    attach to a server running (exclusively) as a different user.
    
    Added a test for this: tests/user/t12
    
    Also, raised the intensity of t10 and t11 somewhat (add more ops).
  2. Give libnpclient multithreading capability

    garlick committed May 3, 2011
    With the goal of creating portable unit torture tests, brought back
    Luchos's libnpclient/fsys.c which supports multiple outstanding
    requests on one connection.  Select between single and multithreaded
    fsys implementations with a new flag to npc_start(): NPC_MULTI_RPC.
    
    Add a couple of new tests based on this capability:
    users/t10 - simulate 256 simultaneous mounts with one user
    users/t11 - simulate 256 simultaneous mounts with four users
  3. Drop uname from npc_auth and npc_attach

    garlick committed May 3, 2011
    The auth callback required the uid to be valid, so drop
    the uname option and convert uname->uid in diodmount.
  4. Rework libnpclient for test flexibility.

    garlick committed May 3, 2011
    Abandon earlier misguided attempt to make libnpclient look more like
    the C library.  Bring back direct access to the 9P protocol elements
    for testing and re-add convenience functions implemented on top of
    the core 9P functions.
    
    Fix error handling so that it uses np_rerror () not errno for consistency
    with the rest of the npfs code.
    
    Update diodmount, diodexp various tests, and diod_auth to use the new API.
Commits on May 2, 2011
  1. Run memory tests even if valgrind is not found

    garlick committed May 2, 2011
    Instead of skipping tests if valgrind is not installed,
    run the test with MALLOC_CHECK_=3 to at least get internal
    glibc malloc debugging.
  2. Add missing gid initialization

    garlick committed May 2, 2011
Commits on Apr 29, 2011
  1. prep for 1.0-pre26 tag

    garlick committed Apr 29, 2011
  2. Reopen logs after daemonizing.

    garlick committed Apr 29, 2011
Commits on Apr 28, 2011
  1. Prep for 1.0-pre25 release

    garlick committed Apr 28, 2011
  2. Include stdarg.h in several places

    garlick committed Apr 28, 2011
    The new logging hook added to npfs.h broke compilation on
    RHEL 5 based systems where stdarg.h is apparently not included
    by one of the other includes we have everywhere.