Bug 832230 - sanlock does not require useradd/groupadd
sanlock does not require useradd/groupadd
Product: Fedora
Classification: Fedora
Component: sanlock (Show other bugs)
Unspecified Linux
high Severity urgent
: ---
: ---
Assigned To: David Teigland
Fedora Extras Quality Assurance
Depends On:
Blocks: 822145 832196
  Show dependency treegraph
Reported: 2012-06-14 19:18 EDT by Mike Burns
Modified: 2016-04-26 09:54 EDT (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 832196
Last Closed: 2012-06-18 10:51:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike Burns 2012-06-14 19:18:43 EDT
+++ 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@redhat.com 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


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 19:19:46 EDT

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

Comment 2 David Teigland 2012-06-15 10:28:59 EDT
I've rebuilt with those two require lines:
Comment 3 Ofer Schreiber 2012-06-18 10:12:14 EDT
so this bug is fixed, right?
Comment 4 David Teigland 2012-06-18 10:51:04 EDT
yes, I'm picking an arbitrary closed state as the status...
Comment 5 Mike Burns 2012-07-03 06:44:01 EDT

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.