Bug 1153130

Summary: autofs-5.0.5-109 with upgrade to RHEL 6.6 no longer recognizes +yp: in auto.master
Product: Red Hat Enterprise Linux 6 Reporter: Andy Feldt <afeldt>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: XuWang <xuw>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.6CC: eguan, ikent, tlavigne
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: autofs-5.0.5-111.el6 Doc Type: Bug Fix
Doc Text:
Cause: when fixing a problem with the master map parser, to properly defect map format associated with map type in the master map, the type comparison for yp maps used an incorrect length. Consequence: map type yp isn't correctly matched which causes the corresponding map to not be read. Fix: correct the length used in the comparison. Result: yp maps are now correctly read.
Story Points: ---
Clone Of:
: 1153414 (view as bug list) Environment:
Last Closed: 2015-07-22 06:51:10 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:
Bug Depends On:    
Bug Blocks: 1164899, 1153414    
Attachments:
Description Flags
Patch - fix fix master map type check
none
Patch - fix fix master map type check (updated) none

Description Andy Feldt 2014-10-15 16:26:15 UTC
Description of problem:


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


How reproducible: upgrade from RHEL 6.5 to RHEL 6.6 with an /etc/auto.master file containing +yp:some-nis-main-map-file


Steps to Reproduce:
1. See above
2.
3.

Actual results:
The map (and those it calls) is not loaded.  Turning on debugging (in /etc/autofs.conf) shows (in messages):

Oct 15 10:44:18 zpe automount[3113]: lookup_read_master: lookup(file): read entry +yp:auto_master_rhel
Oct 15 10:44:18 zpe automount[3113]: lookup_nss_read_master: reading master files yp:auto_master_rhel
Oct 15 10:44:18 zpe automount[3113]: lookup(file): file map /etc/yp:auto_master_rhel missing or not readable
Oct 15 10:44:18 zpe automount[3113]: lookup_nss_read_master: reading master nis yp:auto_master_rhel
Oct 15 10:44:18 zpe automount[3113]: parse_init: parse(sun): init gathered global options: vers=3
Oct 15 10:44:18 zpe automount[3113]: lookup(yp): read of master map yp:auto.master.rhel failed: No such map in server's domain
Oct 15 10:44:18 zpe automount[3113]: lookup(file): failed to read included master map yp:auto_master_rhel

None of the required filesystems can be automounted.

Expected results:

The ability to mount the specified filesystems.

Additional info:
There was not any problem with this in any prior versions of RHEL6

Comment 2 Ian Kent 2014-10-16 00:30:16 UTC
(In reply to Andy Feldt from comment #0)
> Description of problem:
> 
> 
> Version-Release number of selected component (if applicable): 5.0.5-109
> 
> 
> How reproducible: upgrade from RHEL 6.5 to RHEL 6.6 with an /etc/auto.master
> file containing +yp:some-nis-main-map-file
> 
> 
> Steps to Reproduce:
> 1. See above
> 2.
> 3.
> 
> Actual results:
> The map (and those it calls) is not loaded.  Turning on debugging (in
> /etc/autofs.conf) shows (in messages):
> 
> Oct 15 10:44:18 zpe automount[3113]: lookup_read_master: lookup(file): read
> entry +yp:auto_master_rhel
> Oct 15 10:44:18 zpe automount[3113]: lookup_nss_read_master: reading master
> files yp:auto_master_rhel
> Oct 15 10:44:18 zpe automount[3113]: lookup(file): file map
> /etc/yp:auto_master_rhel missing or not readable
> Oct 15 10:44:18 zpe automount[3113]: lookup_nss_read_master: reading master
> nis yp:auto_master_rhel
> Oct 15 10:44:18 zpe automount[3113]: parse_init: parse(sun): init gathered
> global options: vers=3
> Oct 15 10:44:18 zpe automount[3113]: lookup(yp): read of master map
> yp:auto.master.rhel failed: No such map in server's domain
> Oct 15 10:44:18 zpe automount[3113]: lookup(file): failed to read included
> master map yp:auto_master_rhel

Right, looks like the master map parser is getting it wrong.
I'll investigate.

Ian

Comment 3 Ian Kent 2014-10-16 00:48:23 UTC
When checking the code to see if I could see anything obvious
I think I've already found where the problem is.

I haven't done any testing at all yet so it's just a guess.

Comment 4 Ian Kent 2014-10-16 00:58:39 UTC
Created attachment 947382 [details]
Patch - fix fix master map type check

I think I should create a test package with this patch just
in case this is all the problem is, then continue with trying
to reproduce and test the change myself.

I'll do that.

Comment 5 Ian Kent 2014-10-16 02:57:31 UTC
Created attachment 947397 [details]
Patch - fix fix master map type check (updated)

This patch appears to fix the problem described.

Comment 7 Ian Kent 2014-10-16 03:18:03 UTC
A test package that appears to resolve the problem described here
has been built and is located at:
http://people.redhat.com/~ikent/autofs-5.0.5-109.type.2.el6/

Could you check and see if it resolves the problem please.

Comment 8 Andy Feldt 2014-10-16 14:35:21 UTC
I just tried the test package and it does, indeed, fix the problem.  Thanks!

Comment 11 XuWang 2015-03-16 09:57:25 UTC
Reproduced in autofs-5.0.5-109.el6.x86_64, the result is like following:

Running test for 'bz1153130' using 'autofs-5.0.5-109.el6.x86_64'
<--snap-->
ls: cannot access /test/raven: No such file or directory

Verified in autofs-5.0.5-112.el6, covers i386, x86_64, ppc64, s390x, the result is like following:
bz1153130-READY:bz1153130-READY:bz1153130-READY
<--snip-->
Test bz1153130: SUCCESS

Also run regression/bugzillas/stress test cases for autofs, no regression, works fine.

So I change the status of this bug to be VERIFIED.

Comment 12 errata-xmlrpc 2015-07-22 06:51:10 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/RHSA-2015-1344.html