Bug 1028978

Summary: Samba update creating multiple entries of rhs-samba.conf in smb.conf
Product: Red Hat Gluster Storage Reporter: Lalatendu Mohanty <lmohanty>
Component: sambaAssignee: Jose A. Rivera <jrivera>
Status: CLOSED ERRATA QA Contact: Lalatendu Mohanty <lmohanty>
Severity: high Docs Contact:
Priority: high    
Version: 2.1CC: grajaiya, psriniva, rtalur, sbhaloth, sdharane, vagarwal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 2.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: samba-3.6.9-167.6.el6rhs Doc Type: Bug Fix
Doc Text:
Previously after a Red Hat Storage update, multiple entries of the configuration line "include = /etc/samba/rhs-samba.conf" were seen in smb.conf file. With this update, the update process ensures that only a single entry of this line is present in the smb.conf file.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-25 08:02:45 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:

Description Lalatendu Mohanty 2013-11-11 12:04:55 UTC
Description of problem:

Samba package update is creating multiple entries of rhs-samba.conf in smb.conf
ie. each samba update it is creating additional entries of "include = /etc/samba/rhs-samba.conf" in smb.conf where as it should just create one entry
and if the entry is there it should more entries for subsequent updates.

Issue is in the spec file of samba (rhs). The grep string should have been grep -vq "include = $RHSCONF" instead of grep -vq 'include = $RHSCONF' as below code snippet.  

%post
# bug fix rhbz#1012711
SMBCONF="%{_sysconfdir}/samba/smb.conf"
RHSCONF="%{_sysconfdir}/samba/rhs-samba.conf"

if grep -vq 'include = $RHSCONF' $SMBCONF
then


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

samba-3.6.9-160.7.el6

How reproducible:

Always

Steps to Reproduce:
1. Install RHS with samba version samba-3.6.9-160.6.el6 and update samba package tosamba-3.6.9-160.7.el6
2. 
3.

Actual results:

you can find two entries of include = /etc/samba/rhs-samba.conf

Expected results:

There should only one entry

Additional info:

Comment 1 Lalatendu Mohanty 2013-11-11 12:23:50 UTC
IMO this bug is a must fix bug for U2 because when we will update samba package in U2 (if any) it will create more entries and it will look ugly

Comment 3 Vivek Agarwal 2013-12-19 05:25:55 UTC
Fixed with new samba build: samba-3.6.9-167.5.el6rhs

Comment 4 Gowrishankar Rajaiyan 2013-12-19 06:24:42 UTC
Please set priority.

Comment 5 Lalatendu Mohanty 2013-12-26 11:03:12 UTC
Verified the bug with samba-common.x86_64 0:3.6.9-167.9.el6rhs (updated from samba-common.x86_64 0:3.6.9-167.8.el6rhs) and samba update is no more creating multiple entries. Hence marking this bug as verified.

Comment 6 Pavithra 2014-01-06 11:01:18 UTC
Can you please review the doc text for technical accuracy?

Comment 7 Raghavendra Talur 2014-01-06 11:09:58 UTC
Doc text is accurate.

Comment 9 errata-xmlrpc 2014-02-25 08:02:45 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.

http://rhn.redhat.com/errata/RHEA-2014-0208.html