Chris Samuel wrote:
----- "Bas van der Vlies" <[EMAIL PROTECTED]> wrote:

Happy new year everyone,

Condiments of the season to all! :-)

  I had some time to examine the source of maui and found two ways to
implement this functionality in maui. So we are not depended anymore
on the user primary group for Fairshare or specifying some
commandline parameters for qsub.

That's great.

Thanks

Here are the two solutions:
  1) Introduce a new parameter: FSGROUPS, eg:
     FSGROUPS one two three

    When a job is submitted:
     a) check if the user is a member of one of this groups
     b) if yes then set the credentials to the matching group.

That's quite nice, though with the possibility of its list and the
FS config getting out of step (when you add to one and forget the other).

This was ny problem also, but it is for now the easiest one to implement.

2) When a job is submitted:
  a) get all the groups where the user is a member of with the
"getgrouplist" function. I do not know if this function is available
on all platforms.

I doubt it, the man page on Ubuntu says:

CONFORMING TO
       This function is non-standard; it appears on most BSDs.

BUGS
       The glibc 2.3.2 implementation of this function  is  broken:  it  
over$B!>(B
       writes memory when the actual number of groups is larger than *ngroups.

I know that for Torque when I was having problems with initgroups() not
using LDAP under AIX5.x Dave Singleton contributed his version (which is
more friendly to LDAP servers on Linux too) as a replacement; so perhaps
the solution for this issue in Maui is to take the same approach and write
a portable version (with a different name to avoid clashes).

I have also read that message on the manpage. I have made a little utility and it did not segv on ubuntu/debian. The source is in the manpage, it will crash with glibc 2.3.2 is the note ;-)

I have found the source for getgrouplist and it scans all the groups and checks if the user is a member. This can be very slow if we have many unix groups. I encounterd this when i used acl_slopp_grp setting in torque. I wrote a patch for it.

  b) Then check if for one of the user groups a fairshare target is set
  c) if yes then set the credentials to this group.

I think this is a better way to go that the first option, if we can get
a portable way of listing all the groups of a user.

I will start with the first option so we have something and then look at a "portable" getgrouplist function.

cheers!
Chris
--
Christopher Samuel - (03) 9925 4751 - Systems Manager
 The Victorian Partnership for Advanced Computing
 P.O. Box 201, Carlton South, VIC 3053, Australia
VPAC is a not-for-profit Registered Research Agency
_______________________________________________
mauiusers mailing list
mauiusers@supercluster.org
http://www.supercluster.org/mailman/listinfo/mauiusers


--
--
********************************************************************
*                                                                  *
*  Bas van der Vlies                     e-mail: [EMAIL PROTECTED]      *
*  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
*  Kruislaan 415                         fax:    +31 20 6683167    *
*  1098 SJ Amsterdam                                               *
*                                                                  *
********************************************************************
_______________________________________________
mauiusers mailing list
mauiusers@supercluster.org
http://www.supercluster.org/mailman/listinfo/mauiusers

Reply via email to