some ganglia packages won't install because of useradd

Bug #854866 reported by Mark Mims
100
This bug affects 16 people
Affects Status Importance Assigned to Milestone
ganglia (Debian)
Fix Released
Unknown
ganglia (Ubuntu)
Fix Released
High
Unassigned
Oneiric
Won't Fix
High
Unassigned

Bug Description

gmetad 3.1.7-2 won't install on oneiric.

{{{
    ...
    Get:7 http://us.archive.ubuntu.com/ubuntu/ oneiric/universe gmetad amd64 3.1.7-2 [29.5 kB]
    ...
    Selecting previously deselected package gmetad.
    Unpacking gmetad (from .../gmetad_3.1.7-2_amd64.deb) ...
    ...
    Setting up gmetad (3.1.7-2) ...
    Adding group: ganglia.
    Adding system user: ganglia.
    useradd: group ganglia exists - if you want to add this user to that group, use -g.
    dpkg: error processing gmetad (--configure):
     subprocess installed post-installation script returned error exit status 9
    ...
    Errors were encountered while processing:
     gmetad
}}}

useradd tries to create a group 'ganglia' that's already been created.

------------8<------------------
I think everything's covered for an SRU... please let me know if we need more.

[Impact]
ganglia packages won't install on oneiric

[Development Fix]
attached branch already merged into precise, changes:

    debian/gmetad.postinst
    debian/ganglia-monitor.postinst
    debian/changelog

[Stable Fix]
An identical branch is attached for oneiric, but I've been told the version numbering might have to be changed because it'd be an SRU. Not sure what to do here.

This branch has been built into a ppa with successful, but not necessarily exhaustive, tests (comments above).

[Test Case]
Reproduce with

    apt-get install gmetad

or

    apt-get install ganglia-monitor

or anything that depends on these (like ganglia-webfrontend).

[Regression Potential]
The packages in the archive won't currently install... not sure what's relevant to regression.

Related branches

Changed in ganglia (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Daniel Richard G. (skunk) wrote :

Hi Mark,

I tried your fix. I think you may need to add "-g ganglia" to your new useradd(8) invocation, as otherwise I still get a "useradd: group ganglia exists - if you want to add this user to that group, use -g" error.

Revision history for this message
Mark Mims (mark-mims) wrote : Re: [Bug 854866] Re: some ganglia packages won't install because of useradd

On Wed, 2011-10-05 at 02:01 +0000, Daniel Richard G. wrote:
> Hi Mark,
>
> I tried your fix. I think you may need to add "-g ganglia" to your new
> useradd(8) invocation, as otherwise I still get a "useradd: group
> ganglia exists - if you want to add this user to that group, use -g"
> error.
Hmmm, ok, I'll add it in.

Wow, I pushed the previous fix up to a ppa and have been using it a
quite a bit on oneiric ec2 instances without any problems. I'll dig to
see what the deal is... evidently some incorrect assumptions about the
default behavior of useradd in different circumstances.

Thanks!
Mark

--
Mark Mims, Ph.D.
Canonical Ltd.
<email address hidden>
+1(512)981-6467

Revision history for this message
Daniel Richard G. (skunk) wrote :

I believe the "ganglia" group already existed from a previous install attempt when I tried your fix, so that may be what had useradd(8) in a twist.

Revision history for this message
Shane Hart (shart6) wrote :

I did a fresh install of ganglia-webfrontend (which pulls in gmetad) and got the error message that the 'ganglia' group already exists, so I don't think it's an upgrade issue. Also, after the failed install, the 'ganglia' group was made.

I tried manually removing the group and installing the package again, but it just recreates the group and fails again.

Revision history for this message
Thomas (thomas-metschke) wrote :

I can confirm this error on several freshly installed instances (EC2) - sorry didn't saw this thread before - filed the bug here https://bugs.launchpad.net/ubuntu/+source/ganglia/+bug/882077

this is very critical as we install Ganglia using automated boot scripts and can't run 11.10 because of this bug

Regards,
Thomas

Revision history for this message
Alex Lambert (alambert) wrote :

I can repro this on a freshly-installed EC2 instance running the Canonical 11.10 AMI. This is also blocking our 11.10 upgrade.

Revision history for this message
David Kranz (david-kranz) wrote :

I would guess that this is caused by the change in ganglia-monitor.postinst from (in natty)

adduser --system --ingroup ganglia --home /var/lib/ganglia ganglia

to

 useradd --system ganglia

I was able to build and install the package by changing it to:

useradd --system ganglia -g ganglia

Revision history for this message
Mark Mims (mark-mims) wrote :

Ok, I think this is fixed. The attached branch tested out with various combinations of the {gmetad, ganglia-monitor, ganglia-webfrontend} packages.

Binaries are available to test from ppa:mark-mims/ppa via
{{{
    apt-add-repository ppa:mark-mims/ppa
    apt-get update
    apt-get install ganglia-webfrontend=3.1.7-2ubuntu4
    apt-get install gmetad=3.1.7-2ubuntu4
    apt-get install ganglia-monitor=3.1.7-2ubuntu4
}}}
Not sure of a better way to test this.

Revision history for this message
Alex Lambert (alambert) wrote :

I tried your 3.1.7-2ubuntu4 packages on a fresh Oneiric install on EC2 (AMI ami-bbf539d2, t1.micro, us-east-1) and they all installed successfully for me. Thank you for your help, Mark!

Revision history for this message
Joseph Heck (heckj) wrote :

Mark et al -

I've run into the same bug, and Mark's PPA has a version which is correctly installing. Thought the additional verification might be useful

Revision history for this message
Peter Wienemann (wienemann) wrote :

Mark's fix also works for me. I wonder why it is not yet included in the official repository, in particular since its importance is ranked as high.

Revision history for this message
Mark Mims (mark-mims) wrote :

I didn't have the branch named correctly for lp to pick it up for a merge proposal.
It needs to look like lp:~<user>/ubuntu/<release>/<project>/<branch> and not be in "+junk" repos.

The Merge Proposal has been submitted... this should queue it up for sponsorship afaik.

Revision history for this message
David Kranz (david-kranz) wrote :

While this package is active, Ganglia 3.2 was released in July. Any idea when the Ubuntu package might be updated to the latest version?

Mark Mims (mark-mims)
Changed in ganglia (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Mark Mims (mark-mims) wrote :

David, I think we're stuck at 3.1.7-xx for oneiric, but I added a work-item (bug #903390) to try to get it to 3.2 for precise.

Scott Moser (smoser)
Changed in ganglia (Ubuntu):
status: Fix Committed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ganglia - 3.1.7-2ubuntu1

---------------
ganglia (3.1.7-2ubuntu1) precise; urgency=low

  * Fix options on useradd in postinst. (LP: #854866)
 -- Mark Mims <email address hidden> Wed, 21 Dec 2011 13:37:41 -0500

Changed in ganglia (Ubuntu):
status: Triaged → Fix Released
Scott Moser (smoser)
Changed in ganglia (Ubuntu Oneiric):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Scott Moser (smoser) wrote :

To anyone interested in seeing this fix in 11.10 stable, you can start that process by providing SRU justification as described at https://wiki.ubuntu.com/StableReleaseUpdates .

Changed in ganglia (Debian):
status: Unknown → New
Revision history for this message
Mark Mims (mark-mims) wrote :

I think everything's covered for an SRU... please let me know if we need more.

[Impact]
ganglia packages won't install on oneiric

[Development Fix]
attached branch already merged into precise, changes:

    debian/gmetad.postinst
    debian/ganglia-monitor.postinst
    debian/changelog

[Stable Fix]
An identical branch is attached for oneiric, but I've been told the version numbering might have to be changed because it'd be an SRU. Not sure what to do here.

This branch has been built into a ppa with successful, but not necessarily exhaustive, tests (comments above).

[Test Case]
Reproduce with

    apt-get install gmetad

or

    apt-get install ganglia-monitor

or anything that depends on these (like ganglia-webfrontend).

[Regression Potential]
The packages in the archive won't currently install... not sure what's relevant to regression.

description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Mark, or anyone else affected,

Accepted ganglia into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in ganglia (Ubuntu Oneiric):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in ganglia (Debian):
status: New → Fix Committed
Changed in ganglia (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

Unfortunately the ganglia package from "proposed" is not working for me (Oneiric).
Here is the results:

Selecting previously deselected package libdbi1.
(Reading database ... 201836 files and directories currently installed.)
Unpacking libdbi1 (from .../libdbi1_0.8.4-5.1_i386.deb) ...
Selecting previously deselected package librrd4.
Unpacking librrd4 (from .../librrd4_1.4.3-3.1ubuntu2_i386.deb) ...
Selecting previously deselected package gmetad.
Unpacking gmetad (from .../gmetad_3.1.7-2ubuntu0.1_i386.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up ganglia-monitor (3.1.7-2ubuntu0.1) ...
Adding system user: ganglia.
useradd: group ganglia exists - if you want to add this user to that group, use -g.
dpkg: error processing ganglia-monitor (--configure):
 subprocess installed post-installation script returned error exit status 9
Setting up libdbi1 (0.8.4-5.1) ...
Setting up librrd4 (1.4.3-3.1ubuntu2) ...
Setting up gmetad (3.1.7-2ubuntu0.1) ...
Adding system user: ganglia.
useradd: group ganglia exists - if you want to add this user to that group, use -g.
dpkg: error processing gmetad (--configure):
 subprocess installed post-installation script returned error exit status 9
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 ganglia-monitor
 gmetad
E: Sub-process /usr/bin/dpkg returned an error code (1)

tags: added: verification-failed
removed: verification-needed
Revision history for this message
Juraj Tóth (iuryno) wrote :

Just do "sudo useradd ganglia -g ganglia" I think and install again via apt-get. Btw. why not just skip to ganglia 3.2.0?

Revision history for this message
Alex Chekholko (alex-chekholko) wrote :

I'm using the workaround of "sudo useradd ganglia -g ganglia" before ganlia-monitor install.

Upendra (upendras)
Changed in ganglia (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Jonathan Davies (jpds) wrote :

This is not fixed in 11.10.

Changed in ganglia (Ubuntu Oneiric):
status: Fix Released → In Progress
Mark Mims (mark-mims)
Changed in ganglia (Ubuntu Oneiric):
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.