Bug 832230

Summary: sanlock does not require useradd/groupadd
Product: [Fedora] Fedora Reporter: Mike Burns <mburns>
Component: sanlockAssignee: David Teigland <teigland>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: high    
Version: 17CC: abaron, acathrow, bazulay, cfeist, dallan, dennisml, dougsland, dyasny, iheim, jboggs, mburns, mgoldboi, ovirt-bugs, ovirt-maint, robert, teigland, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 832196 Environment:
Last Closed: 2012-06-18 14:51:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 822145, 832196    

Description Mike Burns 2012-06-14 23:18:43 UTC
+++ This bug was initially created as a clone of Bug #832196 +++

Because sanlock does not require useradd and groupadd, the binaries might not exist when it is installed.  This causes an error along the lines of:

/var/tmp/rpm-tmp.nsobaa: line 2: /usr/sbin/groupadd: No such file or directory
/var/tmp/rpm-tmp.nsobaa: line 4: /usr/sbin/useradd: No such file or directory
error: %pre(sanlock-2.1-2.fc17.x86_64) scriptlet failed, exit status 127
error: sanlock-2.1-2.fc17.x86_64: install failed

which means it will not install correctly


When building a livecd (like oVirt Node), this causes sanlock to fail to be included at all.



--- Additional comment from dougsland on 2012-06-14 18:51:45 EDT ---

Hi Mike,

     I have reproduced the report (Thanks Robert). VDSM package is not automatically installed in the node as we talked over IRC. In that case, /etc/pki/vdsm/ won't be created and will affect TUI.

#rpm -qa | grep -i vdsm

vdsm-python-4.10.0-1.fc17.x86_64
vdsm-xmlrpc-4.10.0-1.fc17.noarch
vdsm-reg-4.10.0-1.fc17.noarch
vdsm-cli-4.10.0-1.fc17.noarch

Generated a rpm in the vdsm git tree:
# rpm -ivh vdsm-reg-4.10.0-0.32.git61ecfc0.el6.noarch.rpm 
error: Failed dependencies:
    vdsm = 4.10.0-0.32.git61ecfc0.el6 is needed by vdsm-reg-4.10.0-0.32.git61ecfc0.el6.noarch

Moving back to ovirt-node.

----------------------------------

The reason vdsm is not there is because it requires sanlock which failed for the above reason.

Comment 1 Mike Burns 2012-06-14 23:19:46 UTC
Patch:

diff --git a/sanlock.spec b/sanlock.spec
index 83a4fb5..96b3956 100644
--- a/sanlock.spec
+++ b/sanlock.spec
@@ -9,6 +9,8 @@ URL:            https://fedorahosted.org/sanlock/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  libblkid-devel libaio-devel python python-devel
 Requires:       %{name}-lib = %{version}-%{release}
+Requires(pre):  /usr/sbin/groupadd
+Requires(pre):  /usr/sbin/useradd
 Source0:        https://fedorahosted.org/releases/s/a/sanlock/%{name}-%{version}.tar.gz

 %description

Comment 2 David Teigland 2012-06-15 14:28:59 UTC
I've rebuilt with those two require lines:
sanlock-2.3-3.fc17
sanlock-2.3-3.fc18

Comment 3 Ofer Schreiber 2012-06-18 14:12:14 UTC
so this bug is fixed, right?

Comment 4 David Teigland 2012-06-18 14:51:04 UTC
yes, I'm picking an arbitrary closed state as the status...

Comment 5 Mike Burns 2012-07-03 10:44:01 UTC
David,

Can you submit the packages to the update system?  latest in F17 repos is still 2.1-2.fc17.