Bug 832230 - sanlock does not require useradd/groupadd
Summary: sanlock does not require useradd/groupadd
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: sanlock
Version: 17
Hardware: Unspecified
OS: Linux
high
urgent
Target Milestone: ---
Assignee: David Teigland
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 822145 832196
TreeView+ depends on / blocked
 
Reported: 2012-06-14 23:18 UTC by Mike Burns
Modified: 2016-04-26 13:54 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 832196
Environment:
Last Closed: 2012-06-18 14:51:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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