[Mauiusers] Maui/Torque and Fairshare with secondary Unix groups

Chris Samuel csamuel at vpac.org
Thu Jan 3 16:00:41 MST 2008

----- "Bas van der Vlies" <basv at sara.nl> 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.

> 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).

> 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:

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

       The glibc 2.3.2 implementation of this function  is  broken:  it  over‐
       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).

>   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.

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

More information about the mauiusers mailing list