Bug 785824

Summary: rpm spec should include the group sanlock before adding the new user
Product: [Fedora] Fedora Reporter: Douglas Schilling Landgraf <dougsland>
Component: sanlockAssignee: Chris Feist <cfeist>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 16CC: cfeist, fsimonce, teigland
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: sanlock-1.9-8.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-10 00:25:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.