RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1344139 - RHEL6 sanlock package needs dependency on shadow-utils or directly on the binary files used at preinstall scriptlet
Summary: RHEL6 sanlock package needs dependency on shadow-utils or directly on the bin...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sanlock
Version: 6.8
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: Pavol Brilla
URL:
Whiteboard:
Depends On:
Blocks: 1341259 1349068 1367820
TreeView+ depends on / blocked
 
Reported: 2016-06-08 20:50 UTC by Rejy M Cyriac
Modified: 2017-03-21 11:22 UTC (History)
16 users (show)

Fixed In Version: sanlock-2.8-3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 11:22:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0740 0 normal SHIPPED_LIVE sanlock bug fix update 2017-03-21 12:44:31 UTC

Description Rejy M Cyriac 2016-06-08 20:50:48 UTC
Description of problem:
The sanlock package uses the binary files '/usr/sbin/groupadd', '/usr/sbin/useradd', and '/usr/sbin/usermod' at the preinstall scriptlet, but does not have dependency on either those binary files to be preinstalled on the system or on the shadow-utils package that provides the binary files

---------------------
rpm -qp --scripts sanlock-2.8-2.el6_5.x86_64.rpm 
preinstall scriptlet (using /bin/sh):
getent group sanlock > /dev/null || /usr/sbin/groupadd \
	-g 179 sanlock
getent passwd sanlock > /dev/null || /usr/sbin/useradd \
	-u 179 -c "sanlock" -s /sbin/nologin -r \
	-g 179 -d /var/run/sanlock sanlock
/usr/sbin/usermod -a -G disk sanlock
---------------------

---------------------
rpm -qp --requires sanlock-2.8-2.el6_5.x86_64.rpm 
/bin/bash
/bin/sh
/bin/sh
/bin/sh
/bin/sh
config(sanlock) = 2.8-2.el6_5
libaio.so.1()(64bit)
libaio.so.1(LIBAIO_0.1)(64bit)
libaio.so.1(LIBAIO_0.4)(64bit)
libblkid.so.1()(64bit)
libblkid.so.1(BLKID_2.15)(64bit)
libblkid.so.1(BLKID_2.17)(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libc.so.6(GLIBC_2.9)(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libpthread.so.0(GLIBC_2.3.2)(64bit)
libpthread.so.0(GLIBC_2.3.3)(64bit)
librt.so.1()(64bit)
librt.so.1(GLIBC_2.2.5)(64bit)
libsanlock.so.1()(64bit)
libuuid.so.1()(64bit)
libuuid.so.1(UUID_1.0)(64bit)
libwdmd.so.1()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
sanlock-lib = 2.8-2.el6_5
rpmlib(PayloadIsXz) <= 5.2-1
---------------------

This lack of dependency has led to the install failure of the RHGS 3.1 Update 3 on RHEL6 ISO, since the sanlock package is being attempted to be installed before the shadow-utils package is installed. Due to this bug, the RHGS 3.1.3 on RHEL6 ISO delivery at the RHGS 3.1.3 release is blocked.

http://download.eng.bos.redhat.com/composes/nightly/RHGSS-3.1.3-RHEL-6-20160608.n.0/compose/RHGSS/x86_64/iso/RHGSS-3.1.3-RHEL-6-20160608.n.0-RHGSS-x86_64-dvd1.iso

The details about the issue at RHGS 3.1.3 on RHEL6 ISO are at https://bugzilla.redhat.com/show_bug.cgi?id=1341259#c9


Version-Release number of selected component (if applicable):
sanlock-2.8-2.el6_5.x86_64.rpm

How reproducible:


Steps to Reproduce:
1. Try to install RHGS 3.1.3 on RHEL6 ISO - http://download.eng.bos.redhat.com/composes/nightly/RHGSS-3.1.3-RHEL-6-20160608.n.0/compose/RHGSS/x86_64/iso/RHGSS-3.1.3-RHEL-6-20160608.n.0-RHGSS-x86_64-dvd1.iso
2. Observe Error during install
3. Troubleshoot at installer terminal to find shadow-utils and sanlock not installed
4. Try manual installation and observe errors from the sanlock pre scriptlet, due to groupadd and useradd being missing

Actual results:
sanlock package before installation does not ensure that the shadow-utils package is installed on the system to provide the binary files being used at preinstall scriptlet

Expected results:
binary files used at preinstall scriptlet of sanlock should be ensured to be installed ahead through dependency on either the binary files directly or on the package that provides the binary files

shadow-utils should be ensured to be installed on system before sanlock installation

Additional info:
The required dependency on the binary files is available at the sanlock package on RHEL7
---------------------
rpm -qp --requires sanlock-3.2.4-2.el7_2.x86_64.rpm 
/bin/bash
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/usr/sbin/groupadd
/usr/sbin/useradd
config(sanlock) = 3.2.4-2.el7_2
libaio.so.1()(64bit)
libaio.so.1(LIBAIO_0.1)(64bit)
libaio.so.1(LIBAIO_0.4)(64bit)
libblkid.so.1()(64bit)
libblkid.so.1(BLKID_2.15)(64bit)
libblkid.so.1(BLKID_2.17)(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libc.so.6(GLIBC_2.9)(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libpthread.so.0(GLIBC_2.3.2)(64bit)
libpthread.so.0(GLIBC_2.3.3)(64bit)
librt.so.1()(64bit)
librt.so.1(GLIBC_2.2.5)(64bit)
libsanlock.so.1()(64bit)
libuuid.so.1()(64bit)
libuuid.so.1(UUID_1.0)(64bit)
libwdmd.so.1()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
sanlock-lib = 3.2.4-2.el7_2
systemd-sysv
systemd-units
systemd-units
systemd-units
rpmlib(PayloadIsXz) <= 5.2-1
---------------------

Comment 1 David Teigland 2016-06-10 14:26:31 UTC
diff --git a/sanlock.spec b/sanlock.spec
index 97d3eb6e671f..ffe4334caeb1 100644
--- a/sanlock.spec
+++ b/sanlock.spec
@@ -1,6 +1,6 @@
 Name:           sanlock
 Version:        2.8
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        A shared disk lock manager
 
 Group:          System Environment/Base
@@ -10,6 +10,8 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 ExclusiveArch:  x86_64
 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
 
 Patch0: 0001-sanlock-fix-get_hosts-off-by-one.patch
@@ -253,6 +255,9 @@ if [ $1 -ge 1 ] ; then
 fi
 
 %changelog
+* Fri Jun 10 2016 David Teigland <teigland> - 2.8-3
+- Resolves: rhbz#1344139
+
 * Mon Sep 08 2014 David Teigland <teigland> - 2.8-2
 - Resolves: rhbz#1111210

Comment 2 Nir Soffer 2016-06-22 21:44:16 UTC
David, do you know when this package will be available? we must required it in 
vdsm to resolve bug 1349068.

Comment 3 David Teigland 2016-06-22 22:15:48 UTC
I don't know.  I think the 6.9 build satisfied RHGS somehow.

Comment 4 David Teigland 2016-10-20 14:54:28 UTC
I don't know what's going on here, if there's something that still needs to be done, please add a comment explaining that.

Comment 7 David Teigland 2016-10-28 16:18:42 UTC
Thanks, I'd forgotten about errata, I just completed that.

Comment 11 Pavol Brilla 2017-03-16 18:38:27 UTC
1. verification of bug initial issue

# rpm -qp --requires sanlock-2.8-3.el6.x86_64.rpm  | grep add
/usr/sbin/groupadd  
/usr/sbin/useradd


2. I will process erratum ASAP

Comment 13 errata-xmlrpc 2017-03-21 11:22:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0740.html


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