Bug 785824 - rpm spec should include the group sanlock before adding the new user
Summary: rpm spec should include the group sanlock before adding the new user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sanlock
Version: 16
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
Assignee: Chris Feist
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-30 17:39 UTC by Douglas Schilling Landgraf
Modified: 2012-03-10 00:25 UTC (History)
3 users (show)

Fixed In Version: sanlock-1.9-8.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-10 00:25:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Douglas Schilling Landgraf 2012-01-30 17:39:45 UTC
Description of problem:

vdsm upstream requires sanlock to proceed with the installation. However, currently sanlock doesn`t add the group `sanlock` and try to add a new user `sanlock` linked to group `sanlock` (which doesn`t exist)

Version
=============
# rpm -qa | grep sanlock
sanlock-lib-1.8-1.fc16.x86_64
sanlock-1.8-1.fc16.x86_64
sanlock-python-1.8-1.fc16.x86_64


The current sanlock script
================================

# rpm -q --scripts sanlock
preinstall scriptlet (using /bin/sh):
/usr/sbin/useradd -u 179 -g 179 -c "sanlock" -s /sbin/nologin -r \
                  -d /var/run/sanlock sanlock 2> /dev/null || :

A suggestion to add to %prep session into spec file
=========================================================
/usr/sbin/groupadd -g 179 sanlock
/usr/sbin/useradd ......


Error trying to install vdsm
=====================================
- Create a rpm from the current vdsm tree
- yum install vdsm* -y

<snip>
  Installing : sanlock-1.8-1.fc16.x86_64                                                                                                                                                                   1/3 
  Installing : sanlock-python-1.8-1.fc16.x86_64                                                                                                                                                            2/3 
Error in PREIN scriptlet in rpm package vdsm-4.9.4-0.5.gitbc6b961.fc16.x86_64
usermod: group 'sanlock' does not exist
usermod: user 'sanlock' does not exist
error: %pre(vdsm-4.9.4-0.5.gitbc6b961.fc16.x86_64) scriptlet failed, exit status 6

Comment 1 Chris Feist 2012-01-30 18:09:54 UTC
Dave, are you ok with these changes?  If so, I'll get this fix in and rebuilt.

Comment 2 David Teigland 2012-02-13 20:13:03 UTC
Yes, thanks.

Comment 3 Fedora Update System 2012-02-13 21:12:38 UTC
sanlock-1.9-7.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/sanlock-1.9-7.fc16

Comment 4 Fedora Update System 2012-02-14 09:03:12 UTC
Package sanlock-1.9-7.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing sanlock-1.9-7.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1608/sanlock-1.9-7.fc16
then log in and leave karma (feedback).

Comment 5 Douglas Schilling Landgraf 2012-02-14 13:22:34 UTC
Tested, it worked. Comment/Karma added.

Thanks
Douglas

Comment 6 Federico Simoncelli 2012-02-20 12:43:57 UTC
Looks like the creation is still (silently) failing:

# useradd -u 179 -c "sanlock" -s /sbin/nologin -r -d /var/run/sanlock sanlock
useradd: group sanlock exists - if you want to add this user to that group, use -g.

Comment 7 Fedora Update System 2012-02-20 19:56:59 UTC
sanlock-1.9-8.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/sanlock-1.9-8.fc16

Comment 8 Fedora Update System 2012-03-10 00:25:02 UTC
sanlock-1.9-8.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.