Bug 1012711 - upgrading from RHS-2.0 causes 'kernel oplocks = no' to remain in /etc/samba/smb.conf.rpmnew
upgrading from RHS-2.0 causes 'kernel oplocks = no' to remain in /etc/samba/s...
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: samba (Show other bugs)
unspecified
Unspecified Unspecified
urgent Severity high
: ---
: ---
Assigned To: Raghavendra Talur
Lalatendu Mohanty
: ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-26 21:13 EDT by Anand Avati
Modified: 2015-09-01 19:06 EDT (History)
6 users (show)

See Also:
Fixed In Version: samba-3.6.9-160.6.el6rhs
Doc Type: Bug Fix
Doc Text:
Previously, while upgrading from Red Hat Storage 2.0 to Red Hat Storage 2.1, new settings were only stored in smb.conf.rpmnew and were not applied. The new settings mentioned in smb.conf.rpmnew are critical and if they are not applied leads to poor performance of Red Hat Storage volume accessed using Samba. Now, all Red Hat Storage specific Samba settings are added to a secondary configuration file which will be automatically updated on every upgrade. This secondary configuration file overrides any settings that were defined in primary smb.conf file. With this update, upgrades will not require any manual intervention to do a manual merge of existing and new recommended settings for Samba every time a upgrade is done.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-27 10:40:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Anand Avati 2013-09-26 21:13:11 EDT
Description of problem:

When the new samba/vfs code is installed through a yum update on RHS-2.0, the new config files are written as /etc/samba/smb.conf.rpmnew, and /etc/samba/smb.conf remains the old config. This results in 'kernel oplocks= no' _not_ getting set (as that is going into smb.conf.rpmnew).

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

RHS-2.1

How reproducible:

Always

Steps to Reproduce:
1. Install RHS-2.0
2. yum update to RHS-2.1
3. Observe that VFS module is used, but /etc/samba/smb.conf does not have 'kernel oplocks = no'

Actual results:


Expected results:

Updated configurations must become part of /etc/samba/smb.conf

Additional info:
Comment 2 Gowrishankar Rajaiyan 2013-10-17 06:04:22 EDT
Per bug triage 10/17.
Comment 3 Lalatendu Mohanty 2013-10-28 10:58:07 EDT
I am was testing this fix and come across a case where the "include = "/etc/samba/rhs-samba.conf"" got introduced in to a wrong place i.e. after [homes] where as it should be before the said section.

Below are the steps to reproduce

1. Install RHS 2.0 U6
2. Yum update (LIVE) and reboot (as there was a kernel update)
3. Update to RHS2.1
4. Update to RHS2.1U1 (update Samba and gluster packages)

The modified smb.conf after step #4 looks as below

[homes]
# ------------------------------- RHS Options -------------------------------
#
# The following line includes RHS-specific configuration options. Be
# careful with this line.

        include = "/etc/samba/rhs-samba.conf"

        comment = Home Directories
        browseable = no
        writable = yes
;       valid users = %S
;       valid users = MYDOMAIN\%S



Because of the wrong entry "testparm -s" is also reports error. Look for "Can't find include file "/etc/samba/rhs-samba.conf"" in below ouput

[root@rhsauto022 samba]# testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Can't find include file "/etc/samba/rhs-samba.conf"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
	workgroup = MYGROUP
	server string = Samba Server Version %v
	log file = /var/log/samba/log.%m
	max log size = 50
	idmap config * : backend = tdb
	cups options = raw

[homes]
	comment = Home Directories
	read only = No
	browseable = No

[printers]
	comment = All Printers
	path = /var/spool/samba
	printable = Yes
	print ok = Yes
	browseable = No
Comment 4 Lalatendu Mohanty 2013-10-31 09:03:45 EDT
Verified the bug with samba-3.6.9-160.6.el6rhs. It is working as expected

Below are the steps to verify the fix

case -1

1. Install RHS 2.0 U6
2. Yum update (LIVE) and reboot (as there was a kernel update)
3. Update to RHS2.1  and save testparm -s output
4. Update to RHS2.1U1 (update Samba and gluster packages). save testparm -s output
5. Check smb.conf and testparm -s output.
6. compare with testparm -s output from step #3 and #4

case -2 

1. Install RHS 2.0 U6 , create volume, start it, verify that it is accessible. Save testparm -s output
2. Yum update (LIVE) and reboot (as there was a kernel update)
3. Update to RHS2.1. Create a volume, start it, verify that it is accessible. Save testparm -s output
4. Update to RHS2.1U1 (update Samba and gluster packages). save testparm -s output
5. Check smb.conf and testparm -s output.
6. compare with testparm -s output from step #1, #3 and #4


case -3 

1. Install RHS 2.1, create volume, start it, verify that it is accessible. Save testparm -s output
2. Yum update (LIVE) and reboot (as there was a kernel update)
3. Update to RHS2.1U1 (update Samba and gluster packages). save testparm -s output.
4. Check smb.conf and testparm -s output.
5. compare with testparm -s output from step #1, and #3
Comment 6 errata-xmlrpc 2013-11-27 10:40:52 EST
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/RHBA-2013-1769.html

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