Mantis - cas_usergroup
Viewing Issue Advanced Details
4761 packaging block always 2011-04-22 22:49 2011-05-15 15:39
alop  
markp  
normal  
closed  
suspended  
none    
none  
0004761: CSWpuppet fails to install if a group 100 is already used
=> Installing CSWpuppet-2.6.6,REV=2011.03.13 (1/1) ...
Please see /opt/csw/share/doc/puppet/license for license information.
Installing class <cswusergroup> ...
UX: groupadd: ERROR: 100 is already in use. Choose another.
ERROR: Failed to add group puppet
pkgadd: ERROR: class action script did not complete successfully

Installation of <CSWpuppet> failed.
Exiting pkgutil due to pkgadd error: 1
bash-3.00# group
bash-3.00# grep 100 /etc/group
bash-3.00# groupadd -g 100 moo
UX: groupadd: ERROR: 100 is already in use. Choose another.

/etc/nsswitch.conf has
group: files ldap [TRYAGAIN=continue]

getent group 100 -returns the already existing group
Solaris 10, ldap
Issue History
2011-04-22 22:49 alop New Issue
2011-04-23 01:27 bwalton Project puppet => cas_usergroup
2011-04-23 01:28 bwalton Note Added: 0008990
2011-04-23 01:42 bwalton Note Added: 0008991
2011-04-24 23:23 markp Status new => assigned
2011-04-24 23:23 markp Assigned To => markp
2011-04-24 23:23 markp Note Added: 0009000
2011-04-24 23:23 markp Status assigned => acknowledged
2011-05-08 21:34 markp Note Added: 0009033
2011-05-08 21:34 markp Status acknowledged => feedback
2011-05-08 21:35 markp Note Added: 0009034
2011-05-15 15:39 bwalton Note Added: 0009053
2011-05-15 15:39 bwalton Status feedback => closed
2011-05-15 15:39 bwalton Resolution open => suspended

Notes
(0008990)
bwalton   
2011-04-23 01:28   
I moved this bug to be filed against cas_usergroup as this is the underlying root of the problem. The puppet package just happens to deliver a file with cswusergroup as the class.

I think I know how to fix this fairly quickly. I'll take a look tonight.

-Ben
(0008991)
bwalton   
2011-04-23 01:42   
Can you please simulate this function (run via /bin/sh -x) on your box with GID_MIN set to either 100 or your local system value (provide that info if not 100). GID_MAX should be 999 (or your local value).

Thanks
-Ben

first_avail_gid() {
  for gid in `/usr/bin/getent group | cut -d: -f3 | sort -n`
  do
    [ $gid -lt $GID_MIN ] && continue
    [ $gid -gt $GID_MAX ] && break
    eval GID_TAKEN_$gid=1
  done

  gid=$GID_MIN
  while test $gid -le $GID_MAX
  do
    [ `eval echo \$\{GID_TAKEN_$gid:-0}` -eq 1 ] || { echo $gid; return; }
    gid=`expr $gid + 1`
  done
  echo -1
}
(0009000)
markp   
2011-04-24 23:23   
I'll check this out sometime next week. Hopefully get a fix into the next version. Thanks for reporting!
(0009033)
markp   
2011-05-08 21:34   
Hi - I can't recreate this problem. I've just added a dummy group 100 to the system and added CSWpuppet and it just created the puppet group as 102.

Can you give me some details about your system please? OS version, if puppet was already installed, and anything else you think might be pertinent.

Thanks
(0009034)
markp   
2011-05-08 21:35   
Ah, duh, sorry Ben, hadn't noticed your updates. You'll probably nailed it.
(0009053)
bwalton   
2011-05-15 15:39   
Closing due to lack of response. Will re-examine when input is provided.
-Ben