Bug 1494564

Summary: openldap-server RPM upgrade stops slapd service if /etc/sysconfig/ldap file doesn't exist
Product: Red Hat Enterprise Linux 7 Reporter: Mark Tomich <mstomich>
Component: openldapAssignee: Matus Honek <mhonek>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.4CC: adm.fkt.physik, pkis
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-02 20:20:09 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:
Attachments:
Description Flags
patch for the postinstall script none

Description Mark Tomich 2017-09-22 13:57:29 UTC
Description of problem:
openldap-server RPM upgrade stops slapd service if /etc/sysconfig/ldap file doesn't exist

Version-Release number of selected component (if applicable):
All

How reproducible:
Always

Steps to Reproduce:
1. Install a vanilla RHEL7 without any updates
2. yum install openldap-servers-2.4.40-13.el7.x86_64
3. configure / start slapd (ensuring the deprecated /etc/sysconfig/ldap file does *not* exist)
4. yum upgrade openldap-servers (latest available is v2.4.44-5.el7 as of this writing)

Actual results:
slapd is stopped

Expected results:
slapd is restarted during the postinstall script

Additional info:
the defect is on or about line 39 in the postinstall script; it reads:

[ -r /etc/sysconfig/ldap ] || exit 0

This causes the postinstall script to exit before the step which restarts slapd...instead, this should read:

[ -r /etc/sysconfig/ldap ] || break

...which would terminate the if block...the appropriate thing to do.

Comment 2 Mark Tomich 2017-09-25 13:38:25 UTC
Created attachment 1330551 [details]
patch for the postinstall script

Silly mistake...you can't break an if block...this patch fixes the code properly.

Comment 3 Matus Honek 2017-11-02 20:20:09 UTC

*** This bug has been marked as a duplicate of bug 1479309 ***