Bug 228502

Summary: autofs don't understand -null
Product: Red Hat Enterprise Linux 4 Reporter: Ralf Brunckhorst <ralf.brunckhorst>
Component: autofsAssignee: Jeff Moyer <jmoyer>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: high    
Version: 4.4CC: ikent, matseitz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0734 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:02:17 UTC Type: ---
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
diff for changed autofs start-script that enable the -null feature
none
new autofs diff file
none
Add support for -null map handling none

Description Ralf Brunckhorst 2007-02-13 12:28:24 UTC
Description of problem:
We use linux and solaris boxes in our NIS-env. The NIS-servers are solaris and
for the workstation we have created a indirect-map for /app in NIS.

We need a possibility to disable a auto-mount-map. In solaris this is possible
with the -null option:
-------------------------------
/etc/auto.master
  /app     -null
------------------------------------
We need it for a indirect mount: /app
On linux this should be a link to an afs-path, in solaris it is a normal
nfs-point mounted via automounter.
But that dosn't work in RHEL.

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

How reproducible:
everytime

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
I have open this bug also for fc6 and there it is fixed 214800.
We have modified the start-script for autofs, can you implemet the changes to
the rpm-packages. I will include a diff as attachment.

Comment 1 Ralf Brunckhorst 2007-02-13 12:28:25 UTC
Created attachment 147981 [details]
diff for changed autofs start-script that enable the -null feature

Comment 2 Jeff Moyer 2007-02-13 15:18:29 UTC
Could you please re-generate this diff using the "-u" option?  Something like:

diff -up /etc/init.d/autofs.orig /etc/init.d/autofs > autofs.diff

Then, attach that file to the bugzilla.  The diff you provided is incomplete (it
doesn't contain header information, like which file it is a diff of).  I also
couldn't manually apply it to the 4.1.3-187 code base, so something is amiss.

Thanks!

Comment 3 Ralf Brunckhorst 2007-02-13 16:27:22 UTC
Created attachment 147998 [details]
new autofs diff file

Hope that this work now, Ralf.

Comment 4 Ralf Brunckhorst 2007-02-14 09:11:34 UTC
For FC there is a working autofs version, but we need it for RHEL-4.

Comment 5 Jeff Moyer 2007-04-04 17:49:35 UTC
Created attachment 151684 [details]
Add support for -null map handling

The patch posted previously was a less than ideal solution.  I would rather add
explicit handling for "-null" as an option as opposed to relying on
undocumented ordering of variable assignment in the init script.

So, here's a replacement patch.  It works in my environment.  Please test it.

Comment 7 Ralf Brunckhorst 2007-04-16 12:41:53 UTC
Hi, was on vacation. I have tested your patch, it works also for me but the
patch should be:
 		fi
 	    done
 
+	    if [ "$map" == "-null" ]; then
+		knownmaps=" $dir/ $knownmaps"
+		continue
+	    fi
+
 	    if [ ! -z "$dir" -a ! -z "$map" \
 			-a x`echo "$map" | cut -c1` != 'x-' ]
 	    then

Comment 8 Jeff Moyer 2007-04-23 16:10:21 UTC
(In reply to comment #7)
> Hi, was on vacation. I have tested your patch, it works also for me but the
> patch should be:
>  		fi
>  	    done
>  
> +	    if [ "$map" == "-null" ]; then
> +		knownmaps=" $dir/ $knownmaps"
> +		continue
> +	    fi
> +
>  	    if [ ! -z "$dir" -a ! -z "$map" \
>  			-a x`echo "$map" | cut -c1` != 'x-' ]
>  	    then

Thanks for testing.  I don't see how the above is different from the posted
patch.  Could you explain, please?

Comment 9 Ralf Brunckhorst 2007-04-24 07:20:30 UTC
Sorry, it is the same. Maybe I made a copy/paste mistake.

Comment 10 RHEL Program Management 2007-05-09 07:47:06 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 11 Matt Seitz 2007-05-22 23:19:26 UTC
Thank you for providing the patch.  I used it to fix a problem with an NIS 
auto.master entry that was invalid for my system.  I look forward to having 
this included in an official update. 

Comment 13 Jeff Moyer 2007-07-18 14:10:32 UTC
An RHTS regression test was createad for this under autofs-tests/bugzillas,
subtest bz228502.

Comment 15 Jeff Moyer 2007-07-19 21:56:13 UTC
This fix was committed to autofs-4.1.3-222 (though I missed it in the changelog;
I'll fix that on the next build).

Comment 19 Jeff Moyer 2007-08-28 20:47:56 UTC
The patch was committed to CVS.

Comment 22 errata-xmlrpc 2007-11-15 16:02:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0734.html