OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004761 [cas_usergroup] packaging block always 2011-04-22 22:49 2011-05-15 15:39
Reporter alop View Status public  
Assigned To markp
Priority normal Resolution suspended  
Status closed  
Summary 0004761: CSWpuppet fails to install if a group 100 is already used
Description => 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
Additional Information Solaris 10, ldap
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0008990)
bwalton (administrator)
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 (administrator)
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 (developer)
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 (developer)
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 (developer)
2011-05-08 21:35

Ah, duh, sorry Ben, hadn't noticed your updates. You'll probably nailed it.
(0009053)
bwalton (administrator)
2011-05-15 15:39

Closing due to lack of response. Will re-examine when input is provided.
-Ben


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker